Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Sep 2000 11:06:52 +0900
From:      Hajimu UMEMOTO <ume@mahoroba.org>
To:        nectar@FreeBSD.org
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/etc Makefile hosts rc.network host.conf        src/include hesiod.h nsswitch.h Makefile netdb.h src/lib/libc         Makefile.inc src/lib/libc/gen Makefile.inc getgrent.3 getgrent.c         getpwent.3 getpwent.c getusershell.3 getusershell.c pw_scan.c ...
Message-ID:  <20000907110652K.ume@mahoroba.org>
In-Reply-To: <200009061816.LAA30295@freefall.freebsd.org>
References:  <200009061816.LAA30295@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> On Wed, 6 Sep 2000 11:16:50 -0700 (PDT)
>>>>> Jacques Vidrine <nectar@FreeBSD.org> said:

nectar>   Log:
nectar>   Add nsswitch support.  By creating an /etc/nsswitch.conf file, you can
nectar>   configure FreeBSD so that various databases such as passwd and group can be
nectar>   looked up using flat files, NIS, or Hesiod.
  
It seems my patch sent to you directly before was not applied.
Without my patch, getipnodebyname() doesn't work correctly.  It breaks
sendmail.

--- lib/libc/net/name6.c.orig	Thu Sep  7 10:54:20 2000
+++ lib/libc/net/name6.c	Sat Sep  2 23:43:11 2000
@@ -235,7 +235,7 @@
 _ghbyname(const char *name, int af, int flags, int *errp)
 {
 	struct hostent *hp;
-	int i, rval;
+	int rval;
 	
 	static const ns_dtab dtab[] = {
 		NS_FILES_CB(_files_ghbyname, NULL)
@@ -360,7 +360,7 @@
 getipnodebyaddr(const void *src, size_t len, int af, int *errp)
 {
 	struct hostent *hp;
-	int i, rval;
+	int rval;
 #ifdef INET6
 	struct in6_addr addrbuf;
 #else
@@ -769,7 +769,7 @@
 	char *aliases[MAXALIASES + 1], *addrs[2];
 	union inx_addr addrbuf;
 	char buf[BUFSIZ];
-	int af0 = af;
+	int af0;
 
 	name = va_arg(ap, const char *);
 	af = va_arg(ap, int);
@@ -781,6 +781,7 @@
 		return NS_UNAVAIL;
 	rethp = hp = NULL;
 
+	af0 = af;
 	while (fgets(buf, sizeof(buf), fp)) {
 		line = buf;
 		if ((addrstr = _hgetword(&line)) == NULL

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@mahoroba.org  ume@bisd.hitachi.co.jp  ume@FreeBSD.org
http://www.imasy.org/~ume/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000907110652K.ume>