PERFORCE change 104279 for review

Michael Bushkov bushman at FreeBSD.org
Wed Aug 16 19:30:22 UTC 2006


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

Change 104279 by bushman at bushman_nss_ldap_cached on 2006/08/16 19:29:51

	IFC

Affected files ...

.. //depot/projects/soc2006/nss_ldap_cached/src/etc/defaults/rc.conf#4 integrate
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/stdlib/malloc.c#5 integrate
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/string/strcoll.3#2 integrate
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/sys/connect.2#2 integrate
.. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/sys/getfsstat.2#2 integrate
.. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/rpc.lockd/kern.c#2 integrate
.. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/rtsold/rtsold.8#2 integrate
.. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/yppush/yppush_main.c#2 integrate
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/lib/Makefile#2 edit
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/lib/nss_ldap/ldapconn.h#2 integrate
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/lib/nss_ldap/nss_ldap.5#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/Makefile#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.README#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.compat.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.cpu.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.dep.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.doc.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.endian.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.files.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.incs.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.info.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.init.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.kmod.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.lib.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.libnames.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.links.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.man.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.nls.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.obj.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.own.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.pkg.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.port.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.port.post.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.port.pre.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.port.subdir.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.prog.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.snmpmod.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.subdir.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/bsd.sys.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/sys.mk#1 branch
.. //depot/projects/soc2006/nss_ldap_cached_openldap/src/share/mk/version_gen.awk#1 branch

Differences ...

==== //depot/projects/soc2006/nss_ldap_cached/src/etc/defaults/rc.conf#4 (text+ko) ====

@@ -15,7 +15,7 @@
 # For a more detailed explanation of all the rc.conf variables, please
 # refer to the rc.conf(5) manual page.
 #
-# $FreeBSD: src/etc/defaults/rc.conf,v 1.291 2006/08/05 20:28:50 njl Exp $
+# $FreeBSD: src/etc/defaults/rc.conf,v 1.292 2006/08/16 17:14:52 brooks Exp $
 
 ##############################################################
 ###  Important initial Boot-time options  ####################
@@ -40,7 +40,7 @@
 kldxref_module_path=""	# Override kern.module_path. A ';'-delimited list.
 powerd_enable="NO" 	# Run powerd to lower our power usage.
 powerd_flags=""		# Flags to powerd (if enabled).
-removable_route_flush="YES" # Flush routes when removing an interface
+removable_route_flush="NO" # Flush routes when removing an interface
 tmpmfs="AUTO"		# Set to YES to always create an mfs /tmp, NO to never
 tmpsize="20m"		# Size of mfs /tmp if created
 tmpmfs_flags="-S -M"	# Extra mdmfs options for the mfs /tmp

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/stdlib/malloc.c#5 (text+ko) ====

@@ -185,7 +185,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.133 2006/08/09 19:01:27 marcel Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.134 2006/08/13 21:54:47 cperciva Exp $");
 
 #include "libc_private.h"
 #ifdef MALLOC_DEBUG
@@ -3495,7 +3495,7 @@
 
 	num_size = num * size;
 	if (num_size == 0) {
-		if (opt_sysv == false)
+		if ((opt_sysv == false) && ((num == 0) || (size == 0)))
 			num_size = 1;
 		else {
 			ret = NULL;

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/string/strcoll.3#2 (text+ko) ====

@@ -34,7 +34,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)strcoll.3	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/string/strcoll.3,v 1.12 2002/10/15 10:11:53 tjr Exp $
+.\" $FreeBSD: src/lib/libc/string/strcoll.3,v 1.13 2006/08/14 08:21:27 dd Exp $
 .\"
 .Dd June 4, 1993
 .Dt STRCOLL 3
@@ -56,13 +56,16 @@
 .Fa s1
 and
 .Fa s2
-according to the current locale collation if any, otherwise call
-.Fa strcmp ,
+according to the current locale collation
 and returns an integer greater than, equal to, or less than 0,
 according as
 .Fa s1
 is greater than, equal to, or less than
 .Fa s2 .
+If information about the current locale collation is not available,
+the value of
+.Fn strcmp s1 s2
+is returned.
 .Sh SEE ALSO
 .Xr setlocale 3 ,
 .Xr strcmp 3 ,

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/sys/connect.2#2 (text+ko) ====

@@ -30,7 +30,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)connect.2	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/sys/connect.2,v 1.26 2004/07/02 19:07:30 ru Exp $
+.\" $FreeBSD: src/lib/libc/sys/connect.2,v 1.27 2006/08/16 02:56:51 wes Exp $
 .\"
 .Dd June 4, 1993
 .Dt CONNECT 2
@@ -130,6 +130,15 @@
 constant or the
 .Dv INADDR_NONE
 return value) through a socket that does not provide broadcast functionality.
+.It Bq Er EAGAIN
+An auto-assigned port number was requested but no auto-assigned ports 
+are available.  Increasing the port range specified by
+.Xr sysctl 3
+MIB variables
+.Dq Va net.inet.ip.portrange.first
+and
+.Dq Va net.inet.ip.portrange.last
+may alleviate the problem.
 .El
 .Pp
 The following errors are specific to connecting names in the UNIX domain.
@@ -154,7 +163,9 @@
 .Xr getpeername 2 ,
 .Xr getsockname 2 ,
 .Xr select 2 ,
-.Xr socket 2
+.Xr socket 2 ,
+.Xr sysctl 3 ,
+.Xr sysctl 8
 .Sh HISTORY
 The
 .Fn connect

==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/sys/getfsstat.2#2 (text+ko) ====

@@ -30,7 +30,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"	@(#)getfsstat.2	8.3 (Berkeley) 5/25/95
-.\" $FreeBSD: src/lib/libc/sys/getfsstat.2,v 1.17 2004/07/16 01:18:13 alfred Exp $
+.\" $FreeBSD: src/lib/libc/sys/getfsstat.2,v 1.18 2006/08/15 18:17:03 pjd Exp $
 .\"
 .Dd November 20, 2003
 .Dt GETFSSTAT 2
@@ -61,7 +61,7 @@
 .Pp
 Fields that are undefined for a particular file system are set to -1.
 The buffer is filled with an array of
-.Fa fsstat
+.Fa statfs
 structures, one for each mounted file system
 up to the byte count specified by
 .Fa bufsize .
@@ -94,7 +94,7 @@
 unable to respond.
 .Sh RETURN VALUES
 Upon successful completion, the number of
-.Fa fsstat
+.Fa statfs
 structures is returned.
 Otherwise, -1 is returned and the global variable
 .Va errno

==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/rpc.lockd/kern.c#2 (text+ko) ====

@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.sbin/rpc.lockd/kern.c,v 1.19 2006/05/27 02:37:37 rodrigc Exp $");
+__FBSDID("$FreeBSD: src/usr.sbin/rpc.lockd/kern.c,v 1.20 2006/08/16 18:33:35 thomas Exp $");
 
 #include <sys/param.h>
 #include <sys/mount.h>
@@ -147,8 +147,10 @@
 	case -1:
 		err(1, "fork");
 	case 0:
+		setproctitle ("client");
 		break;
 	default:
+		setproctitle ("server");
 		return (child);
 	}
 

==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/rtsold/rtsold.8#2 (text+ko) ====

@@ -27,7 +27,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/usr.sbin/rtsold/rtsold.8,v 1.15 2005/02/09 18:04:42 ru Exp $
+.\" $FreeBSD: src/usr.sbin/rtsold/rtsold.8,v 1.16 2006/08/14 08:49:08 dd Exp $
 .\"
 .Dd May 17, 1998
 .Dt RTSOLD 8
@@ -169,25 +169,24 @@
 .It Fl D
 Enable more debugging including the printing of internal timer information.
 .It Fl f
-.Fl f
-prevents
+Prevent
 .Nm
 from becoming a daemon (foreground mode).
 Warning messages are generated to standard error
 instead of
 .Xr syslog 3 .
 .It Fl F
-Configure
-.Xr sysctl 8
-variable related to
+Explicitly configure the kernel to accept Router Advertisements and
+disable IPv6 forwarding.
+These settings are required for proper
 .Nm
-by itself.
-Without
-.Fl F ,
-.Nm
-will not alter and obey the current
-.Xr sysctl 8
-settings.
+operation.
+Without this option, the current settings will be obeyed;
+if they are incompatible with proper operation,
+warning messages will be generated,
+but Router Solicitations will still be sent.
+The settings may be changed manually with
+.Xr sysctl 8 .
 .It Fl m
 Enable mobility support.
 If this option is specified,

==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/yppush/yppush_main.c#2 (text+ko) ====

@@ -31,13 +31,14 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.sbin/yppush/yppush_main.c,v 1.20 2005/04/12 15:02:57 thomas Exp $");
+__FBSDID("$FreeBSD: src/usr.sbin/yppush/yppush_main.c,v 1.22 2006/08/16 12:58:41 thomas Exp $");
 
 #include <errno.h>
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <time.h>
 #include <unistd.h>
 #include <sys/socket.h>
@@ -60,17 +61,16 @@
 char *yppush_mapname = NULL;	/* Map to transfer. */
 char *yppush_domain = NULL;	/* Domain in which map resides. */
 char *yppush_master = NULL;	/* Master NIS server for said domain. */
+int skip_master = 0;		/* Do not attempt to push map to master. */
 int verbose = 0;		/* Toggle verbose mode. */
 unsigned long yppush_transid = 0;
 int yppush_timeout = 80;	/* Default timeout. */
-int yppush_jobs = 0;		/* Number of allowed concurrent jobs. */
+int yppush_jobs = 1;		/* Number of allowed concurrent jobs. */
 int yppush_running_jobs = 0;	/* Number of currently running jobs. */
-int yppush_alarm_tripped = 0;
 
 /* Structure for holding information about a running job. */
 struct jobs {
 	unsigned long tid;
-	int sock;
 	int port;
 	ypxfrstat stat;
 	unsigned long prognum;
@@ -82,6 +82,8 @@
 
 struct jobs *yppush_joblist;	/* Linked list of running jobs. */
 
+static int yppush_svc_run(int);
+
 /*
  * Local error messages.
  */
@@ -112,19 +114,29 @@
 
 	job = yppush_joblist;
 
-	while (job) {
+	while (job != NULL) {
 		if (job->tid == tid)
 			break;
 		job = job->next;
 	}
 
+	if (job == NULL) {
+		yp_error("warning: received callback with invalid transaction ID: %lu",
+			 tid);
+		return (0);
+	}
+
 	if (job->polled) {
-		return(0);
+		yp_error("warning: received callback with duplicate transaction ID: %lu",
+			 tid);
+		return (0);
 	}
 
-	if (verbose > 1)
+	if (verbose > 1) {
 		yp_error("checking return status: transaction ID: %lu",
 								job->tid);
+	}
+
 	if (status != YPPUSH_SUCC || verbose) {
 		yp_error("transfer of map %s to server %s %s",
 		 	job->map, job->server, status == YPPUSH_SUCC ?
@@ -171,11 +183,7 @@
 				yp_error("%d transfer%sstill pending",
 					still_pending,
 					still_pending > 1 ? "s " : " ");
-			yppush_alarm_tripped = 0;
-			alarm(YPPUSH_RESPONSE_TIMEOUT);
-			pause();
-			alarm(0);
-			if (yppush_alarm_tripped == 1) {
+			if (yppush_svc_run (YPPUSH_RESPONSE_TIMEOUT) == 0) {
 				yp_error("timed out");
 				now = 1;
 			}
@@ -207,42 +215,31 @@
 static void
 handler(int sig)
 {
-	if (sig == SIGTERM || sig == SIGINT || sig == SIGABRT) {
-		yppush_joblist = NULL;
-		yppush_exit(1);
-	}
-
-	if (sig == SIGALRM) {
-		alarm(0);
-		yppush_alarm_tripped++;
-	}
-
+	yppush_exit (1);
 	return;
 }
 
 /*
  * Dispatch loop for callback RPC services.
+ * Return value:
+ *   -1 error
+ *    0 timeout
+ *   >0 request serviced
  */
-static void
-yppush_svc_run(void)
+static int
+yppush_svc_run(int timeout_secs)
 {
-#ifdef FD_SETSIZE
+	int rc;
 	fd_set readfds;
-#else
-	int readfds;
-#endif /* def FD_SETSIZE */
 	struct timeval timeout;
 
 	timeout.tv_usec = 0;
-	timeout.tv_sec = 5;
+	timeout.tv_sec = timeout_secs;
 
 retry:
-#ifdef FD_SETSIZE
 	readfds = svc_fdset;
-#else
-	readfds = svc_fds;
-#endif /* def FD_SETSIZE */
-	switch (select(_rpc_dtablesize(), &readfds, NULL, NULL, &timeout)) {
+	rc = select(svc_maxfd + 1, &readfds, NULL, NULL, &timeout);
+	switch (rc) {
 	case -1:
 		if (errno == EINTR)
 			goto retry;
@@ -255,28 +252,10 @@
 		svc_getreqset(&readfds);
 		break;
 	}
-	return;
+	return rc;
 }
 
 /*
- * Special handler for asynchronous socket I/O. We mark the
- * sockets of the callback handlers as O_ASYNC and handle SIGIO
- * events here, which will occur when the callback handler has
- * something interesting to tell us.
- */
-static void
-async_handler(int sig)
-{
-	yppush_svc_run();
-
-	/* reset any pending alarms. */
-	alarm(0);
-	yppush_alarm_tripped++;
-	kill(getpid(), SIGALRM);
-	return;
-}
-
-/*
  * RPC service routines for callbacks.
  */
 void *
@@ -394,9 +373,17 @@
 	SVCXPRT *xprt;
 	struct jobs *job;
 
+	/* Register the job in our linked list of jobs. */
+
+	/* First allocate job structure */
+	if ((job = (struct jobs *)malloc(sizeof (struct jobs))) == NULL) {
+		yp_error("malloc failed");
+		yppush_exit (1);
+	}
+
 	/*
-	 * Register the callback service on the first free
-	 * transient program number.
+	 * Register the callback service on the first free transient
+	 * program number.
 	 */
 	xprt = svcudp_create(sock);
 	for (prognum = 0x40000000; prognum < 0x5FFFFFFF; prognum++) {
@@ -404,18 +391,15 @@
 		    yppush_xfrrespprog_1, IPPROTO_UDP) == TRUE)
 			break;
 	}
-
-	/* Register the job in our linked list of jobs. */
-	if ((job = (struct jobs *)malloc(sizeof (struct jobs))) == NULL) {
-		yp_error("malloc failed");
-		yppush_exit(1);
+	if (prognum == 0x5FFFFFFF) {
+		yp_error ("can't register yppush_xfrrespprog_1");
+		yppush_exit (1);
 	}
 
 	/* Initialize the info for this job. */
 	job->stat = 0;
 	job->tid = tid;
 	job->port = xprt->xp_port;
-	job->sock = xprt->xp_fd; /*XXX: Evil!! EEEEEEEVIL!!! */
 	job->server = strdup(server);
 	job->map = strdup(map);
 	job->prognum = prognum;
@@ -423,27 +407,6 @@
 	job->next = yppush_joblist;
 	yppush_joblist = job;
 
-	/*
-	 * Set the RPC sockets to asynchronous mode. This will
-	 * cause the system to smack us with a SIGIO when an RPC
-	 * callback is delivered. This in turn allows us to handle
-	 * the callback even though we may be in the middle of doing
-	 * something else at the time.
-	 *
-	 * XXX This is a horrible thing to do for two reasons,
-	 * both of which have to do with portability:
-	 * 1) We really ought not to be sticking our grubby mits
-	 *    into the RPC service transport handle like this.
-	 * 2) Even in this day and age, there are still some *NIXes
-	 *    that don't support async socket I/O.
-	 */
-	if (fcntl(xprt->xp_fd, F_SETOWN, getpid()) == -1 ||
-	    fcntl(xprt->xp_fd, F_SETFL, O_ASYNC) == -1) {
-		yp_error("failed to set async I/O mode: %s",
-			 strerror(errno));
-		yppush_exit(1);
-	}
-
 	if (verbose) {
 		yp_error("initiating transfer: %s -> %s (transid = %lu)",
 			yppush_mapname, server, tid);
@@ -451,7 +414,7 @@
 
 	/*
 	 * Send the XFR request to ypserv. We don't have to wait for
-	 * a response here since we can handle them asynchronously.
+	 * a response here since we handle them asynchronously.
 	 */
 
 	if (yppush_send_xfr(job)){
@@ -480,29 +443,16 @@
 		return (status);
 
 	snprintf(server, sizeof(server), "%.*s", vallen, val);
+	if (skip_master && strcasecmp(server, yppush_master) == 0)
+		return (0);
 
 	/*
-	 * Restrict the number of concurrent jobs. If yppush_jobs number
+	 * Restrict the number of concurrent jobs: if yppush_jobs number
 	 * of jobs have already been dispatched and are still pending,
 	 * wait for one of them to finish so we can reuse its slot.
 	 */
-	if (yppush_jobs <= 1) {
-		yppush_alarm_tripped = 0;
-		while (!yppush_alarm_tripped && yppush_running_jobs) {
-			alarm(yppush_timeout);
-			yppush_alarm_tripped = 0;
-			pause();
-			alarm(0);
-		}
-	} else {
-		yppush_alarm_tripped = 0;
-		while (!yppush_alarm_tripped && yppush_running_jobs >= yppush_jobs) {
-			alarm(yppush_timeout);
-			yppush_alarm_tripped = 0;
-			pause();
-			alarm(0);
-		}
-	}
+	while (yppush_running_jobs >= yppush_jobs && (yppush_svc_run (yppush_timeout) > 0))
+		;
 
 	/* Cleared for takeoff: set everything in motion. */
 	if (yp_push(server, yppush_mapname, yppush_transid))
@@ -615,7 +565,13 @@
 		yppush_exit(1);
 	}
 
-	if (strncmp(myname, data.data, data.size)) {
+	if (strncasecmp(myname, data.data, data.size) == 0) {
+		/* I am master server, and no explicit host list was
+		   specified: do not push map to myself -- this will
+		   fail with YPPUSH_AGE anyway. */
+		if (yppush_hostlist == NULL)
+			skip_master = 1;
+	} else {
 		yp_error("warning: this host is not the master for %s",
 							yppush_mapname);
 #ifdef NITPICKY
@@ -628,26 +584,8 @@
 	yppush_master[data.size] = '\0';
 
 	/* Install some handy handlers. */
-	signal(SIGALRM, handler);
 	signal(SIGTERM, handler);
 	signal(SIGINT, handler);
-	signal(SIGABRT, handler);
-
-	/*
-	 * Set up the SIGIO handler. Make sure that some of the
-	 * other signals are blocked while the handler is running so
-	 * select() doesn't get interrupted.
-	 */
-	sigemptyset(&sa.sa_mask);
-	sigaddset(&sa.sa_mask, SIGIO); /* Goes without saying. */
-	sigaddset(&sa.sa_mask, SIGPIPE);
-	sigaddset(&sa.sa_mask, SIGCHLD);
-	sigaddset(&sa.sa_mask, SIGALRM);
-	sigaddset(&sa.sa_mask, SIGINT);
-	sa.sa_handler = async_handler;
-	sa.sa_flags = 0;
-
-	sigaction(SIGIO, &sa, NULL);
 
 	/* set initial transaction ID */
 	yppush_transid = time((time_t *)NULL);

==== //depot/projects/soc2006/nss_ldap_cached_openldap/src/lib/Makefile#2 (text+ko) ====

@@ -11,12 +11,13 @@
 # libcrypt must be built before libkrb5 and libpam.
 # libkvm must be built before libdevstat.
 # msun must be built before libg++ and libstdc++.
+# libldap must be built before nss_ldap
 # libmd must be built before libatm, libopie, libradius, and libtacplus.
 # libncurses must be built before libdialog, libedit and libreadline.
 # libnetgraph must be built before libbsnmp/modules/snmp_netgraph.
 # libnssutil must be built before nss_files/nss_dns/nss_nis/nss_compat
 # libnss_files must be built before libnss_compat
-# nssfiles/nss_dns/nss_nis/nss_compat/nss_icmp must be built before libc
+# nssfiles/nss_dns/nss_nis/nss_ldap/nss_compat/nss_icmp must be built before libc
 # libopie must be built before libpam.
 # libradius must be built before libpam.
 # librpcsvc must be built before libpam.
@@ -27,8 +28,8 @@
 #
 # Otherwise, the SUBDIR list should be in alphabetical order.
 
-SUBDIR=	${_csu} libbsm libcom_err libcrypt libkvm msun libmd libncurses \
-	libnssutil nss_files nss_compat nss_dns nss_icmp ${_nss_nis}\
+SUBDIR=	${_csu} libbsm libcom_err libcrypt libkvm msun libmd libncurses ${_libldap}\
+	libnssutil nss_compat nss_dns nss_files nss_icmp ${_nss_ldap} ${_nss_nis}\
 	libnetgraph libradius librpcsvc libsbuf libtacplus libutil \
 	${_libypclnt} libalias libarchive ${_libatm} \
 	libbegemot ${_libbluetooth} libbsnmp libbz2 libc ${_libc_r} \
@@ -132,4 +133,12 @@
 _libgpib=	libgpib
 .endif
 
+.if ${MK_OPENLDAP} != "no"
+_libldap=	libldap
+.endif
+
+.if ${MK_NSS_LDAP} != "no"
+_nss_ldap=	nss_ldap
+.endif
+
 .include <bsd.subdir.mk>

==== //depot/projects/soc2006/nss_ldap_cached_openldap/src/lib/nss_ldap/ldapconn.h#2 (text+ko) ====

@@ -30,10 +30,10 @@
 #define _LDAPCONN_H_
 
 /* TODO: remove in release */
-#define NSS_LDAP_START_TLS_ENABLED
-#define NSS_LDAP_SSL_ENABLED
 #define NSS_LDAP_SIMPLE_AUTH_ENABLED
+#ifdef SASL
 #define NSS_LDAP_SASL_AUTH_ENABLED
+#endif
 
 #define NSS_LDAP_MAX_ERR_DESC_SIZE 256
 /* TODO: is this correct? */


More information about the p4-projects mailing list