summaryrefslogtreecommitdiffstats
path: root/usr.sbin/named/db_secure.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/named/db_secure.c')
-rw-r--r--usr.sbin/named/db_secure.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/usr.sbin/named/db_secure.c b/usr.sbin/named/db_secure.c
index 9c418f4..870f8c5 100644
--- a/usr.sbin/named/db_secure.c
+++ b/usr.sbin/named/db_secure.c
@@ -1,5 +1,5 @@
#ifndef LINT
-static char rcsid[] = "$Id: db_secure.c,v 8.4 1995/06/29 09:26:17 vixie Exp $";
+static char rcsid[] = "$Id: db_secure.c,v 8.5 1995/12/06 20:34:38 vixie Exp $";
#endif
/* this file was contributed by Gregory Neil Shapiro of WPI in August 1993 */
@@ -11,6 +11,7 @@ static char rcsid[] = "$Id: db_secure.c,v 8.4 1995/06/29 09:26:17 vixie Exp $";
#include <arpa/nameser.h>
#include <arpa/inet.h>
#include <syslog.h>
+#include <errno.h>
#include "named.h"
@@ -74,18 +75,8 @@ build_secure_netlist(zp)
zp->z_origin, buf));
if (ntp == NULL) {
ntp = (struct netinfo *)malloc(sizeof(struct netinfo));
- if (!ntp) {
- dprintf(1, (ddt,
- "build_secure_netlist (%s): malloc fail\n",
- zp->z_origin));
- syslog(LOG_NOTICE,
- "build_secure_netlist (%s): Out of Memory",
- zp->z_origin);
- if (!securezone) {
- zp->secure_nets = NULL;
- }
- return (1);
- }
+ if (!ntp)
+ panic(errno, "malloc(netinfo)");
}
if (!inet_aton(buf, &ntp->my_addr)) {
syslog(LOG_INFO,
@@ -148,7 +139,8 @@ build_secure_netlist(zp)
if (debug > 1) {
for (ntp = *netlistp; ntp != NULL; ntp = ntp->next) {
fprintf(ddt, "ntp x%lx addr x%lx mask x%lx",
- (u_long)ntp, ntp->addr, ntp->mask);
+ (u_long)ntp, (u_long)ntp->addr,
+ (u_long)ntp->mask);
fprintf(ddt, " my_addr %#lx",
(u_long)ntp->my_addr.s_addr);
fprintf(ddt, " %s", inet_ntoa(ntp->my_addr));
OpenPOWER on IntegriCloud