patches for t3b

Joe Rhett jrhett at isite.net
Fri Sep 10 08:31:11 UTC 1999


named and ndc have incorrect paths compiled in unless this patch is applied.
(actually, unless the point of DESTDIR is to compile for a chroot environment
.. which isn't what one would infer from notes in INSTALL)

*** src_orig/bin/ndc/Makefile	Sun Aug  8 10:51:02 1999
--- src/bin/ndc/Makefile	Fri Sep 10 01:17:19 1999
***************
*** 61,70 ****
  
  pathnames.h: ${TOP}/.settings Makefile ../named/pathtemplate.h
  	rm -f pathnames.h
! 	sed -e "s|%DESTSBIN%|${DESTSBIN}|" \
! 	    -e "s|%DESTEXEC%|${DESTEXEC}|" \
! 	    -e "s|%DESTETC%|${DESTETC}|" \
! 	    -e "s|%DESTRUN%|${DESTRUN}|" \
  	    < ../named/pathtemplate.h > pathnames.h
  
  distclean: clean
--- 61,70 ----
  
  pathnames.h: ${TOP}/.settings Makefile ../named/pathtemplate.h
  	rm -f pathnames.h
! 	sed -e "s|%DESTSBIN%|${DESTDIR}${DESTSBIN}|" \
! 	    -e "s|%DESTEXEC%|${DESTDIR}${DESTEXEC}|" \
! 	    -e "s|%DESTETC%|${DESTDIR}${DESTETC}|" \
! 	    -e "s|%DESTRUN%|${DESTDIR}${DESTRUN}|" \
  	    < ../named/pathtemplate.h > pathnames.h
  
  distclean: clean
*** src_orig/bin/named/Makefile	Tue Aug 17 23:15:48 1999
--- src/bin/named/Makefile	Fri Sep 10 01:18:11 1999
***************
*** 91,100 ****
  
  pathnames.h: ${TOP}/.settings Makefile pathtemplate.h
  	rm -f pathnames.h
! 	sed -e "s|%DESTSBIN%|${DESTSBIN}|" \
! 	    -e "s|%DESTEXEC%|${DESTEXEC}|" \
! 	    -e "s|%DESTETC%|${DESTETC}|" \
! 	    -e "s|%DESTRUN%|${DESTRUN}|" \
  	    < pathtemplate.h > pathnames.h
  
  ns_signal.${O}: ns_signal.c
--- 91,100 ----
  
  pathnames.h: ${TOP}/.settings Makefile pathtemplate.h
  	rm -f pathnames.h
! 	sed -e "s|%DESTSBIN%|${DESTDIR}${DESTSBIN}|" \
! 	    -e "s|%DESTEXEC%|${DESTDIR}${DESTEXEC}|" \
! 	    -e "s|%DESTETC%|${DESTDIR}${DESTETC}|" \
! 	    -e "s|%DESTRUN%|${DESTDIR}${DESTRUN}|" \
  	    < pathtemplate.h > pathnames.h
  
  ns_signal.${O}: ns_signal.c


The following patch unifies naming conventions in the error logs.
	master/slave vs primary/secondary
In this manner the logs match the configuration file syntax. I also made the
same changes to variable names, which I halfway assume you'll reject,
but it has been running for several hours on one of our production systems
without any problems.

diff -c -r src_orig/bin/named/db_defs.h src/bin/named/db_defs.h
*** src_orig/bin/named/db_defs.h	Sat Aug  7 17:22:12 1999
--- src/bin/named/db_defs.h	Thu Sep  9 23:43:45 1999
***************
*** 108,114 ****
  					 * d_ttl is actually the time when
  					 * the record will expire.
  					 * otherwise (for authoritative
! 					 * primary and secondary zones),
  					 * d_ttl is the time to live.
  					 */
  	unsigned	d_zone :ZONE_BITS; /* zone number or 0 for the cache */
--- 108,114 ----
  					 * d_ttl is actually the time when
  					 * the record will expire.
  					 * otherwise (for authoritative
! 					 * master and slave zones),
  					 * d_ttl is the time to live.
  					 */
  	unsigned	d_zone :ZONE_BITS; /* zone number or 0 for the cache */
diff -c -r src_orig/bin/named/db_ixfr.c src/bin/named/db_ixfr.c
*** src_orig/bin/named/db_ixfr.c	Sun Aug 22 22:29:52 1999
--- src/bin/named/db_ixfr.c	Thu Sep  9 23:43:50 1999
***************
*** 319,325 ****
  #define    ERRTO(msg)  if (1) { errtype = msg; goto err; } else (void)NULL
  
  	err = 0;
! 	transport = primary_trans;
  	lineno = 1;
  	rrecp_start = NULL;
  	rrecp_last = NULL;
--- 319,325 ----
  #define    ERRTO(msg)  if (1) { errtype = msg; goto err; } else (void)NULL
  
  	err = 0;
! 	transport = master_trans;
  	lineno = 1;
  	rrecp_start = NULL;
  	rrecp_last = NULL;
diff -c -r src_orig/bin/named/db_load.c src/bin/named/db_load.c
*** src_orig/bin/named/db_load.c	Sun Aug 22 22:38:48 1999
--- src/bin/named/db_load.c	Thu Sep  9 23:43:55 1999
***************
*** 270,280 ****
  	switch (zp->z_type) {
  	case Z_PRIMARY:
  	case Z_HINT:
! 		transport = primary_trans;
  		break;
  	case Z_SECONDARY:
  	case Z_STUB:
! 		transport = secondary_trans;
  		break;
  	case Z_CACHE:
  		transport = response_trans;
--- 270,280 ----
  	switch (zp->z_type) {
  	case Z_PRIMARY:
  	case Z_HINT:
! 		transport = master_trans;
  		break;
  	case Z_SECONDARY:
  	case Z_STUB:
! 		transport = slave_trans;
  		break;
  	case Z_CACHE:
  		transport = response_trans;
diff -c -r src_orig/bin/named/db_update.c src/bin/named/db_update.c
*** src_orig/bin/named/db_update.c	Tue Aug 17 23:15:49 1999
--- src/bin/named/db_update.c	Thu Sep  9 23:44:11 1999
***************
*** 134,147 ****
   * return value:
   *	zone number or DB_Z_CACHE if it's outside a zone
   * interesting cases:
!  *	    DEC.COM SOA (primary)
!  *	CRL.DEC.COM NS  (in primary)
   *		if you start at CRL.. here, you find the DEC.COM zone
   *		if you start at NS.CRL.. here, you're in the cache
!  *	    DEC.COM SOA (primary)
!  *	CRL.DEC.COM NS  (in primary)
!  *	CRL.DEC.COM SOA (secondary)
!  *	CRL.DEC.COM NS  (in secondary)
   *		if you start at CRL.. here, you find the CRL.DEC.COM zone
   *		if you start at NS.CRL.. here, you're in the CRL.. zone
   */
--- 134,147 ----
   * return value:
   *	zone number or DB_Z_CACHE if it's outside a zone
   * interesting cases:
!  *	    DEC.COM SOA (master)
!  *	CRL.DEC.COM NS  (in master)
   *		if you start at CRL.. here, you find the DEC.COM zone
   *		if you start at NS.CRL.. here, you're in the cache
!  *	    DEC.COM SOA (master)
!  *	CRL.DEC.COM NS  (in master)
!  *	CRL.DEC.COM SOA (slave)
!  *	CRL.DEC.COM NS  (in slave)
   *		if you start at CRL.. here, you find the CRL.DEC.COM zone
   *		if you start at NS.CRL.. here, you're in the CRL.. zone
   */
***************
*** 508,514 ****
  					 * being served by the same server.
  					 * named will send NS records for
  					 * sub.a.b.c during zone transfer of
! 					 * a.b.c zone.  If we're secondary for
  					 * both zones, and we reload zone
  					 * a.b.c, we'll get the NS records
  					 * (and possibly A records to go with
--- 508,514 ----
  					 * being served by the same server.
  					 * named will send NS records for
  					 * sub.a.b.c during zone transfer of
! 					 * a.b.c zone.  If we're slave for
  					 * both zones, and we reload zone
  					 * a.b.c, we'll get the NS records
  					 * (and possibly A records to go with
***************
*** 520,526 ****
  					 * shouldn't syslog because there's
  					 * nothing the user can do to prevent
  					 * the situation.  Perhaps we should
! 					 * only complain when we are primary?
  	 				 */
  
  					if (newdp->d_clev < dp->d_clev) {
--- 520,526 ----
  					 * shouldn't syslog because there's
  					 * nothing the user can do to prevent
  					 * the situation.  Perhaps we should
! 					 * only complain when we are master?
  	 				 */
  
  					if (newdp->d_clev < dp->d_clev) {
diff -c -r src_orig/bin/named/ns_config.c src/bin/named/ns_config.c
*** src_orig/bin/named/ns_config.c	Wed Aug 18 19:48:58 1999
--- src/bin/named/ns_config.c	Thu Sep  9 23:44:32 1999
***************
*** 595,601 ****
  			  "source file of dynamic zone '%s' has changed",
  				   zp->z_origin);
  
! 	primary_reload:
  #endif /* BIND_UPDATE */
  		if (zp->z_source != NULL)
  			freestr(zp->z_source);
--- 595,601 ----
  			  "source file of dynamic zone '%s' has changed",
  				   zp->z_origin);
  
! 	master_reload:
  #endif /* BIND_UPDATE */
  		if (zp->z_source != NULL)
  			freestr(zp->z_source);
***************
*** 614,626 ****
  
  		if (reload_master(zp) == 1) {
  			/*
! 			 * Note that going to primary_reload
  			 * unconditionally reloads the zone.
  			 */
  			new_zp->z_source = savestr(zp->z_source, 1);
  			new_zp->z_ixfr_base = savestr(zp->z_ixfr_base, 1);
  			new_zp->z_ixfr_tmp = savestr(zp->z_ixfr_tmp, 1);
! 			goto primary_reload;
  		}
  		break;
  
--- 614,626 ----
  
  		if (reload_master(zp) == 1) {
  			/*
! 			 * Note that going to master_reload
  			 * unconditionally reloads the zone.
  			 */
  			new_zp->z_source = savestr(zp->z_source, 1);
  			new_zp->z_ixfr_base = savestr(zp->z_ixfr_base, 1);
  			new_zp->z_ixfr_tmp = savestr(zp->z_ixfr_tmp, 1);
! 			goto master_reload;
  		}
  		break;
  
***************
*** 688,694 ****
  			zoneinit(zp);
  		else {
  			/* 
! 			** Force secondary to try transfer soon
  			** after SIGHUP.
  			*/
  			if ((zp->z_flags & (Z_QSERIAL|Z_XFER_RUNNING)) == 0 &&
--- 688,694 ----
  			zoneinit(zp);
  		else {
  			/* 
! 			** Force slave to try transfer soon
  			** after SIGHUP.
  			*/
  			if ((zp->z_flags & (Z_QSERIAL|Z_XFER_RUNNING)) == 0 &&
***************
*** 1123,1130 ****
  	op->stack_size = 0UL;	/* use system default */
  	op->core_size = 0UL;	/* use system default */
  	op->files = ULONG_MAX;  /* unlimited */
! 	op->check_names[primary_trans] = fail;
! 	op->check_names[secondary_trans] = warn;
  	op->check_names[response_trans] = ignore;
  	op->listen_list = NULL;
  	op->fwdtab = NULL;
--- 1123,1130 ----
  	op->stack_size = 0UL;	/* use system default */
  	op->core_size = 0UL;	/* use system default */
  	op->files = ULONG_MAX;  /* unlimited */
! 	op->check_names[master_trans] = fail;
! 	op->check_names[slave_trans] = warn;
  	op->check_names[response_trans] = ignore;
  	op->listen_list = NULL;
  	op->fwdtab = NULL;
diff -c -r src_orig/bin/named/ns_defs.h src/bin/named/ns_defs.h
*** src_orig/bin/named/ns_defs.h	Thu Aug 19 16:55:16 1999
--- src/bin/named/ns_defs.h	Thu Sep  9 23:44:45 1999
***************
*** 123,129 ****
  #define MAXQUERIES	20	/* max # of queries to be made */
  #define	MAXQSERIAL	4	/* max # of outstanding QSERIAL's */
  				/* (prevent "recursive" loops) */
! #define	INIT_REFRESH	600	/* retry time for initial secondary */
  				/* contact (10 minutes) */
  #define MIN_REFRESH	2	/* never refresh more frequently than once */
  				/* every MIN_REFRESH seconds */
--- 123,129 ----
  #define MAXQUERIES	20	/* max # of queries to be made */
  #define	MAXQSERIAL	4	/* max # of outstanding QSERIAL's */
  				/* (prevent "recursive" loops) */
! #define	INIT_REFRESH	600	/* retry time for initial slave */
  				/* contact (10 minutes) */
  #define MIN_REFRESH	2	/* never refresh more frequently than once */
  				/* every MIN_REFRESH seconds */
***************
*** 133,139 ****
  				/* every 4 weeks*/
  #define MAX_RETRY	1209600	/* perform a retry after no more than 2 weeks */
  #define MAX_EXPIRE	31536000 /* expire a zone if we have not talked to */
! 				/* the primary in 1 year */
  #define NADDRECS	20	/* max addt'l rr's per resp */
  
  #define XFER_TIMER	120	/* named-xfer's connect timeout */
--- 133,139 ----
  				/* every 4 weeks*/
  #define MAX_RETRY	1209600	/* perform a retry after no more than 2 weeks */
  #define MAX_EXPIRE	31536000 /* expire a zone if we have not talked to */
! 				/* the master in 1 year */
  #define NADDRECS	20	/* max addt'l rr's per resp */
  
  #define XFER_TIMER	120	/* named-xfer's connect timeout */
***************
*** 543,549 ****
  	int		s_opcode;	/* type of request */
  	int		s_linkcnt;	/* number of client connections using
  					 * this connection to forward updates
! 					 * to the primary */
  	struct fdlist	*s_fds;		/* linked list of connections to the
  					 * primaries that have been used by
  					 * the server to forward this client's
--- 543,549 ----
  	int		s_opcode;	/* type of request */
  	int		s_linkcnt;	/* number of client connections using
  					 * this connection to forward updates
! 					 * to the master */
  	struct fdlist	*s_fds;		/* linked list of connections to the
  					 * primaries that have been used by
  					 * the server to forward this client's
***************
*** 650,656 ****
  	u_int8_t	xfers;		/* #/xfers running right now */
  };
  		
! enum transport { primary_trans, secondary_trans, response_trans, update_trans,
  		 num_trans };
  
  /* types used by the parser or config routines */
--- 650,656 ----
  	u_int8_t	xfers;		/* #/xfers running right now */
  };
  		
! enum transport { master_trans, slave_trans, response_trans, update_trans,
  		 num_trans };
  
  /* types used by the parser or config routines */
diff -c -r src_orig/bin/named/ns_glob.h src/bin/named/ns_glob.h
*** src_orig/bin/named/ns_glob.h	Tue Aug 17 23:15:51 1999
--- src/bin/named/ns_glob.h	Thu Sep  9 23:44:51 1999
***************
*** 192,198 ****
  
  DECL	const char		*transport_strings[]
  #ifdef MAIN_PROGRAM
! 	= { "primary", "secondary", "response", NULL }
  #endif
  ;
  
--- 192,198 ----
  
  DECL	const char		*transport_strings[]
  #ifdef MAIN_PROGRAM
! 	= { "master", "slave", "response", NULL }
  #endif
  ;
  
diff -c -r src_orig/bin/named/ns_init.c src/bin/named/ns_init.c
*** src_orig/bin/named/ns_init.c	Wed Aug 18 19:48:58 1999
--- src/bin/named/ns_init.c	Thu Sep  9 23:44:57 1999
***************
*** 221,227 ****
  	 * Try to load zone from backup file,
  	 * if one was specified and it exists.
  	 * If not, or if the data are out of date,
! 	 * we will refresh the zone from a primary
  	 * immediately.
  	 */
  	if (zp->z_source == NULL)
--- 221,227 ----
  	 * Try to load zone from backup file,
  	 * if one was specified and it exists.
  	 * If not, or if the data are out of date,
! 	 * we will refresh the zone from a master
  	 * immediately.
  	 */
  	if (zp->z_source == NULL)
***************
*** 385,392 ****
  	case T_MX:
  		switch (transport) {
  		case update_trans:
! 		case primary_trans:
! 		case secondary_trans:
  			context = owner_ctx;
  			break;
  		case response_trans:
--- 385,392 ----
  	case T_MX:
  		switch (transport) {
  		case update_trans:
! 		case master_trans:
! 		case slave_trans:
  			context = owner_ctx;
  			break;
  		case response_trans:
diff -c -r src_orig/bin/named/ns_maint.c src/bin/named/ns_maint.c
*** src_orig/bin/named/ns_maint.c	Wed Aug 18 16:21:27 1999
--- src/bin/named/ns_maint.c	Thu Sep  9 23:45:05 1999
***************
*** 1314,1320 ****
  					if (!(zp->z_flags & Z_SYSLOGGED)) {
  						zp->z_flags |= Z_SYSLOGGED;
  						ns_notice(ns_log_default,
! 		      "zoneref: Masters for secondary zone \"%s\" unreachable",
  							  zp->z_origin);
  					}
  					ns_retrytime(zp, tt.tv_sec);
--- 1314,1320 ----
  					if (!(zp->z_flags & Z_SYSLOGGED)) {
  						zp->z_flags |= Z_SYSLOGGED;
  						ns_notice(ns_log_default,
! 		      "zoneref: Masters for slave zone \"%s\" unreachable",
  							  zp->z_origin);
  					}
  					ns_retrytime(zp, tt.tv_sec);
***************
*** 1427,1433 ****
  			ns_debug(ns_log_default, 1, "loadxfer() \"%s\"",
  				 zp->z_origin[0] ? zp->z_origin : ".");
  			zp->z_flags &= ~(Z_NEED_RELOAD|Z_AUTH);
! /* XXX this is bad, should be done in ns_zreload() for primary changes. */
  			ns_stopxfrs(zp);
  			old_serial = zp->z_serial;
  			if (zp->z_xferpid == XFER_ISIXFR) {
--- 1427,1433 ----
  			ns_debug(ns_log_default, 1, "loadxfer() \"%s\"",
  				 zp->z_origin[0] ? zp->z_origin : ".");
  			zp->z_flags &= ~(Z_NEED_RELOAD|Z_AUTH);
! /* XXX this is bad, should be done in ns_zreload() for master changes. */
  			ns_stopxfrs(zp);
  			old_serial = zp->z_serial;
  			if (zp->z_xferpid == XFER_ISIXFR) {
***************
*** 1579,1585 ****
  	INSIST(reloading == 0);
  	qflush();
  	sq_flush(NULL);
! 	reloading++;	/* To force transfer if secondary and backing up. */
  	ns_init(conffile);
  	time(&resettime);
  	reloading--;
--- 1579,1585 ----
  	INSIST(reloading == 0);
  	qflush();
  	sq_flush(NULL);
! 	reloading++;	/* To force transfer if slave and backing up. */
  	ns_init(conffile);
  	time(&resettime);
  	reloading--;
diff -c -r src_orig/bin/named/ns_parser.c src/bin/named/ns_parser.c
*** src_orig/bin/named/ns_parser.c	Mon Aug 23 23:25:01 1999
--- src/bin/named/ns_parser.c	Thu Sep  9 23:45:09 1999
***************
*** 1998,2010 ****
  case 110:
  #line 765 "ns_parser.y"
  {
! 		yyval.s_int = primary_trans;
  	}
  break;
  case 111:
  #line 769 "ns_parser.y"
  {
! 		yyval.s_int = secondary_trans;
  	}
  break;
  case 112:
--- 1998,2010 ----
  case 110:
  #line 765 "ns_parser.y"
  {
! 		yyval.s_int = master_trans;
  	}
  break;
  case 111:
  #line 769 "ns_parser.y"
  {
! 		yyval.s_int = slave_trans;
  	}
  break;
  case 112:
diff -c -r src_orig/bin/named/ns_parser.y src/bin/named/ns_parser.y
*** src_orig/bin/named/ns_parser.y	Wed Aug 18 21:56:16 1999
--- src/bin/named/ns_parser.y	Thu Sep  9 23:45:14 1999
***************
*** 763,773 ****
  
  check_names_type: T_MASTER
  	{
! 		$$ = primary_trans;
  	}
  	| T_SLAVE
  	{
! 		$$ = secondary_trans;
  	}
  	| T_RESPONSE
  	{
--- 763,773 ----
  
  check_names_type: T_MASTER
  	{
! 		$$ = master_trans;
  	}
  	| T_SLAVE
  	{
! 		$$ = slave_trans;
  	}
  	| T_RESPONSE
  	{
diff -c -r src_orig/bin/named/ns_req.c src/bin/named/ns_req.c
*** src_orig/bin/named/ns_req.c	Sun Aug 22 22:29:52 1999
--- src/bin/named/ns_req.c	Thu Sep  9 23:33:06 1999
***************
*** 503,509 ****
  			 * AXFR from you.
  			 */
  			ns_info(ns_log_notify,
! 			    "NOTIFY(SOA) for non-secondary name (%s), from %s",
  				dnbuf, sin_ntoa(from));
  			goto refuse;
  		}
--- 503,509 ----
  			 * AXFR from you.
  			 */
  			ns_info(ns_log_notify,
! 			    "NOTIFY(SOA) for non-slave name (%s), from %s",
  				dnbuf, sin_ntoa(from));
  			goto refuse;
  		}
***************
*** 1476,1482 ****
  #endif
  	case z_slave:
  		/*
! 		 * Check to see whether a secondary zone has expired or
  		 * time warped; if so clear authority flag for zone,
  		 * schedule the zone for immediate maintenance, and
  		 * return true.
--- 1476,1482 ----
  #endif
  	case z_slave:
  		/*
! 		 * Check to see whether a slave zone has expired or
  		 * time warped; if so clear authority flag for zone,
  		 * schedule the zone for immediate maintenance, and
  		 * return true.
***************
*** 1484,1494 ****
  		if ((int32_t)(tt.tv_sec - zp->z_lastupdate)
  		    > (int32_t)zp->z_expire) {
  			ns_debug(ns_log_default, 1,
! 				 "stale: secondary zone %s expired",
  				zp->z_origin);
  			if (!haveComplained((u_long)zp, (u_long)stale)) {
  				ns_notice(ns_log_default,
! 					  "secondary zone \"%s\" expired",
  					  zp->z_origin);
  			}
  			zp->z_flags &= ~Z_AUTH;
--- 1484,1494 ----
  		if ((int32_t)(tt.tv_sec - zp->z_lastupdate)
  		    > (int32_t)zp->z_expire) {
  			ns_debug(ns_log_default, 1,
! 				 "stale: slave zone %s expired",
  				zp->z_origin);
  			if (!haveComplained((u_long)zp, (u_long)stale)) {
  				ns_notice(ns_log_default,
! 					  "slave zone \"%s\" expired",
  					  zp->z_origin);
  			}
  			zp->z_flags &= ~Z_AUTH;
***************
*** 1501,1507 ****
  		if (zp->z_lastupdate > tt.tv_sec) {
  			if (!haveComplained((u_long)zp, (u_long)stale)) {
  				ns_notice(ns_log_default,
! 					  "secondary zone \"%s\" time warp",
  					  zp->z_origin);
  			}
  			zp->z_flags &= ~Z_AUTH;
--- 1501,1507 ----
  		if (zp->z_lastupdate > tt.tv_sec) {
  			if (!haveComplained((u_long)zp, (u_long)stale)) {
  				ns_notice(ns_log_default,
! 					  "slave zone \"%s\" time warp",
  					  zp->z_origin);
  			}
  			zp->z_flags &= ~Z_AUTH;
diff -c -r src_orig/bin/named/ns_resp.c src/bin/named/ns_resp.c
*** src_orig/bin/named/ns_resp.c	Mon Aug 23 22:34:17 1999
--- src/bin/named/ns_resp.c	Thu Sep  9 23:45:18 1999
***************
*** 2711,2717 ****
  					return (NXDOMAIN);
  				} else {
  					/* XXX:	zone isn't loaded but we're
! 					 *	primary or secondary for it.
  					 *	should we fwd this?
  					 */
  					return (SERVFAIL);
--- 2711,2717 ----
  					return (NXDOMAIN);
  				} else {
  					/* XXX:	zone isn't loaded but we're
! 					 *	master or slave for it.
  					 *	should we fwd this?
  					 */
  					return (SERVFAIL);
diff -c -r src_orig/bin/named/ns_update.c src/bin/named/ns_update.c
*** src_orig/bin/named/ns_update.c	Sun Aug 22 22:38:49 1999
--- src/bin/named/ns_update.c	Thu Sep  9 23:46:03 1999
***************
*** 719,726 ****
  	if (ur->r_class != zclass)
  		return (1);
  
! 	context = ns_ownercontext(type, primary_trans);
! 	if (!ns_nameok(owner, class, zp, primary_trans, context, owner,
  		       inaddr_any))
  		goto refused;
  
--- 719,726 ----
  	if (ur->r_class != zclass)
  		return (1);
  
! 	context = ns_ownercontext(type, master_trans);
! 	if (!ns_nameok(owner, class, zp, master_trans, context, owner,
  		       inaddr_any))
  		goto refused;
  
***************
*** 727,766 ****
  	switch (type) {
  	case ns_t_soa:
  		context = hostname_ctx;
! 		if (!ns_nameok(cp, class, zp, primary_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		cp += strlen(cp) + 1;
  		context = mailname_ctx;
! 		if (!ns_nameok(cp, class, zp, primary_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		break;
  	case ns_t_rp:
  		context = mailname_ctx;
! 		if (!ns_nameok(cp, class, zp, primary_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		cp += strlen(cp) + 1;
  		context = domain_ctx;
! 		if (!ns_nameok(cp, class, zp, primary_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		break;
  	case ns_t_minfo:
  		context = mailname_ctx;
! 		if (!ns_nameok(cp, class, zp, primary_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		cp += strlen(cp) + 1;
  		context = mailname_ctx;
! 		if (!ns_nameok(cp, class, zp, primary_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		break;
  	case ns_t_ns:
  		context = hostname_ctx;
! 		if (!ns_nameok(cp, class, zp, primary_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		break;
--- 727,766 ----
  	switch (type) {
  	case ns_t_soa:
  		context = hostname_ctx;
! 		if (!ns_nameok(cp, class, zp, master_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		cp += strlen(cp) + 1;
  		context = mailname_ctx;
! 		if (!ns_nameok(cp, class, zp, master_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		break;
  	case ns_t_rp:
  		context = mailname_ctx;
! 		if (!ns_nameok(cp, class, zp, master_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		cp += strlen(cp) + 1;
  		context = domain_ctx;
! 		if (!ns_nameok(cp, class, zp, master_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		break;
  	case ns_t_minfo:
  		context = mailname_ctx;
! 		if (!ns_nameok(cp, class, zp, master_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		cp += strlen(cp) + 1;
  		context = mailname_ctx;
! 		if (!ns_nameok(cp, class, zp, master_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		break;
  	case ns_t_ns:
  		context = hostname_ctx;
! 		if (!ns_nameok(cp, class, zp, master_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		break;
***************
*** 769,781 ****
  	case ns_t_mg:
  	case ns_t_mr:
  		context = domain_ctx;
! 		if (!ns_nameok(cp, class, zp, primary_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		break;
  	case ns_t_ptr:
  		context = ns_ptrcontext(owner);
! 		if (!ns_nameok(cp, class, zp, primary_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		break;
--- 769,781 ----
  	case ns_t_mg:
  	case ns_t_mr:
  		context = domain_ctx;
! 		if (!ns_nameok(cp, class, zp, master_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		break;
  	case ns_t_ptr:
  		context = ns_ptrcontext(owner);
! 		if (!ns_nameok(cp, class, zp, master_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		break;
***************
*** 791,797 ****
  		/* Pattern (txt) */
  		cp += strlen(cp) + 1;
  		context = domain_ctx;
! 		if (!ns_nameok(cp, class, zp, primary_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		break;
--- 791,797 ----
  		/* Pattern (txt) */
  		cp += strlen(cp) + 1;
  		context = domain_ctx;
! 		if (!ns_nameok(cp, class, zp, master_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		break;
***************
*** 803,809 ****
  	case ns_t_kx:
  		cp += 2;
  		context = hostname_ctx;
! 		if (!ns_nameok(cp, class, zp, primary_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		break;
--- 803,809 ----
  	case ns_t_kx:
  		cp += 2;
  		context = hostname_ctx;
! 		if (!ns_nameok(cp, class, zp, master_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		break;
***************
*** 810,820 ****
  	case ns_t_px:
  		cp += 2;
  		context = domain_ctx;
! 		if (!ns_nameok(cp, class, zp, primary_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		cp += strlen(cp) + 1;
! 		if (!ns_nameok(cp, class, zp, primary_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  	case ns_t_sig:
--- 810,820 ----
  	case ns_t_px:
  		cp += 2;
  		context = domain_ctx;
! 		if (!ns_nameok(cp, class, zp, master_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		cp += strlen(cp) + 1;
! 		if (!ns_nameok(cp, class, zp, master_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  	case ns_t_sig:
***************
*** 829,841 ****
  		 */
  		cp += 18;
  		context = domain_ctx;
! 		if (!ns_nameok(cp, class, zp, primary_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		break;
  	case ns_t_nxt:
  		context = domain_ctx;
! 		if (!ns_nameok(cp, class, zp, primary_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		break;
--- 829,841 ----
  		 */
  		cp += 18;
  		context = domain_ctx;
! 		if (!ns_nameok(cp, class, zp, master_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		break;
  	case ns_t_nxt:
  		context = domain_ctx;
! 		if (!ns_nameok(cp, class, zp, master_trans, context, owner,
  			       inaddr_any))
  			goto refused;
  		break;
***************
*** 2604,2610 ****
  							    fp, zp, dnbuf,
  							    ttl, type,
  							    domain_ctx,
! 							    primary_trans,
  							    &errmsg);
  					if (s < 0) {
  						err++;
--- 2604,2610 ----
  							    fp, zp, dnbuf,
  							    ttl, type,
  							    domain_ctx,
! 							    master_trans,
  							    &errmsg);
  					if (s < 0) {
  						err++;

-- 
Joe Rhett                                         Chief Technology Officer
JRhett at ISite.Net                                      ISite Services, Inc.

PGP keys and contact information:          http://www.noc.isite.net/Staff/


More information about the bind-workers mailing list