*** CHANGES	1996/10/08 04:50:57	8.47
--- CHANGES	1996/11/11 06:36:40	8.48
***************
*** 1,3 ****
! $Id: CHANGES,v 8.47 1996/10/08 04:50:57 vixie Exp $
  
  	--- 4.9.5-t6b released ---
--- 1,43 ----
! $Id: CHANGES,v 8.48 1996/11/11 06:36:40 vixie Exp $
! 
! 	--- 4.9.5-rel released ---
! 
! 758. [doc]	more Linux libc discussions included.
! 
! 757. [doc]	RFCs 1876, 1995, 1996, 2010, and 2052 now included.
! 
! 756. [contrib]	new version of contrib/host received from author.
! 
! 755. [bug]	nslookup had a latent buffer overrun in initialization.
! 
! 754. [port]	NCR's flavour of SVr4 is now supported.
! 
! 753. [bug]	fp_nquery() could read past end of buffer.  (fix from BIND 8.1)
! 
! 752. [conf]	SENSIBLE_DOTS is now the default.  SGI can use WANT_PIDFILE.
! 
! 751. [doc]	the the BOG had an extra "the" in two places.
! 
! 750. [bug]	erroneous zones weren't resetting z_ftime.
! 
! 749. [bug]	named-xfer's handling of unknown type codes was not robust.
! 		(it's still wrong but now it's wrong more gracefully.)
! 
! 748. [lint]	u_char vs. char changes in db_load.c.
! 
! 747. [bug]	a previous patch had leftovers.
! 
! 746. [bug]	dangling CNAMEs were not handled properly.
! 
! 745. [doc]	shres/sunos/INSTALL, ./INSTALL and man/gethostbyname.3
! 		modernized.
! 
! 744. [bug]	NAPTR replacement domains were being verified as hostnames.
! 
! 743. [port]	hpux10.10 makefile cleanup.
! 
! 742. [bug]	inet_net_pton() was doing bad things to subnets and b'casts.
! 
! 741. [func]	source and owner are now logged with name errors.
  
  	--- 4.9.5-t6b released ---
*** INSTALL.txt	1995/12/24 06:43:57	8.6
--- INSTALL.txt	1996/11/11 06:36:40	8.7
***************
*** 1,3 ****
! $Id: INSTALL,v 8.6 1995/12/24 06:43:57 vixie Exp $
  
  THE FILES:
--- 1,3 ----
! $Id: INSTALL,v 8.7 1996/11/11 06:36:40 vixie Exp $
  
  THE FILES:
***************
*** 8,25 ****
  RUNSON		-- What machines/compilers is BIND known to build on
  TODO		-- Have spare time?  Consider contributing to the project!
  doc/info/*	-- Platform-dependent build hints
  
! HOW TO BUILD:
  -------------
! 4.9.3 is considerably easier to build than previous releases.  These
! are the instructions on how to compile the software.  For information
! on how to create your configuration files (resolv.conf, named.boot, and
! zone files) see the doc/bog directory and/or get "DNS and BIND" by C.
! Liu and P. Albitz from O'Reilly & Associates, Sebastopol, CA, ISBN
! 0-937175-82-X 1992
  
  Note:	If you maintain a BSD or are otherwise running a 4.4BSD-based system
  	and want to integrate BIND into it, check out BSD/README.
  
  1.  (optional) If you are going to compile for multiple platforms, you
  can make a symbolic link tree for each platform to save disk space.  To
--- 8,31 ----
  RUNSON		-- What machines/compilers is BIND known to build on
  TODO		-- Have spare time?  Consider contributing to the project!
+ BSD/*           -- How to integrate BIND into a 4.4BSD or 4.4BSD-Lite
+ contrib/*       -- Useful BIND-related contributions
  doc/info/*	-- Platform-dependent build hints
+ doc/*           -- other RFCs, drafts, papers and
  
! INTRODUCTION:
  -------------
! BIND used to be extremely difficult to build.  That changed around
! version 4.9.3.  These are the instructions on how to compile the
! software.  For information on how to create your configuration files
! (resolv.conf, named.boot, and zone files) see the doc/bog directory for
! the complete "BIND Operations Guide".  You might also consider getting
! "DNS and BIND" by C.  Liu and P.  Albitz from O'Reilly & Associates,
! Sebastopol, CA, ISBN 0-937175-82-X 1992
  
  Note:	If you maintain a BSD or are otherwise running a 4.4BSD-based system
  	and want to integrate BIND into it, check out BSD/README.
  
+ BUILDING & INSTALLING:
+ ----------------------
  1.  (optional) If you are going to compile for multiple platforms, you
  can make a symbolic link tree for each platform to save disk space.  To
***************
*** 31,43 ****
  	mv file file.tmp ; cp file.tmp file ; rm file.tmp
  
! 2.  Edit "conf/options.h" and turn on any options that you want.  The
  defaults are pretty reasonable for most installations.
  
! 3.  Edit "Makefile".  Go to the section that describes your operating
! system and uncoment it out.  Add any other variables (for example,
! I added a line "DISTHELP=/usr/local/lib".)  If in doubt, use the
! default!
  
! 4.  "make" should build everything.  Consider putting "./bin" in your
  path if "make depend" fails and you think bin/mkdep will help you out.
  
--- 37,62 ----
  	mv file file.tmp ; cp file.tmp file ; rm file.tmp
  
! 2. (optional) If you have a typical site, you should find yourself only
! editing Makefile and conf/options.h.  Make backups of them now:
! 
! 	mv Makefile Makefile.tmp
! 	cp Makefile.tmp Makefile ; rm Makefile.tmp
! 	chmod u+w Makefile
! 
! 	mv conf/options.h conf/options.h.tmp
! 	cp conf/options.h.tmp conf/options.h ; rm conf/options.h.tmp
! 	chmod u+w conf/options.h
! 
! 3.  Edit "conf/options.h" and turn on any options that you want.  The
  defaults are pretty reasonable for most installations.
  
! 4.  Edit "Makefile".  The default build parameters are given for 4.4 BSD. 
! They should be overridden (not edited!).  Do this by going to the
! section that describes your operating system and uncoment the
! appropriate lines.  Add any other variables (for example, some people
! add "DISTHELP=/usr/local/lib".)  If in doubt, use the default!  Read
! the comments carefully!
  
! 5.  "make" should build everything.  Consider putting "./bin" in your
  path if "make depend" fails and you think bin/mkdep will help you out.
  
***************
*** 50,74 ****
  	*** NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE ***
  
! 5.  "make install" will install everything.  You might first do
  "make -n install" to see what commands would be executed by "make install"
  to make sure you understand where everything is about to be installed.
  
! 6.  (optional, SunOS 4.1.x/NetBSD-1.x/Solaris 2.x only): You can integrate
! the new resolver (client-side) code into the shared libraries of your
! operating system so that all dynamicly linked programs take advantage of
! the new resolver.  Read shres/<osname>/INSTALL to find out how to do it.
  
  
  
  HOW TO GET HELP:
! ---------------- 
! If you have any problems or fixes send them to
!         bind@uunet.uu.net
!  
! To be added to that mailing list, send mail to
          bind-request@uunet.uu.net
  
  
  
! This INSTALL was originally written on 15Jul94 by Tom Limoncelli <tal@plts.org>
! Minor changes 23Dec95 by Christopher Davis <ckd@kei.com>
--- 69,97 ----
  	*** NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE ***
  
! 6.  "make install" will install everything.  You might first do
  "make -n install" to see what commands would be executed by "make install"
  to make sure you understand where everything is about to be installed.
  
! 7.  (optional, SunOS 4, SunOS 5, NetBSD-1.x, IRIX, Linix only): You can
! integrate the new resolver (client-side) code into the shared libraries
! of your operating system so that all dynamicly linked programs take
! advantage of the new resolver.  Read shres/<osname>/INSTALL to find out
! how to do it.
  
  
  
  HOW TO GET HELP:
! ----------------
! The "bind@uunet.uu.net" mailing list was created especially for people
! to talk about and ask questions about installation, maintenance, etc.
! It is highly recommended that you first help yourself by reading
! the BOG (doc/bog) or a book on DNS and BIND.
! 
! To be added to this mailing list, send mail to
          bind-request@uunet.uu.net
  
  
  
! This INSTALL was originally written on 15Jul94 by Tom Limoncelli
! <tal@bell-labs.org> Minor changes 23Dec95 by Christopher Davis
! <ckd@kei.com> and then by Tom Limoncelli 16Oct96.
*** Makefile	1996/10/08 04:50:57	8.46
--- Makefile	1996/11/11 06:36:40	8.47
***************
*** 2,6 ****
  # vixie@decwrl December, 1992 [original]
  #
! # $Id: Makefile,v 8.46 1996/10/08 04:50:57 vixie Exp $
  
  ## ++Copyright++ 1989
--- 2,6 ----
  # vixie@decwrl December, 1992 [original]
  #
! # $Id: Makefile,v 8.47 1996/11/11 06:36:40 vixie Exp $
  
  ## ++Copyright++ 1989
***************
*** 57,61 ****
  ## --Copyright--
  
! VER = 4.9.5-T6B
  SHELL = /bin/sh
  MAKE = make
--- 57,61 ----
  ## --Copyright--
  
! VER = 4.9.5-REL
  SHELL = /bin/sh
  MAKE = make
***************
*** 157,166 ****
  #PS = ps -p
  #IOT = IOT
- # shared libresolv.o options below.
- # they could work under irix6, if the cmplr didn't change alot
- #SHRES = shres/irix
- #SHCC = $(CC) $(CPPFLAGS)
- #SHLD = ld -shared
- #RES = $(SHRES)/libresolv.so
  
  #(DEC AXP OSF/1 Version 3.0 and after)
--- 157,160 ----
***************
*** 221,224 ****
--- 215,224 ----
  #KMEM = /dev/kmem
  #UDPSUM = udpcksum
+ # shared libresolv.o options below.
+ # they could work under irix6, if the cmplr didn't change alot
+ #SHRES = shres/irix
+ #SHCC = $(CC) $(CPPFLAGS)
+ #SHLD = ld -shared
+ #RES = $(SHRES)/libresolv.so
  
  #(sunos4.x)
***************
*** 367,371 ****
  #CC = cc $(CPPFLAGS)
  #CDEBUG = -g
! #CPPFLAGS =
  #LEX = lex
  #LIBS = -ll
--- 367,371 ----
  #CC = cc $(CPPFLAGS)
  #CDEBUG = -g
! #CPPFLAGS = -Dconst=
  #LEX = lex
  #LIBS = -ll
***************
*** 380,384 ****
  #MANROFF = cat
  #PS = ps -p
! #INSTALL_COMPAT = install
  #(bsdinstall.sh is in conf/)
  
--- 380,384 ----
  #MANROFF = cat
  #PS = ps -p
! #INSTALL_COMPAT = install-install
  #(bsdinstall.sh is in conf/)
  
***************
*** 732,735 ****
--- 732,801 ----
  #PS = ps -p
  #IOT = IOT
+ 
+ #NCR System Vr4.3 3.x
+ #also, use 'make install' at your own risk.
+ #PIDDIR = /etc/inet
+ #LEX = lex
+ #CC = cc $(CPPFLAGS)
+ #CDEBUG = -g
+ #CPPFLAGS = -DSVR4 -Hnocopyr -DPOSIX_SIGNALS -DNO_SA_LEN -DNCR -w
+ #INDOT = in.
+ #XFER_INDOT = in.
+ #LIBS = -ll -lnsl -lsocket
+ #DESTEXEC = /usr/sbin
+ #LDS = :
+ #RANLIB = :
+ #ARPREF = `lorder
+ #ARSUFF = | tsort`
+ #CATEXT = $$$$N
+ #PS = ps -p
+ #IOT = IOT
+ 
+ #NCR System Vr4.3-3.0
+ #also, use 'make install' at your own risk.
+ #PIDDIR = /etc/inet
+ #LEX = lex
+ #CC = cc $(CPPFLAGS)
+ #CDEBUG = -g
+ #CPPFLAGS = -DSVR4 -Hnocopyr -DPOSIX_SIGNALS -DNO_SA_LEN -DNCR -w
+ #INDOT = in.
+ #XFER_INDOT = in.
+ #LIBS = -ll -lnsl -lsocket
+ #DESTEXEC = /usr/sbin
+ #LDS = :
+ #RANLIB = :
+ #ARPREF = `lorder
+ #ARSUFF = | tsort`
+ #CATEXT = $$$$N
+ #PS = ps -p
+ #IOT = IOT
+ #SHCC = cc $(CPPPFLAGS)
+ #PIC = -Kpic
+ #SHLD = cc -G
+ #SHRES = shres/ncr
+ 
+ #NCR System Vr4.3-2.03
+ #also, use 'make install' at your own risk.
+ #PIDDIR = /etc
+ #LEX = lex
+ #CC = cc $(CPPFLAGS)
+ #CDEBUG = -g
+ #CPPFLAGS = -DSVR4 -Hnocopyr -DPOSIX_SIGNALS -DNO_SA_LEN -DNCR -w
+ #INDOT =
+ #XFER_INDOT =
+ #LIBS = -ll -lnsl -lsocket
+ #DESTSBIN = /usr/etc
+ #DESTEXEC = /usr/etc
+ #LDS = :
+ #RANLIB = :
+ #ARPREF = `lorder
+ #ARSUFF = | tsort`
+ #CATEXT = $$$$N
+ #PS = ps -p
+ #IOT = IOT
+ #SHCC = cc $(CPPPFLAGS)
+ #PIC = -Kpic
+ #SHLD = cc -G
+ #SHRES = shres/ncr
  
  #(UXP/DS)
*** conf/options.h	1996/08/27 17:53:12	8.11
--- conf/options.h	1996/11/11 06:36:43	8.12
***************
*** 2,6 ****
   * vix 28mar92 [moved out of the Makefile because they were getting too big]
   *
!  * $Id: options.h,v 8.11 1996/08/27 17:53:12 vixie Exp $
   */
  
--- 2,6 ----
   * vix 28mar92 [moved out of the Makefile because they were getting too big]
   *
!  * $Id: options.h,v 8.12 1996/11/11 06:36:43 vixie Exp $
   */
  
***************
*** 94,98 ****
  #define WANT_PIDFILE	/* if you want the named.pid file (ucb/arc) */
  #define DOTTED_SERIAL	/* if you want to be able to specify dotted serial#s */
! /*#define SENSIBLE_DOTS	/* if you want dotted serial#s to make numeric sense */
  #define NCACHE		/* negative caching (anant@isi.edu) */
  /*#define VALIDATE	/* validation procedure (anant@isi.edu) (BUGGY!) */
--- 94,98 ----
  #define WANT_PIDFILE	/* if you want the named.pid file (ucb/arc) */
  #define DOTTED_SERIAL	/* if you want to be able to specify dotted serial#s */
! #define SENSIBLE_DOTS	/* if you want dotted serial#s to make numeric sense */
  #define NCACHE		/* negative caching (anant@isi.edu) */
  /*#define VALIDATE	/* validation procedure (anant@isi.edu) (BUGGY!) */
***************
*** 148,159 ****
  #ifdef DMALLOC
  # include "dmalloc.h"
- #endif
- 
- /* systems with killall(1M) don't need this
-  */
- #ifdef __sgi
- # ifdef WANT_PIDFILE
- #  undef WANT_PIDFILE
- # endif
  #endif
  
--- 148,151 ----
*** doc/bog/files.me	1996/09/22 00:12:59	8.9
--- doc/bog/files.me	1996/11/11 06:36:47	8.10
***************
*** 251,255 ****
  .)b
  in the bootfile.  If this option is used, then you must specify forwarders.
! When in slave mode, the server will forward each query to each of the the
  forwarders until an answer is found or the list of forwarders is exhausted.
  The server will not try to contact any remote name server other than those
--- 251,255 ----
  .)b
  in the bootfile.  If this option is used, then you must specify forwarders.
! When in slave mode, the server will forward each query to each of the
  forwarders until an answer is found or the list of forwarders is exhausted.
  The server will not try to contact any remote name server other than those
***************
*** 830,834 ****
                   The TXT and WKS RR types have not been widely used by
                   Internet sites; as a result, an application cannot rely
!                  on the the existence of a TXT or WKS RR in most
                   domains.
  .)l
--- 830,834 ----
                   The TXT and WKS RR types have not been widely used by
                   Internet sites; as a result, an application cannot rely
!                  on the existence of a TXT or WKS RR in most
                   domains.
  .)l
*** man/gethostbyname.3	1995/12/06 20:34:35	8.3
--- man/gethostbyname.3	1996/11/11 06:36:49	8.4
***************
*** 104,109 ****
  When using the nameserver,
  .I gethostbyname
! will search for the named host in the current domain and its parents
! unless the name ends in a dot.
  If the name contains no dot, and if the environment variable ``HOSTALAIASES''
  contains the name of an alias file, the alias file will first be searched
--- 104,111 ----
  When using the nameserver,
  .I gethostbyname
! will search for the named host in each parent domain given in the ``search''
! directive of
! .IR resolv.conf (5)
! unless the name contains a dot.
  If the name contains no dot, and if the environment variable ``HOSTALAIASES''
  contains the name of an alias file, the alias file will first be searched
*** named/db_load.c	1996/10/08 04:51:03	8.29
--- named/db_load.c	1996/11/11 06:36:49	8.30
***************
*** 1,5 ****
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)db_load.c	4.38 (Berkeley) 3/2/91";
! static char rcsid[] = "$Id: db_load.c,v 8.29 1996/10/08 04:51:03 vixie Exp $";
  #endif /* not lint */
  
--- 1,5 ----
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)db_load.c	4.38 (Berkeley) 3/2/91";
! static char rcsid[] = "$Id: db_load.c,v 8.30 1996/11/11 06:36:49 vixie Exp $";
  #endif /* not lint */
  
***************
*** 116,119 ****
--- 116,120 ----
  					 enum transport transport,
  					 enum context context,
+ 					 const char *owner,
  					 const char *filename, int lineno));
  static int		getmlword __P((char *, int, FILE *, int));
***************
*** 143,147 ****
  #define MAKENAME_OK(N)	if (!makename_ok(N, origin, class, \
  					 transport, context, \
! 					 filename, lineno)) { \
  				errs++; \
  				sprintf(buf, "bad name \"%s\"", N); \
--- 144,148 ----
  #define MAKENAME_OK(N)	if (!makename_ok(N, origin, class, \
  					 transport, context, \
! 					 domain, filename, lineno)) { \
  				errs++; \
  				sprintf(buf, "bad name \"%s\"", N); \
***************
*** 357,361 ****
  
  			context = ns_ownercontext(type, transport);
! 			if (!ns_nameok(domain, class, transport, context)) {
  				errs++;
  				syslog(LOG_NOTICE,
--- 358,363 ----
  
  			context = ns_ownercontext(type, transport);
! 			if (!ns_nameok(domain, class, transport, context,
! 				       domain, inaddr_any)) {
  				errs++;
  				syslog(LOG_NOTICE,
***************
*** 424,428 ****
  				cp = data + strlen((char *)data) + 1;
  				if (!getword((char *)cp,
! 					     (sizeof data) - (cp - data),
  					     fp, 1))
  					goto err;
--- 426,431 ----
  				cp = data + strlen((char *)data) + 1;
  				if (!getword((char *)cp,
! 					     (sizeof data) - 
! 					     (cp - (char *)data),
  					     fp, 1))
  					goto err;
***************
*** 434,438 ****
  				cp += strlen((char *)cp) + 1;
  				if (type != T_SOA) {
! 					n = cp - data;
  					break;
  				}
--- 437,441 ----
  				cp += strlen((char *)cp) + 1;
  				if (type != T_SOA) {
! 					n = cp - (char *)data;
  					break;
  				}
***************
*** 515,519 ****
  				n = (u_int32_t) zp->z_minimum;
  				PUTLONG (n, cp);
! 				n = cp - data;
  				if (multiline) {
  					if (getnonblank(fp, filename) != ')')
--- 518,522 ----
  				n = (u_int32_t) zp->z_minimum;
  				PUTLONG (n, cp);
! 				n = cp - (char *)data;
  				if (multiline) {
  					if (getnonblank(fp, filename) != ')')
***************
*** 705,709 ****
  					goto err;
  				(void) strcpy((char *)cp, (char *)buf);
! 				context = hostname_ctx;
  				MAKENAME_OK(cp);
  				/* advance pointer to end of data */
--- 708,712 ----
  					goto err;
  				(void) strcpy((char *)cp, (char *)buf);
! 				context = domain_ctx;
  				MAKENAME_OK(cp);
  				/* advance pointer to end of data */
***************
*** 711,715 ****
  
  				/* now save length */
! 				n = (cp - data);
  				break;
  
--- 714,718 ----
  
  				/* now save length */
! 				n = (cp - (char *)data);
  				break;
  
***************
*** 749,753 ****
  
  				/* now save length */
! 				n = (cp - data);
  				break;
  
--- 752,756 ----
  
  				/* now save length */
! 				n = (cp - (char *)data);
  				break;
  
***************
*** 779,783 ****
  
  				/* now save length */
! 				n = (cp - data);
  				break;
  
--- 782,786 ----
  
  				/* now save length */
! 				n = (cp - (char *)data);
  				break;
  
***************
*** 889,893 ****
  					/* Convert from BASE64 to binary. */
  					klen = b64_pton(buf, (u_char*)cp,
! 						    sizeof data - (cp - data));
  					if (klen < 0)
  						goto err;
--- 892,897 ----
  					/* Convert from BASE64 to binary. */
  					klen = b64_pton(buf, (u_char*)cp,
! 						    sizeof data - 
! 						    (cp - (char *)data));
  					if (klen < 0)
  						goto err;
***************
*** 895,899 ****
  
  				/* set total length */
! 				n = cp + klen - data;
  
  			/*
--- 899,903 ----
  
  				/* set total length */
! 				n = cp + klen - (char *)data;
  
  			/*
***************
*** 1171,1179 ****
  		cp = &data[i];
  		strcpy(cp,buf);
! 		/*
! 		 * XXX, should we be using MAKENAME_OK here?? 
! 		 * its "break;" won't do the right thing tho.
! 		 */
! 		makename(cp, origin);
  		i += strlen(cp) + 1;
  
--- 1175,1180 ----
  		cp = &data[i];
  		strcpy(cp,buf);
! 		context = domain_ctx;
! 		MAKENAME_OK(cp);
  		i += strlen(cp) + 1;
  
***************
*** 1410,1415 ****
  		       errs ? "rejected due to errors" : "loaded",
  		       (u_long)zp->z_serial);
! 	if (errs)
  		zp->z_flags |= Z_DB_BAD;
  #ifdef BIND_NOTIFY
  	/* XXX: this needs to be delayed, both according to the spec, and
--- 1411,1418 ----
  		       errs ? "rejected due to errors" : "loaded",
  		       (u_long)zp->z_serial);
! 	if (errs) {
  		zp->z_flags |= Z_DB_BAD;
+ 		zp->z_ftime = 0;
+ 	}
  #ifdef BIND_NOTIFY
  	/* XXX: this needs to be delayed, both according to the spec, and
***************
*** 1852,1856 ****
  
  static int
! makename_ok(name, origin, class, transport, context, filename, lineno)
  	char *name;
  	const char *origin;
--- 1855,1859 ----
  
  static int
! makename_ok(name, origin, class, transport, context, owner, filename, lineno)
  	char *name;
  	const char *origin;
***************
*** 1858,1861 ****
--- 1861,1865 ----
  	enum transport transport;
  	enum context context;
+ 	const char *owner;
  	const char *filename;
  	int lineno;
***************
*** 1864,1868 ****
  
  	makename(name, origin);
! 	if (!ns_nameok(name, class, transport, context)) {
  		syslog(LOG_INFO, "%s:%d: database naming error\n",
  		       filename, lineno);
--- 1868,1872 ----
  
  	makename(name, origin);
! 	if (!ns_nameok(name, class, transport, context, owner, inaddr_any)) {
  		syslog(LOG_INFO, "%s:%d: database naming error\n",
  		       filename, lineno);
*** named/named-xfer.c	1996/10/08 04:51:03	8.19
--- named/named-xfer.c	1996/11/11 06:36:49	8.20
***************
*** 93,97 ****
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)named-xfer.c	4.18 (Berkeley) 3/7/91";
! static char rcsid[] = "$Id: named-xfer.c,v 8.19 1996/10/08 04:51:03 vixie Exp $";
  #endif /* not lint */
  
--- 93,97 ----
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)named-xfer.c	4.18 (Berkeley) 3/7/91";
! static char rcsid[] = "$Id: named-xfer.c,v 8.20 1996/11/11 06:36:49 vixie Exp $";
  #endif /* not lint */
  
***************
*** 447,464 ****
  		exit(XFER_UPTODATE);
  
  	case XFER_TIMEOUT:
- #ifdef DEBUG
- 		if (!debug)
- #endif
- 		    (void) unlink(tmpname);
- 		exit(XFER_TIMEOUT);	/* servers not reachable exit */
- 
  	case XFER_FAIL:
- 	default:
  #ifdef DEBUG
  		if (!debug)
  #endif
  		    (void) unlink(tmpname);
! 		exit(XFER_FAIL);	/* yuck exit */
  	}
  	/*NOTREACHED*/
--- 447,460 ----
  		exit(XFER_UPTODATE);
  
+ 	default:
+ 		result = XFER_FAIL;
+ 		/* fall through */
  	case XFER_TIMEOUT:
  	case XFER_FAIL:
  #ifdef DEBUG
  		if (!debug)
  #endif
  		    (void) unlink(tmpname);
! 		exit(result);	/* error or timeout */
  	}
  	/*NOTREACHED*/
***************
*** 909,930 ****
  			if (zp->z_type == Z_STUB) {
  				ancount = ntohs(hp->ancount);
! 				for (cnt = 0 ; cnt < ancount ; cnt++) {
! 
  					n = print_output(buf, bufsize, cp);
  					cp += n;
  				}
! 				if (hp->nscount) {
  					/* we should not get here */
  					ancount = ntohs(hp->nscount);
  					for (cnt = 0 ; cnt < ancount ; cnt++) {
  					    n = print_output(buf, bufsize, cp);
! 						cp += n;
  					}
  				}
  				ancount = ntohs(hp->arcount);
! 				for (cnt = 0 ; cnt < ancount ; cnt ++) {
  					n = print_output(buf, bufsize, cp);
  					cp += n;
  				}
  				if (cp != eom) {
  					syslog(LOG_INFO,
--- 905,936 ----
  			if (zp->z_type == Z_STUB) {
  				ancount = ntohs(hp->ancount);
! 				for (n = cnt = 0 ; cnt < ancount ; cnt++) {
  					n = print_output(buf, bufsize, cp);
+ 					if (n < 0)
+ 						break;
  					cp += n;
  				}
! 				if (n >= 0 && hp->nscount) {
  					/* we should not get here */
  					ancount = ntohs(hp->nscount);
  					for (cnt = 0 ; cnt < ancount ; cnt++) {
  					    n = print_output(buf, bufsize, cp);
! 					    if (n < 0)
! 						break;
! 					    cp += n;
  					}
  				}
  				ancount = ntohs(hp->arcount);
! 				for (cnt = 0 ; n >= 0 && cnt < ancount ; cnt++) {
  					n = print_output(buf, bufsize, cp);
  					cp += n;
  				}
+ 				if (n < 0) {
+ 					syslog(LOG_INFO,
+ 			"print_output: unparseable answer (%d), zone %s",
+ 						hp->rcode, zp->z_origin);
+ 					error++;
+ 					break;
+ 				}
  				if (cp != eom) {
  					syslog(LOG_INFO,
***************
*** 938,945 ****
  #endif /*STUBS*/
  				ancount = ntohs(hp->ancount);
! 				for (cnt = 0; cnt < ancount; cnt++) {
  					n = print_output(buf, bufsize, cp);
  					cp += n;
  				}
  				if (cp != eom) {
  					syslog(LOG_INFO,
--- 944,960 ----
  #endif /*STUBS*/
  				ancount = ntohs(hp->ancount);
! 				for (n = cnt = 0; cnt < ancount; cnt++) {
  					n = print_output(buf, bufsize, cp);
+ 					if (n < 0)
+ 						break;
  					cp += n;
  				}
+ 				if (n < 0) {
+ 					syslog(LOG_INFO,
+ 			"print_output: unparseable answer (%d), zone %s",
+ 						hp->rcode, zp->z_origin);
+ 					error++;
+ 					break;
+ 				}
  				if (cp != eom) {
  					syslog(LOG_INFO,
***************
*** 1078,1082 ****
  	(void) sigvec(SIGALRM, &osv, (struct sigvec *)0);
  #endif
! 	if (error)
  		return (XFER_TIMEOUT);
  	return (XFER_FAIL);
--- 1093,1097 ----
  	(void) sigvec(SIGALRM, &osv, (struct sigvec *)0);
  #endif
! 	if (!error)
  		return (XFER_TIMEOUT);
  	return (XFER_FAIL);
***************
*** 1314,1318 ****
  		/* Grab weight and port. */
  		bcopy(cp, data, INT16SZ*2);
! 		cp1 = data + INT16SZ*2;
  		cp += INT16SZ*2;
   
--- 1329,1333 ----
  		/* Grab weight and port. */
  		bcopy(cp, data, INT16SZ*2);
! 		cp1 = (u_char *) (data + INT16SZ*2);
  		cp += INT16SZ*2;
   
***************
*** 1850,1853 ****
--- 1865,1871 ----
  
  	default:
+ 		cp1 = cp + n;
+ 		while (cp < cp1)
+ 			fprintf(dbfp, "0x%02.2X ", *cp++ & 0xFF);
  		(void) fprintf(dbfp, "???\n");
  	}
*** named/ns_func.h	1996/09/22 00:13:10	8.12
--- named/ns_func.h	1996/11/11 06:36:49	8.13
***************
*** 1,5 ****
  /* ns_func.h - declarations for ns_*.c's externally visible functions
   *
!  * $Id: ns_func.h,v 8.12 1996/09/22 00:13:10 vixie Exp $
   */
  
--- 1,5 ----
  /* ns_func.h - declarations for ns_*.c's externally visible functions
   *
!  * $Id: ns_func.h,v 8.13 1996/11/11 06:36:49 vixie Exp $
   */
  
***************
*** 128,132 ****
  extern enum context	ns_ownercontext __P((int type, enum transport));
  extern int		ns_nameok __P((const char *name, int class,
! 				       enum transport, enum context));
  extern int		ns_wildcard __P((const char *name));
  /* --from ns_init.c-- */
--- 128,134 ----
  extern enum context	ns_ownercontext __P((int type, enum transport));
  extern int		ns_nameok __P((const char *name, int class,
! 				       enum transport, enum context,
! 				       const char *owner,
! 				       struct in_addr source));
  extern int		ns_wildcard __P((const char *name));
  /* --from ns_init.c-- */
*** named/ns_glob.h	1996/08/27 08:33:23	8.10
--- named/ns_glob.h	1996/11/11 06:36:49	8.11
***************
*** 1,5 ****
  /*
   *	from ns.h	4.33 (Berkeley) 8/23/90
!  *	$Id: ns_glob.h,v 8.10 1996/08/27 08:33:23 vixie Exp $
   */
  
--- 1,5 ----
  /*
   *	from ns.h	4.33 (Berkeley) 8/23/90
!  *	$Id: ns_glob.h,v 8.11 1996/11/11 06:36:49 vixie Exp $
   */
  
***************
*** 281,282 ****
--- 281,284 ----
  #endif
  ;
+ 
+ DECL	struct in_addr		inaddr_any;	/* Inits to 0.0.0.0 */
*** named/ns_init.c	1996/09/28 06:51:05	8.21
--- named/ns_init.c	1996/11/11 06:36:49	8.22
***************
*** 1,5 ****
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)ns_init.c	4.38 (Berkeley) 3/21/91";
! static char rcsid[] = "$Id: ns_init.c,v 8.21 1996/09/28 06:51:05 vixie Exp $";
  #endif /* not lint */
  
--- 1,5 ----
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)ns_init.c	4.38 (Berkeley) 3/21/91";
! static char rcsid[] = "$Id: ns_init.c,v 8.22 1996/11/11 06:36:49 vixie Exp $";
  #endif /* not lint */
  
***************
*** 983,994 ****
  
  int
! ns_nameok(name, class, transport, context)
  	const char *name;
  	int class;
  	enum transport transport;
  	enum context context;
  {
- 	int ok = 1;
  	enum severity severity = checkname_severity[transport];
  
  	if (severity == ignore)
--- 983,996 ----
  
  int
! ns_nameok(name, class, transport, context, owner, source)
  	const char *name;
  	int class;
  	enum transport transport;
  	enum context context;
+ 	struct in_addr source;
+ 	const char *owner;
  {
  	enum severity severity = checkname_severity[transport];
+ 	int ok;
  
  	if (severity == ignore)
***************
*** 1011,1022 ****
  	}
  	if (!ok) {
  		syslog((transport == response_trans) ? LOG_INFO : LOG_NOTICE,
! 		       "%s name \"%s %s\" (%s) is invalid - %s",
  		       context_strings[context],
! 		       name, p_class(class),
! 		       transport_strings[transport],
  		       (severity == fail) ? "rejecting" : "proceeding anyway");
  		if (severity == warn)
  			ok = 1;
  	}
  	return (ok);
--- 1013,1047 ----
  	}
  	if (!ok) {
+ 		char *s, *o;
+ 
+ 		if (source.s_addr == INADDR_ANY)
+ 			s = strdup(transport_strings[transport]);
+ 		else {
+ 			s = malloc(strlen(transport_strings[transport]) +
+ 				   sizeof " from [000.000.000.000]");
+ 			if (s)
+ 				sprintf(s, "%s from [%s]",
+ 					transport_strings[transport],
+ 					inet_ntoa(source));
+ 		}
+ 		if (strcasecmp(owner, name) == 0)
+ 			o = strdup("");
+ 		else {
+ 			const char *t = (*owner == '\0') ? "." : owner;
+ 
+ 			o = malloc(strlen(t) + sizeof " (owner \"\")");
+ 			if (o)
+ 				sprintf(o, " (owner \"%s\")", t);
+ 		}
  		syslog((transport == response_trans) ? LOG_INFO : LOG_NOTICE,
! 		       "%s name \"%s\"%s %s (%s) is invalid - %s",
  		       context_strings[context],
! 		       name, o != NULL ? o : "[malloc failed]", p_class(class),
! 		       s != NULL ? s : "[malloc failed]",
  		       (severity == fail) ? "rejecting" : "proceeding anyway");
  		if (severity == warn)
  			ok = 1;
+ 		if (s)
+ 			free(s);
  	}
  	return (ok);
*** named/ns_main.c	1996/10/08 04:51:03	8.22
--- named/ns_main.c	1996/11/11 06:36:49	8.23
***************
*** 1,5 ****
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)ns_main.c	4.55 (Berkeley) 7/1/91";
! static char rcsid[] = "$Id: ns_main.c,v 8.22 1996/10/08 04:51:03 vixie Exp $";
  #endif /* not lint */
  
--- 1,5 ----
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)ns_main.c	4.55 (Berkeley) 7/1/91";
! static char rcsid[] = "$Id: ns_main.c,v 8.23 1996/11/11 06:36:49 vixie Exp $";
  #endif /* not lint */
  
***************
*** 960,964 ****
  #if defined(AF_LINK) && \
  	!defined(RISCOS_BSD) && !defined(M_UNIX) && \
! 	!defined(sgi) && !defined(sun)
  #define my_max(a, b) (a > b ? a : b)
  #define my_size(p)	my_max((p).sa_len, sizeof(p))
--- 960,964 ----
  #if defined(AF_LINK) && \
  	!defined(RISCOS_BSD) && !defined(M_UNIX) && \
! 	!defined(sgi) && !defined(sun) && !defined(NO_SA_LEN)
  #define my_max(a, b) (a > b ? a : b)
  #define my_size(p)	my_max((p).sa_len, sizeof(p))
*** named/ns_resp.c	1996/10/08 04:51:03	8.35
--- named/ns_resp.c	1996/11/11 06:36:49	8.36
***************
*** 1,5 ****
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)ns_resp.c	4.65 (Berkeley) 3/3/91";
! static char rcsid[] = "$Id: ns_resp.c,v 8.35 1996/10/08 04:51:03 vixie Exp $";
  #endif /* not lint */
  
--- 1,5 ----
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)ns_resp.c	4.65 (Berkeley) 3/3/91";
! static char rcsid[] = "$Id: ns_resp.c,v 8.36 1996/11/11 06:36:49 vixie Exp $";
  #endif /* not lint */
  
***************
*** 291,295 ****
  		GETSHORT(qclass, cp);
  		if (!ns_nameok(qname, qclass, response_trans,
! 			       ns_ownercontext(qtype, response_trans))) {
  			formerrmsg = badNameFound;
  			goto formerr;
--- 291,296 ----
  		GETSHORT(qclass, cp);
  		if (!ns_nameok(qname, qclass, response_trans,
! 			       ns_ownercontext(qtype, response_trans),
! 			       qname, from_addr.sin_addr)) {
  			formerrmsg = badNameFound;
  			goto formerr;
***************
*** 577,581 ****
  		}
  		if (!ns_nameok(name, class, response_trans,
! 			       ns_ownercontext(type, response_trans))) {
  			formerrmsg = badNameFound;
  			goto formerr;
--- 578,583 ----
  		}
  		if (!ns_nameok(name, class, response_trans,
! 			       ns_ownercontext(type, response_trans),
! 			       name, from_addr.sin_addr)) {
  			formerrmsg = badNameFound;
  			goto formerr;
***************
*** 645,649 ****
  			}
  			if (!ns_nameok(name, class, response_trans,
! 				       ns_ownercontext(type, response_trans))){
  				formerrmsg = badNameFound;
  				goto formerr;
--- 647,652 ----
  			}
  			if (!ns_nameok(name, class, response_trans,
! 				       ns_ownercontext(type, response_trans),
! 				       name, from_addr.sin_addr)) {
  				formerrmsg = badNameFound;
  				goto formerr;
***************
*** 917,926 ****
  		/* we have an authoritative NO */
  		dprintf(3, (ddt, "resp: leaving auth NO\n"));
- 		if (qp->q_cmsglen) {
- 			/* XXX - what about additional CNAMEs in the chain? */
- 			msg = qp->q_cmsg;
- 			msglen = qp->q_cmsglen;
- 			hp = (HEADER *)msg;
- 		}
  #ifdef NCACHE
  		/* answer was NO */
--- 920,923 ----
***************
*** 930,933 ****
--- 927,936 ----
  		}
  #endif /*NCACHE*/
+ 		if (qp->q_cmsglen) {
+ 			/* XXX - what about additional CNAMEs in the chain? */
+ 			msg = qp->q_cmsg;
+ 			msglen = qp->q_cmsglen;
+ 			hp = (HEADER *)msg;
+ 		}
  		goto return_msg;
  	}
***************
*** 1288,1292 ****
  	GETSHORT(dlen, cp);
  	if (!ns_nameok(dname, class, response_trans,
! 		       ns_ownercontext(type, response_trans))) {
  		hp->rcode = FORMERR;
  		return (-1);
--- 1291,1296 ----
  	GETSHORT(dlen, cp);
  	if (!ns_nameok(dname, class, response_trans,
! 		       ns_ownercontext(type, response_trans),
! 		       dname, from_addr.sin_addr)) {
  		hp->rcode = FORMERR;
  		return (-1);
***************
*** 1351,1357 ****
  		}
  		if (!ns_nameok((char *)data, class, response_trans,
! 			       (type == T_PTR)
! 			       ? ns_ptrcontext(dname)
! 			       : domain_ctx)) {
  			hp->rcode = FORMERR;
  			return (-1);
--- 1355,1360 ----
  		}
  		if (!ns_nameok((char *)data, class, response_trans,
! 			       type == T_PTR ?ns_ptrcontext(dname) :domain_ctx,
! 			       dname, from_addr.sin_addr)) {
  			hp->rcode = FORMERR;
  			return (-1);
***************
*** 1376,1380 ****
  			return (-1);
  		}
! 		if (!ns_nameok((char *)data, class, response_trans, context)) {
  			hp->rcode = FORMERR;
  			return (-1);
--- 1379,1384 ----
  			return (-1);
  		}
! 		if (!ns_nameok((char *)data, class, response_trans, context,
! 			       dname, from_addr.sin_addr)) {
  			hp->rcode = FORMERR;
  			return (-1);
***************
*** 1394,1398 ****
  		else
  			context = mailname_ctx;
! 		if (!ns_nameok((char *)cp1, class, response_trans, context)) {
  			hp->rcode = FORMERR;
  			return (-1);
--- 1398,1403 ----
  		else
  			context = mailname_ctx;
! 		if (!ns_nameok((char *)cp1, class, response_trans, context,
! 			       dname, from_addr.sin_addr)) {
  			hp->rcode = FORMERR;
  			return (-1);
***************
*** 1441,1445 ****
  		}
  		if (!ns_nameok((char *)cp1, class, response_trans,
! 			       hostname_ctx)) {
  			hp->rcode = FORMERR;
  			return (-1);
--- 1446,1450 ----
  		}
  		if (!ns_nameok((char *)cp1, class, response_trans,
! 			       hostname_ctx, dname, from_addr.sin_addr)) {
  			hp->rcode = FORMERR;
  			return (-1);
***************
*** 1478,1482 ****
  		}
  		if (!ns_nameok((char *)cp1, class, response_trans,
! 			       hostname_ctx)) {
  			hp->rcode = FORMERR;
  			return (-1);
--- 1483,1487 ----
  		}
  		if (!ns_nameok((char *)cp1, class, response_trans,
! 			       hostname_ctx, dname, from_addr.sin_addr)) {
  			hp->rcode = FORMERR;
  			return (-1);
***************
*** 1505,1509 ****
  		}
  		if (!ns_nameok((char *)cp1, class, response_trans,
! 			       domain_ctx)) {
  			hp->rcode = FORMERR;
  			return (-1);
--- 1510,1514 ----
  		}
  		if (!ns_nameok((char *)cp1, class, response_trans,
! 			       domain_ctx, dname, from_addr.sin_addr)) {
  			hp->rcode = FORMERR;
  			return (-1);
***************
*** 1518,1522 ****
  		}
  		if (!ns_nameok((char *)cp1, class, response_trans,
! 			       domain_ctx)) {
  			hp->rcode = FORMERR;
  			return (-1);
--- 1523,1527 ----
  		}
  		if (!ns_nameok((char *)cp1, class, response_trans,
! 			       domain_ctx, dname, from_addr.sin_addr)) {
  			hp->rcode = FORMERR;
  			return (-1);
***************
*** 1630,1636 ****
  int
  doupdate(msg, msglen, rrp, zone, savens, flags, cred)
! 	u_char *msg, *rrp;
  	struct databuf **savens;
! 	int msglen, zone, flags;
  	u_int cred;
  {
--- 1635,1644 ----
  int
  doupdate(msg, msglen, rrp, zone, savens, flags, cred)
! 	u_char *msg;
! 	int msglen;
! 	u_char *rrp;
! 	int zone;
  	struct databuf **savens;
! 	int flags;
  	u_int cred;
  {
***************
*** 1654,1658 ****
  	cp = rrp + n;
  
- 	if (zone == 0)
  #if defined(TRACEROOT) || defined(BOGUSNS)
  	if ((type == T_NS) && (savens != NULL)) {
--- 1662,1665 ----
*** res/inet_net_pton.c	1996/08/08 06:54:44	8.2
--- res/inet_net_pton.c	1996/11/11 06:36:52	8.3
***************
*** 17,21 ****
  
  #if defined(LIBC_SCCS) && !defined(lint)
! static const char rcsid[] = "$Id: inet_net_pton.c,v 8.2 1996/08/08 06:54:44 vixie Exp $";
  #endif
  
--- 17,21 ----
  
  #if defined(LIBC_SCCS) && !defined(lint)
! static const char rcsid[] = "$Id: inet_net_pton.c,v 8.3 1996/11/11 06:36:52 vixie Exp $";
  #endif
  
***************
*** 98,104 ****
  	const u_char *odst = dst;
  
- 	bits = -1;
  	ch = *src++;
- 
  	if (ch == '0' && (src[0] == 'x' || src[0] == 'X')
  	    && isascii(src[1]) && isxdigit(src[1])) {
--- 98,102 ----
***************
*** 151,154 ****
--- 149,153 ----
  		goto enoent;
  
+ 	bits = -1;
  	if (ch == '/' && isascii(src[0]) && isdigit(src[0]) && dst > odst) {
  		/* CIDR width specifier.  Nothing can follow it. */
***************
*** 164,167 ****
--- 163,168 ----
  		if (ch != '\0')
  			goto enoent;
+ 		if (bits > 32)
+ 			goto emsgsize;
  	}
  
***************
*** 175,186 ****
  	/* If no CIDR spec was given, infer width from net class. */
  	if (bits == -1) {
! 		if (*odst >= 224)
  			bits = 4;
! 		else if (*odst >= 192)
  			bits = 24;
! 		else if (*odst >= 128)
  			bits = 16;
! 		else
  			bits = 8;
  	}
  	/* Extend network to cover the actual mask. */
--- 176,192 ----
  	/* If no CIDR spec was given, infer width from net class. */
  	if (bits == -1) {
! 		if (*odst >= 240)	/* Class E */
! 			bits = 32;
! 		else if (*odst >= 224)	/* Class D */
  			bits = 4;
! 		else if (*odst >= 192)	/* Class C */
  			bits = 24;
! 		else if (*odst >= 128)	/* Class B */
  			bits = 16;
! 		else			/* Class A */
  			bits = 8;
+ 		/* If imputed mask is narrower than specified octets, widen. */
+ 		if (bits >= 8 && bits < ((dst - odst) * 8))
+ 			bits = (dst - odst) * 8;
  	}
  	/* Extend network to cover the actual mask. */
*** res/res_debug.c	1996/10/08 04:51:06	8.17
--- res/res_debug.c	1996/11/11 06:36:52	8.18
***************
*** 78,82 ****
  #if defined(LIBC_SCCS) && !defined(lint)
  static char sccsid[] = "@(#)res_debug.c	8.1 (Berkeley) 6/4/93";
! static char rcsid[] = "$Id: res_debug.c,v 8.17 1996/10/08 04:51:06 vixie Exp $";
  #endif /* LIBC_SCCS and not lint */
  
--- 78,82 ----
  #if defined(LIBC_SCCS) && !defined(lint)
  static char sccsid[] = "@(#)res_debug.c	8.1 (Berkeley) 6/4/93";
! static char rcsid[] = "$Id: res_debug.c,v 8.18 1996/11/11 06:36:52 vixie Exp $";
  #endif /* LIBC_SCCS and not lint */
  
***************
*** 296,300 ****
  	hp = (HEADER *)msg;
  	cp = msg + HFIXEDSZ;
! 	endMark = cp + len;
  	if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEADX) || hp->rcode) {
  		fprintf(file, ";; ->>HEADER<<- opcode: %s, status: %s, id: %d",
--- 296,300 ----
  	hp = (HEADER *)msg;
  	cp = msg + HFIXEDSZ;
! 	endMark = msg + len;
  	if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEADX) || hp->rcode) {
  		fprintf(file, ";; ->>HEADER<<- opcode: %s, status: %s, id: %d",
*** shres/sunos/INSTALL	1996/05/22 04:56:31	8.6
--- shres/sunos/INSTALL	1996/11/11 06:36:53	8.7
***************
*** 1,6 ****
! Installing BIND 4.9.3 resolver code in SunOS 4.1.x shared libraries
  ===================================================================
  
! $Id: INSTALL,v 8.6 1996/05/22 04:56:31 vixie Exp $
  
  by Chris Davis <ckd@kei.com>
--- 1,6 ----
! Installing BIND resolver code in SunOS 4.1.x shared libraries
  ===================================================================
  
! $Id: INSTALL,v 8.7 1996/11/11 06:36:53 vixie Exp $
  
  by Chris Davis <ckd@kei.com>
***************
*** 41,45 ****
  SUCH DAMAGE.]
  
! 1.  Get and unpack a copy of BIND 4.9.3.  (This document is from that
      distribution, as shres/sunos/INSTALL.)  See <URL:http://www.isc.org/isc/> 
      for more information, including a pointer to the latest version.
--- 41,45 ----
  SUCH DAMAGE.]
  
! 1.  Get and unpack a copy of BIND.  (This document is from that
      distribution, as shres/sunos/INSTALL.)  See <URL:http://www.isc.org/isc/> 
      for more information, including a pointer to the latest version.
*** tools/nslookup/main.c	1996/06/02 08:20:41	8.3
--- tools/nslookup/main.c	1996/11/11 06:36:54	8.4
***************
*** 62,66 ****
  #ifndef lint
  static char sccsid[] = "@(#)main.c	5.42 (Berkeley) 3/3/91";
! static char rcsid[] = "$Id: main.c,v 8.3 1996/06/02 08:20:41 vixie Exp $";
  #endif /* not lint */
  
--- 62,66 ----
  #ifndef lint
  static char sccsid[] = "@(#)main.c	5.42 (Berkeley) 3/3/91";
! static char rcsid[] = "$Id: main.c,v 8.4 1996/11/11 06:36:54 vixie Exp $";
  #endif /* not lint */
  
***************
*** 1103,1107 ****
      char buf[PATH_MAX];
  
!     if ((cp = getenv("HOME")) != NULL) {
  	(void) strcpy(buf, cp);
  	(void) strcat(buf, _PATH_NSLOOKUPRC);
--- 1103,1109 ----
      char buf[PATH_MAX];
  
!     if ((cp = getenv("HOME")) != NULL &&
! 	(strlen(cp) + strlen(_PATH_NSLOOKUPRC)) < sizeof(buf)) {
! 
  	(void) strcpy(buf, cp);
  	(void) strcat(buf, _PATH_NSLOOKUPRC);
