PERFORCE change 99812 for review

Michael Bushkov bushman at FreeBSD.org
Thu Jun 22 14:37:01 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=99812

Change 99812 by bushman at bushman_nss_ldap_cached on 2006/06/22 14:36:41

	Minor cleanups to match style(9) more.

Affected files ...

.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/Makefile#5 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/getaddrinfo.c#3 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/gethostbydns.c#2 delete
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/gethostbyht.c#2 delete
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/gethostbynis.c#2 delete
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/getnetbydns.c#2 delete
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/getnetbyht.c#2 delete
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/getnetbynis.c#2 delete
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/getproto.c#3 delete
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/getprotoname.c#3 delete
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/res_config.h#2 delete
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/Makefile#6 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/Makefile.inc#2 delete
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/copyhtent.c#4 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/copyhtent.h#3 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/copynetent.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/gr_scan.c#3 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/gr_scan.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/pw_scan.c#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/pw_scan.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/rpcunpack.c#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/rpcunpack.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/servunpack.c#3 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/servunpack.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_compat/Makefile#4 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_compat/Makefile.inc#2 delete
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_compat/compat_group.c#3 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_compat/compat_group.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_compat/compat_passwd.c#4 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_compat/compat_passwd.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_compat/compat_serv.c#3 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_compat/compat_serv.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_compat/nss_compat.c#4 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_compat/nss_compat.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/Makefile#7 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/Makefile.inc#2 delete
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/dns_group.c#4 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/dns_group.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/dns_hosts_addrinfo.c#6 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/dns_hosts_addrinfo.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/dns_hosts_namadr.c#7 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/dns_hosts_namadr.h#3 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/dns_hosts_name6.c#5 delete
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/dns_hosts_name6.h#3 delete
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/dns_net.c#4 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/dns_net.h#3 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/dns_passwd.c#4 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/dns_passwd.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/nss_dns.c#7 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/nss_dns.h#3 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/res_config.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/Makefile#6 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/Makefile.inc#2 delete
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_group.c#4 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_group.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_hosts_addrinfo.c#3 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_hosts_addrinfo.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_hosts_namadr.c#5 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_hosts_namadr.h#3 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_hosts_name6.c#4 delete
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_hosts_name6.h#2 delete
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_net.c#5 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_net.h#3 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_passwd.c#5 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_passwd.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_proto.c#5 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_proto.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_rpc.c#4 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_rpc.h#3 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_serv.c#4 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_serv.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_shells.c#3 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_shells.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/nss_files.c#9 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/nss_files.h#5 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_icmp/Makefile#6 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_icmp/Makefile.inc#2 delete
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_icmp/icmp_hosts_namadr.c#3 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_icmp/icmp_hosts_namadr.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_icmp/nss_icmp.c#3 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_icmp/nss_icmp.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_nis/Makefile#7 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_nis/Makefile.inc#2 delete
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_nis/nis_group.c#3 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_nis/nis_group.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_nis/nis_hosts_addrinfo.c#3 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_nis/nis_hosts_addrinfo.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_nis/nis_hosts_namadr.c#5 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_nis/nis_hosts_namadr.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_nis/nis_hosts_name6.c#4 delete
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_nis/nis_hosts_name6.h#2 delete
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_nis/nis_net.c#4 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_nis/nis_net.h#3 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_nis/nis_passwd.c#3 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_nis/nis_passwd.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_nis/nis_rpc.c#3 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_nis/nis_rpc.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_nis/nis_serv.c#3 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_nis/nis_serv.h#2 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_nis/nss_nis.c#6 edit
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_nis/nss_nis.h#3 edit

Differences ...

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/Makefile#5 (text+ko) ====

@@ -132,24 +132,6 @@
 DPSRC=	nss_static_modules.c
 STATICOBJS+= nss_static_modules.o
 CLEANFILES+= nss_static_modules.o
-#CFLAGS+= -I${.CURDIR}/../libnssutil -I${.CURDIR}/net
-	
-#.PATH:	${.CURDIR}/../libnssutil
-#.include "${.CURDIR}/../libnssutil/Makefile.inc"
-
-#.PATH:	${.CURDIR}/../nss_files
-#.include "${.CURDIR}/../nss_files/Makefile.inc"
-
-#.PATH:	${.CURDIR}/../nss_dns
-#.include "${.CURDIR}/../nss_dns/Makefile.inc"
-
-#.if ${MK_NIS} != "no"
-#.PATH:	${.CURDIR}/../nss_nis
-#.include "${.CURDIR}/../nss_nis/Makefile.inc"
-#.endif
-
-#.PATH:	${.CURDIR}/../nss_compat
-#.include "${.CURDIR}/../nss_compat/Makefile.inc"
 
 .include <bsd.lib.mk>
 

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/getaddrinfo.c#3 (text+ko) ====

@@ -93,12 +93,6 @@
 #include <stdio.h>
 #include <errno.h>
 
-//#include "res_config.h"
-
-//#ifdef DEBUG
-//#include <syslog.h>
-//#endif
-
 #include <stdarg.h>
 #include <nsswitch.h>
 #include "un-namespace.h"

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/Makefile#6 (text+ko) ====

@@ -1,10 +1,9 @@
 # $FreeBSD$
 
-LIB=		nssutil
-#SRCS=	copynetent.c copyhtent.c gr_scan.c pw_scan.c rpcunpack.c\
-#	servunpack.c
+LIB=	nssutil
+SRCS=	copynetent.c copyhtent.c gr_scan.c pw_scan.c rpcunpack.c\
+	servunpack.c
 INTERNAL=
 NO_PIC=
 
-.include "Makefile.inc"
 .include <bsd.lib.mk>

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/copyhtent.c#4 (text+ko) ====

@@ -24,7 +24,6 @@
 #include <stdlib.h>
 #include <string.h>
 
-
 int
 __copy_hostent(struct hostent *he, struct hostent *hptr, char *buf,
     size_t buflen)

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/copyhtent.h#3 (text+ko) ====


==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/copynetent.h#2 (text+ko) ====


==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/gr_scan.c#3 (text+ko) ====


==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/gr_scan.h#2 (text+ko) ====


==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/pw_scan.c#2 (text+ko) ====

@@ -35,7 +35,7 @@
 static char sccsid[] = "@(#)pw_scan.c	8.3 (Berkeley) 4/2/94";
 #endif /* LIBC_SCCS and not lint */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/gen/pw_scan.c,v 1.25 2004/01/18 21:33:25 charnier Exp $");
+__FBSDID("$FreeBSD$");
 
 /*
  * This module is used to "verify" password entries by chpass(1) and

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/pw_scan.h#2 (text+ko) ====


==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/rpcunpack.c#2 (text+ko) ====


==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/rpcunpack.h#2 (text+ko) ====

@@ -26,4 +26,4 @@
  * $FreeBSD$
  */
  
-int __rpcent_unpack(char *, struct rpcent *, char **, size_t, int *);
+extern int __rpcent_unpack(char *, struct rpcent *, char **, size_t, int *);

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/servunpack.c#3 (text+ko) ====

@@ -31,6 +31,9 @@
  * SUCH DAMAGE.
  */
 
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
 #include <arpa/inet.h>
 #include <sys/param.h>
 #include <sys/types.h>

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libnssutil/servunpack.h#2 (text+ko) ====

@@ -26,4 +26,4 @@
  * $FreeBSD$
  */
  
-int __servent_unpack(char *, struct servent *, char **, size_t, int *);
+extern int __servent_unpack(char *, struct servent *, char **, size_t, int *);

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_compat/Makefile#4 (text+ko) ====

@@ -7,6 +7,7 @@
 SHLIB_NAME=	nss_compat.so.${SHLIB_MAJOR}
 SHLIBDIR?=	/lib
 
+SRCS+=	nss_compat.c compat_group.c compat_passwd.c compat_serv.c
 # NOTE: dirty hack with nss_files's file_serv.c is used
 SRCS+=	${.CURDIR}/../nss_files/files_serv.c
 CFLAGS+=-I${.CURDIR} -I${.CURDIR}/../libc/gen -I${.CURDIR}/../libc/include\
@@ -26,5 +27,4 @@
 INCS=	
 MAN=	
 
-.include "Makefile.inc"
 .include <bsd.lib.mk>

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_compat/compat_group.c#3 (text+ko) ====

@@ -34,7 +34,6 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
-#include "namespace.h"
 #include <sys/param.h>
 #include <ctype.h>
 #include <errno.h>
@@ -47,7 +46,6 @@
 #include <string.h>
 #include <syslog.h>
 #include <unistd.h>
-#include "un-namespace.h"
 #include "libc_private.h"
 #include "nss_tls.h"
 #include "gr_scan.h"
@@ -114,7 +112,7 @@
 		else if (stayopen)
 			st->fp = fopen(_PATH_GROUP, "r");
 		set_setent(dtab, mdata);
-		(void)_nsdispatch(NULL, dtab, NSDB_GROUP_COMPAT, "setgrent",
+		(void)nsdispatch(NULL, dtab, NSDB_GROUP_COMPAT, "setgrent",
 		    compatsrc, 0);
 		break;
 	case nss_end_ent:
@@ -123,7 +121,7 @@
 			st->fp = NULL;
 		}
 		set_setent(dtab, mdata);
-		(void)_nsdispatch(NULL, dtab, NSDB_GROUP_COMPAT, "endgrent",
+		(void)nsdispatch(NULL, dtab, NSDB_GROUP_COMPAT, "endgrent",
 		    compatsrc, 0);
 		break;
 	default:
@@ -207,17 +205,17 @@
 		set_lookup_type(dtab, how);
 		switch (how) {
 		case nss_lt_all:
-			rv = _nsdispatch(&discard, dtab, NSDB_GROUP_COMPAT,
+			rv = nsdispatch(&discard, dtab, NSDB_GROUP_COMPAT,
 			    "getgrent_r", compatsrc, grp, buffer, bufsize,
 			    errnop);
 			break;
 		case nss_lt_id:
-			rv = _nsdispatch(&discard, dtab, NSDB_GROUP_COMPAT,
+			rv = nsdispatch(&discard, dtab, NSDB_GROUP_COMPAT,
 			    "getgrgid_r", compatsrc, gid, grp, buffer, bufsize,
 			    errnop);
 			break;
 		case nss_lt_name:
-			rv = _nsdispatch(&discard, dtab, NSDB_GROUP_COMPAT,
+			rv = nsdispatch(&discard, dtab, NSDB_GROUP_COMPAT,
 			    "getgrnam_r", compatsrc, name, grp, buffer,
 			    bufsize, errnop);
 			break;
@@ -228,7 +226,7 @@
 		break;
 	case COMPAT_MODE_NAME:
 		set_lookup_type(dtab, nss_lt_name);
-		rv = _nsdispatch(&discard, dtab, NSDB_GROUP_COMPAT,
+		rv = nsdispatch(&discard, dtab, NSDB_GROUP_COMPAT,
 		    "getgrnam_r", compatsrc, st->name, grp, buffer, bufsize,
 		    errnop);
 		switch (rv) {

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_compat/compat_group.h#2 (text+ko) ====

@@ -26,5 +26,5 @@
  * $FreeBSD$
  */
  
-int __compat_setgrent(void *retval, void *mdata, va_list ap);
-int __compat_group(void *retval, void *mdata, va_list ap);
+extern int __compat_setgrent(void *, void *, va_list);
+extern int __compat_group(void *, void *, va_list);

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_compat/compat_passwd.c#4 (text+ko) ====

@@ -34,22 +34,22 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
-#include "namespace.h"
 #include <arpa/inet.h>
 #include <sys/param.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <netdb.h>
 #include <nsswitch.h>
+#include "namespace.h"
 #include <pthread.h>
 #include <pthread_np.h>
+#include "un-namespace.h"
 #include <pwd.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <syslog.h>
 #include <unistd.h>
-#include "un-namespace.h"
 #include <db.h>
 #include "nss_tls.h"
 #include "nss_compat.h"
@@ -421,17 +421,17 @@
 	pwd_init(pwd);
 	switch (lookup_how) {
 	case nss_lt_all:
-		rv = _nsdispatch(&discard, dtab, NSDB_PASSWD_COMPAT,
+		rv = nsdispatch(&discard, dtab, NSDB_PASSWD_COMPAT,
 		    "getpwent_r", compatsrc, pwd, buffer, bufsize,
 		    errnop);
 		break;
 	case nss_lt_id:
-		rv = _nsdispatch(&discard, dtab, NSDB_PASSWD_COMPAT,
+		rv = nsdispatch(&discard, dtab, NSDB_PASSWD_COMPAT,
 		    "getpwuid_r", compatsrc, uid, pwd, buffer,
 		    bufsize, errnop);
 		break;
 	case nss_lt_name:
-		rv = _nsdispatch(&discard, dtab, NSDB_PASSWD_COMPAT,
+		rv = nsdispatch(&discard, dtab, NSDB_PASSWD_COMPAT,
 		    "getpwnam_r", compatsrc, lookup_name, pwd, buffer,
 		    bufsize, errnop);
 		break;
@@ -563,7 +563,7 @@
 			st->db = pwdbopen(&st->version);
 		st->stayopen = stayopen;
 		set_setent(dtab, mdata);
-		(void)_nsdispatch(NULL, dtab, NSDB_PASSWD_COMPAT, "setpwent",
+		(void)nsdispatch(NULL, dtab, NSDB_PASSWD_COMPAT, "setpwent",
 		    compatsrc, 0);
 		break;
 	case nss_end_ent:
@@ -572,7 +572,7 @@
 			st->db = NULL;
 		}
 		set_setent(dtab, mdata);
-		(void)_nsdispatch(NULL, dtab, NSDB_PASSWD_COMPAT, "endpwent",
+		(void)nsdispatch(NULL, dtab, NSDB_PASSWD_COMPAT, "endpwent",
 		    compatsrc, 0);
 		break;
 	default:

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_compat/compat_passwd.h#2 (text+ko) ====

@@ -26,5 +26,5 @@
  * $FreeBSD$
  */
  
-int __compat_setpwent(void *retval, void *mdata, va_list ap);
-int __compat_passwd(void *retval, void *mdata, va_list ap);
+extern int __compat_setpwent(void *, void *, va_list);
+extern int __compat_passwd(void *, void *, va_list);

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_compat/compat_serv.c#3 (text+ko) ====

@@ -25,10 +25,8 @@
  *
  */
 
-#include "namespace.h"
 #include <nsswitch.h>
 #include <stdlib.h>
-#include "un-namespace.h"
 #include "../nss_files/files_serv.h"
 #include "nss_compat.h"
  
@@ -51,11 +49,11 @@
 	switch ((enum nss_ent_type)mdata) {
 	case nss_set_ent:
 		f = va_arg(ap,int);
-		(void)_nsdispatch(retval, compat_dtab, NSDB_SERVICES_COMPAT,
+		(void)nsdispatch(retval, compat_dtab, NSDB_SERVICES_COMPAT,
 		    "setservent", compat_src, f);
 		break;
 	case nss_end_ent:
-		(void)_nsdispatch(retval, compat_dtab, NSDB_SERVICES_COMPAT,
+		(void)nsdispatch(retval, compat_dtab, NSDB_SERVICES_COMPAT,
 		    "endservent", compat_src);
 		break;
 	default:

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_compat/compat_serv.h#2 (text+ko) ====

@@ -26,4 +26,4 @@
  * $FreeBSD$
  */
  
-int __compat_setservent(void *retval, void *mdata, va_list ap);
+extern int __compat_setservent(void *, void *, va_list);

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_compat/nss_compat.c#4 (text+ko) ====


==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_compat/nss_compat.h#2 (text+ko) ====


==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/Makefile#7 (text+ko) ====

@@ -7,8 +7,8 @@
 SHLIB_NAME=	nss_dns.so.${SHLIB_MAJOR}
 SHLIBDIR?=	/lib
 
-#SRCS=	nss_dns.c dns_hosts_namadr.c dns_hosts_addrinfo.c dns_passwd.c\
-#	dns_group.c dns_net.c
+SRCS=	nss_dns.c dns_hosts_namadr.c dns_hosts_addrinfo.c dns_passwd.c\
+	dns_group.c dns_net.c
 CFLAGS+=-I${.CURDIR} -I${.CURDIR}/../libc/gen -I${.CURDIR}/../libc/include\
 	-I${.CURDIR}/../libc/net -I${.CURDIR}/../libnssutil
 CFLAGS+=-DINET6
@@ -26,5 +26,4 @@
 INCS=	
 MAN=	
 
-.include "Makefile.inc"
 .include <bsd.lib.mk>

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/dns_group.c#4 (text+ko) ====

@@ -34,7 +34,6 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
-#include "namespace.h"
 #include <sys/param.h>
 #include <ctype.h>
 #include <errno.h>
@@ -43,8 +42,10 @@
 #endif
 #include <grp.h>
 #include <nsswitch.h>
+#include "namespace.h"
 #include <pthread.h>
 #include <pthread_np.h>
+#include "un-namespace.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -52,7 +53,6 @@
 #include <unistd.h>
 #include "nss_tls.h"
 #include "gr_scan.h"
-#include "un-namespace.h"
 #ifdef HESIOD
 #define HESIOD_NAME_MAX 256
 

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/dns_group.h#2 (text+ko) ====


==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/dns_hosts_addrinfo.c#6 (text+ko) ====

@@ -65,7 +65,6 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
-#include "namespace.h"
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/socket.h>
@@ -92,7 +91,6 @@
 #include <unistd.h>
 #include <stdio.h>
 #include <errno.h>
-#include "un-namespace.h"
 #include "res_config.h"
 
 #if defined(__KAME__) && defined(INET6)

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/dns_hosts_addrinfo.h#2 (text+ko) ====

@@ -26,4 +26,4 @@
  * $FreeBSD$
  */
  
-int __dns_getaddrinfo(void *rv, void *cb_data, va_list ap);
+extern int __dns_getaddrinfo(void *, void *, va_list);

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/dns_hosts_namadr.c#7 (text+ko) ====

@@ -56,7 +56,6 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
-#include "namespace.h"
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/socket.h>
@@ -69,15 +68,16 @@
 #include <unistd.h>
 #include <string.h>
 #include <netdb.h>
+#include "namespace.h"
 #include <pthread.h>
 #include <pthread_np.h>
+#include "un-namespace.h"
 #include <resolv.h>
 #include <ctype.h>
 #include <errno.h>
 #include <syslog.h>
 #include <stdarg.h>
 #include <nsswitch.h>
-#include "un-namespace.h"
 #include "reentrant.h"
 #include "netdb_private.h"
 #include "nss_dns.h"
@@ -431,15 +431,6 @@
 			break;
 #else
 			he->h_name = bp;
-//			if (statp->options & RES_USE_INET6) {
-//				n = strlen(bp) + 1;	/* for the \0 */
-//				if (n >= MAXHOSTNAMELEN) {
-//					had_error++;
-//					break;
-//				}
-//				bp += n;
-//				_map_v4v6_hostent(he, &bp, ep);
-//			}
 			RES_SET_H_ERRNO(statp, NETDB_SUCCESS);
 			return (0);
 #endif
@@ -515,8 +506,7 @@
 			he->h_name = bp;
 			bp += n;
 		}
-//		if (statp->options & RES_USE_INET6)
-//			_map_v4v6_hostent(he, &bp, ep);
+
 		RES_SET_H_ERRNO(statp, NETDB_SUCCESS);
 		return (0);
 	}
@@ -771,11 +761,7 @@
 	memcpy(hed->host_addr, uaddr, len);
 	hed->h_addr_ptrs[0] = (char *)hed->host_addr;
 	hed->h_addr_ptrs[1] = NULL;
-//	if (af == AF_INET && (statp->options & RES_USE_INET6)) {
-//		_map_v4v6_address((char*)hed->host_addr, (char*)hed->host_addr);
-//		he.h_addrtype = AF_INET6;
-//		he.h_length = NS_IN6ADDRSZ;
-//	}
+
 	RES_SET_H_ERRNO(statp, NETDB_SUCCESS);
 	if (__copy_hostent(&he, hptr, buffer, buflen) != 0) {
 		*h_errnop = statp->res_h_errno;

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/dns_hosts_namadr.h#3 (text+ko) ====

@@ -26,8 +26,8 @@
  * $FreeBSD$
  */
  
-int __dns_gethostbyname2_r(void *rval, void *cb_data, va_list ap);
-int __dns_gethostbyaddr_r(void *rval, void *cb_data, va_list ap);
-int __dns_gethostent_r(void *rval, void *cb_data, va_list ap);
-int __dns_sethostent(void *rval, void *cb_data, va_list ap);
-int __dns_endhostent(void *rval, void *cb_data, va_list ap);
+extern int __dns_gethostbyname2_r(void *, void *, va_list);
+extern int __dns_gethostbyaddr_r(void *, void *, va_list);
+extern int __dns_gethostent_r(void *, void *, va_list);
+extern int __dns_sethostent(void *, void *, va_list);
+extern int __dns_endhostent(void *, void *, va_list);

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/dns_net.c#4 (text+ko) ====

@@ -61,7 +61,6 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
-#include "namespace.h"
 #include <sys/param.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -71,8 +70,10 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <netdb.h>
+#include "namespace.h"
 #include <pthread.h>
 #include <pthread_np.h>
+#include "un-namespace.h"
 #include <resolv.h>
 #include <ctype.h>
 #include <string.h>
@@ -80,7 +81,6 @@
 #include <syslog.h>
 #include <stdarg.h>
 #include <nsswitch.h>
-#include "un-namespace.h"
 #include "netdb_private.h"
 #include "nss_dns.h"
 #include "reentrant.h"

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/dns_net.h#3 (text+ko) ====

@@ -26,8 +26,8 @@
  * $FreeBSD$
  */
 
-int __dns_getnetbyname_r(void *rval, void *cb_data, va_list ap);
-int __dns_getnetbyaddr_r(void *rval, void *cb_data, va_list ap);
-int __dns_getnetent_r(void *rval, void *cb_data, va_list ap);
-int __dns_setnetent(void *rval, void *cb_data, va_list ap);
-int __dns_endnetent(void *rval, void *cb_data, va_list ap);
+extern int __dns_getnetbyname_r(void *, void *, va_list);
+extern int __dns_getnetbyaddr_r(void *, void *, va_list);
+extern int __dns_getnetent_r(void *, void *, va_list);
+extern int __dns_setnetent(void *, void *, va_list);
+extern int __dns_endnetent(void *, void *, va_list);

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/dns_passwd.c#4 (text+ko) ====

@@ -34,7 +34,6 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
-#include "namespace.h"
 #include <sys/param.h>
 #include <arpa/inet.h>
 #include <errno.h>
@@ -44,8 +43,10 @@
 #endif
 #include <netdb.h>
 #include <nsswitch.h>
+#include "namespace.h"
 #include <pthread.h>
 #include <pthread_np.h>
+#include "un-namespace.h"
 #include <pwd.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -53,7 +54,6 @@
 #include <syslog.h>
 #include <unistd.h>
 #include <db.h>
-#include "un-namespace.h"
 #include "libc_private.h"
 #include "nss_tls.h"
 #include "pw_scan.h"

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/dns_passwd.h#2 (text+ko) ====


==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/nss_dns.c#7 (text+ko) ====

@@ -38,12 +38,6 @@
 #include "dns_group.h"
 #include "netdb_private.h"
 
-/* TODO: for testing purposes only */
-/*#ifdef NSDB_HOSTS
-#undef NSDB_HOSTS
-#endif
-#define NSDB_HOSTS "hosts_"*/
-
 static ns_mtab methods[] = {
         {NSDB_GROUP, "getgrnam_r", __dns_group, (void *)nss_lt_name},
         {NSDB_GROUP, "getgrgid_r", __dns_group, (void *)nss_lt_id},

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/nss_dns.h#3 (text+ko) ====


==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_dns/res_config.h#2 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/lib/libc/net/res_config.h,v 1.9 2006/03/21 16:11:11 ume Exp $ */
+/* $FreeBSD$ */
 
 #define	DEBUG	1	/* enable debugging code (needed for dig) */
 #define	RESOLVSORT	/* allow sorting of addresses in gethostbyname */

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/Makefile#6 (text+ko) ====

@@ -7,9 +7,9 @@
 SHLIB_NAME=	nss_files.so.${SHLIB_MAJOR}
 SHLIBDIR?=	/lib
 
-#SRCS=	nss_files.c files_passwd.c files_group.c files_hosts_namadr.c\
-#	files_hosts_addrinfo.c files_serv.c files_proto.c\
-#	files_net.c files_rpc.c
+SRCS=	nss_files.c files_passwd.c files_group.c files_hosts_namadr.c\
+	files_hosts_addrinfo.c files_serv.c files_proto.c\
+	files_net.c files_rpc.c
 CFLAGS+=-I${.CURDIR} -I${.CURDIR}/../libc/gen -I${.CURDIR}/../libc/include\
 	-I${.CURDIR}/../libc/net -I${.CURDIR}/../libnssutil
 CFLAGS+=-DINET6
@@ -27,5 +27,4 @@
 INCS=	
 MAN=	
 
-.include "Makefile.inc"
 .include <bsd.lib.mk>

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_group.c#4 (text+ko) ====

@@ -34,20 +34,20 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
-#include "namespace.h"
 #include <sys/param.h>
 #include <errno.h>
 #include <grp.h>
 #include <netdb.h>
 #include <nsswitch.h>
+#include "namespace.h"
 #include <pthread.h>
 #include <pthread_np.h>
+#include "un-namespace.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <syslog.h>
 #include <unistd.h>
-#include "un-namespace.h"
 #include "nss_files.h"
 #include "nss_tls.h"
 #include "gr_scan.h"

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_group.h#2 (text+ko) ====

@@ -26,10 +26,5 @@
  * $FreeBSD$
  */
 
-int	 __gr_match_entry(const char *, size_t, enum nss_lookup_type,
-	    const char *, gid_t);
-int	 __gr_parse_entry(char *, size_t, struct group *, char *, size_t,
-	    int *);
-
 int	 __files_setgrent(void *, void *, va_list);
 int	 __files_group(void *, void *, va_list);

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_hosts_addrinfo.c#3 (text+ko) ====

@@ -65,7 +65,6 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
-#include "namespace.h"
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/socket.h>
@@ -91,7 +90,6 @@
 #include <unistd.h>
 #include <stdio.h>
 #include <errno.h>
-#include "un-namespace.h"
 
 #include "res_config.h"
 

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_hosts_addrinfo.h#2 (text+ko) ====

@@ -26,4 +26,4 @@
  * $FreeBSD$
  */
  
-int __files_getaddrinfo(void *rv, void *cb_data, va_list ap);
+extern int __files_getaddrinfo(void *, void *, va_list);

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_hosts_namadr.c#5 (text+ko) ====

@@ -54,15 +54,16 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
  
-#include "namespace.h"
 #include <sys/param.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <errno.h>
 #include <netdb.h>
+#include "namespace.h"
 #include <pthread.h>
 #include <pthread_np.h>
+#include "un-namespace.h"
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
@@ -71,8 +72,8 @@
 #include <nsswitch.h>
 #include <arpa/nameser.h>	/* XXX */
 #include <resolv.h>		/* XXX */
-#include "un-namespace.h"
 #include "reentrant.h"
+#include "copyhtent.h"
 #include "netdb_private.h"
 #include "nss_files.h"
 
@@ -93,68 +94,6 @@
 	free(hed);	
 }
 
-static int
-__copy_hostent(struct hostent *he, struct hostent *hptr, char *buf,
-    size_t buflen)
-{
-	char *cp;
-	char **ptr;
-	int i, n;
-	int nptr, len;
-
-	/* Find out the amount of space required to store the answer. */
-	nptr = 2; /* NULL ptrs */
-	len = (char *)ALIGN(buf) - buf;
-	for (i = 0; he->h_addr_list[i]; i++, nptr++) {
-		len += he->h_length;
-	}
-	for (i = 0; he->h_aliases[i]; i++, nptr++) {
-		len += strlen(he->h_aliases[i]) + 1;
-	}
-	len += strlen(he->h_name) + 1;
-	len += nptr * sizeof(char*);
-
-	if (len > buflen) {
-		errno = ERANGE;
-		return (-1);
-	}
-
-	/* copy address size and type */
-	hptr->h_addrtype = he->h_addrtype;
-	n = hptr->h_length = he->h_length;
-
-	ptr = (char **)ALIGN(buf);
-	cp = (char *)ALIGN(buf) + nptr * sizeof(char *);
-
-	/* copy address list */
-	hptr->h_addr_list = ptr;
-	for (i = 0; he->h_addr_list[i]; i++ , ptr++) {
-		memcpy(cp, he->h_addr_list[i], n);
-		hptr->h_addr_list[i] = cp;
-		cp += n;
-	}
-	hptr->h_addr_list[i] = NULL;
-	ptr++;
-
-	/* copy official name */
-	n = strlen(he->h_name) + 1;
-	strcpy(cp, he->h_name);
-	hptr->h_name = cp;
-	cp += n;
-
-	/* copy aliases */
-	hptr->h_aliases = ptr;
-	for (i = 0 ; he->h_aliases[i]; i++) {
-		n = strlen(he->h_aliases[i]) + 1;
-		strcpy(cp, he->h_aliases[i]);
-		hptr->h_aliases[i] = cp;
-		cp += n;
-	}
-	hptr->h_aliases[i] = NULL;
-
-	return (0);
-}
-
 static void
 sethosthtent(int f, struct files_hostent_data *hed)
 {
@@ -204,15 +143,8 @@
 		af = AF_INET6;
 		len = IN6ADDRSZ;
 	} else if (inet_pton(AF_INET, p, hed->host_addr) > 0) {
-/*		if (mapped) {
-			_map_v4v6_address((char *)hed->host_addr,
-			    (char *)hed->host_addr);
-			af = AF_INET6;
-			len = IN6ADDRSZ;
-		} else {*/
-			af = AF_INET;
-			len = INADDRSZ;
-/*		}*/
+		af = AF_INET;
+		len = INADDRSZ;
 	} else {
 		goto again;
 	}
@@ -294,12 +226,7 @@
 	while ((error = gethostent_p(&he, hed, statp)) == 0) {
 		if (he.h_addrtype != af)
 			continue;
-/*		if (he.h_addrtype == AF_INET &&
-		    statp->options & RES_USE_INET6) {
-			_map_v4v6_address(he.h_addr, he.h_addr);
-			he.h_length = IN6ADDRSZ;
-			he.h_addrtype = AF_INET6;
-		}*/
+
 		if (strcasecmp(he.h_name, name) == 0)
 			break;
 		for (cp = he.h_aliases; *cp != 0; cp++)
@@ -355,15 +282,8 @@
 
 	sethosthtent(0, hed);
 	while ((error = gethostent_p(&he, hed, statp)) == 0)
-		if (he.h_addrtype == af && !bcmp(he.h_addr, addr, len)) {
-/*			if (he.h_addrtype == AF_INET &&
-			    statp->options & RES_USE_INET6) {
-				_map_v4v6_address(he.h_addr, he.h_addr);
-				he.h_length = IN6ADDRSZ;
-				he.h_addrtype = AF_INET6;
-			}*/
+		if (he.h_addrtype == af && !bcmp(he.h_addr, addr, len))
 			break;
-		}
 	endhosthtent(hed);
 
 	if (error != 0)

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_hosts_namadr.h#3 (text+ko) ====

@@ -26,8 +26,8 @@
  * $FreeBSD$
  */
  
-int __files_gethostbyname2_r(void *rval, void *cb_data, va_list ap);
-int __files_gethostbyaddr_r(void *rval, void *cb_data, va_list ap);
-int __files_gethostent_r(void *rval, void *cb_data, va_list ap);
-int __files_sethostent(void *rval, void *cb_data, va_list ap);
-int __files_endhostent(void *rval, void *cb_data, va_list ap);
+extern int __files_gethostbyname2_r(void *, void *, va_list);
+extern int __files_gethostbyaddr_r(void *, void *, va_list);
+extern int __files_gethostent_r(void *, void *, va_list);
+extern int __files_sethostent(void *, void *, va_list);
+extern int __files_endhostent(void *, void *, va_list);

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_files/files_net.c#5 (text+ko) ====

@@ -44,22 +44,22 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
-#include "namespace.h"
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>

>>> TRUNCATED FOR MAIL (1000 lines) <<<


More information about the p4-projects mailing list