Blame SOURCES/dhcp-4.2.2-CLOEXEC.patch

c8bb8f
diff -up dhcp-4.2.2b1/client/clparse.c.cloexec dhcp-4.2.2b1/client/clparse.c
c8bb8f
--- dhcp-4.2.2b1/client/clparse.c.cloexec	2011-07-01 14:13:30.973887714 +0200
c8bb8f
+++ dhcp-4.2.2b1/client/clparse.c	2011-07-01 14:15:15.021580693 +0200
c8bb8f
@@ -246,7 +246,7 @@ int read_client_conf_file (const char *n
c8bb8f
 	int token;
c8bb8f
 	isc_result_t status;
c8bb8f
 
c8bb8f
-	if ((file = open (name, O_RDONLY)) < 0)
c8bb8f
+	if ((file = open (name, O_RDONLY | O_CLOEXEC)) < 0)
c8bb8f
 		return uerr2isc (errno);
c8bb8f
 
c8bb8f
 	cfile = NULL;
c8bb8f
@@ -283,7 +283,7 @@ void read_client_leases ()
c8bb8f
 
c8bb8f
 	/* Open the lease file.   If we can't open it, just return -
c8bb8f
 	   we can safely trust the server to remember our state. */
c8bb8f
-	if ((file = open (path_dhclient_db, O_RDONLY)) < 0)
c8bb8f
+	if ((file = open (path_dhclient_db, O_RDONLY | O_CLOEXEC)) < 0)
c8bb8f
 		return;
c8bb8f
 
c8bb8f
 	cfile = NULL;
c8bb8f
diff -up dhcp-4.2.2b1/client/dhclient.c.cloexec dhcp-4.2.2b1/client/dhclient.c
c8bb8f
--- dhcp-4.2.2b1/client/dhclient.c.cloexec	2011-07-01 14:13:30.970887717 +0200
c8bb8f
+++ dhcp-4.2.2b1/client/dhclient.c	2011-07-01 14:16:51.485930388 +0200
c8bb8f
@@ -148,11 +148,11 @@ main(int argc, char **argv) {
c8bb8f
 	/* Make sure that file descriptors 0 (stdin), 1, (stdout), and
c8bb8f
 	   2 (stderr) are open. To do this, we assume that when we
c8bb8f
 	   open a file the lowest available file descriptor is used. */
c8bb8f
-	fd = open("/dev/null", O_RDWR);
c8bb8f
+	fd = open("/dev/null", O_RDWR | O_CLOEXEC);
c8bb8f
 	if (fd == 0)
c8bb8f
-		fd = open("/dev/null", O_RDWR);
c8bb8f
+		fd = open("/dev/null", O_RDWR | O_CLOEXEC);
c8bb8f
 	if (fd == 1)
c8bb8f
-		fd = open("/dev/null", O_RDWR);
c8bb8f
+		fd = open("/dev/null", O_RDWR | O_CLOEXEC);
c8bb8f
 	if (fd == 2)
c8bb8f
 		log_perror = 0; /* No sense logging to /dev/null. */
c8bb8f
 	else if (fd != -1)
c8bb8f
@@ -506,7 +506,7 @@ main(int argc, char **argv) {
c8bb8f
 		int e;
c8bb8f
 
c8bb8f
 		oldpid = 0;
c8bb8f
-		if ((pidfd = fopen(path_dhclient_pid, "r")) != NULL) {
c8bb8f
+		if ((pidfd = fopen(path_dhclient_pid, "re")) != NULL) {
c8bb8f
 			e = fscanf(pidfd, "%ld\n", &temp);
c8bb8f
 			oldpid = (pid_t)temp;
c8bb8f
 
c8bb8f
@@ -548,7 +548,7 @@ main(int argc, char **argv) {
c8bb8f
 					strncpy(new_path_dhclient_pid, path_dhclient_pid, pfx);
c8bb8f
 					sprintf(new_path_dhclient_pid + pfx, "-%s.pid", ip->name);
c8bb8f
 
c8bb8f
-					if ((pidfd = fopen(new_path_dhclient_pid, "r")) != NULL) {
c8bb8f
+					if ((pidfd = fopen(new_path_dhclient_pid, "re")) != NULL) {
c8bb8f
 						e = fscanf(pidfd, "%ld\n", &temp);
c8bb8f
 						oldpid = (pid_t)temp;
c8bb8f
 
c8bb8f
@@ -573,7 +573,7 @@ main(int argc, char **argv) {
c8bb8f
 		int dhc_running = 0;
c8bb8f
 		char procfn[256] = "";
c8bb8f
 
c8bb8f
-		if ((pidfp = fopen(path_dhclient_pid, "r")) != NULL) {
c8bb8f
+		if ((pidfp = fopen(path_dhclient_pid, "re")) != NULL) {
c8bb8f
 			if ((fscanf(pidfp, "%ld", &temp)==1) && ((dhcpid=(pid_t)temp) > 0)) {
c8bb8f
 				snprintf(procfn,256,"/proc/%u",dhcpid);
c8bb8f
 				dhc_running = (access(procfn, F_OK) == 0);
c8bb8f
@@ -2995,7 +2995,7 @@ void rewrite_client_leases ()
c8bb8f
 
c8bb8f
 	if (leaseFile != NULL)
c8bb8f
 		fclose (leaseFile);
c8bb8f
-	leaseFile = fopen (path_dhclient_db, "w");
c8bb8f
+	leaseFile = fopen (path_dhclient_db, "we");
c8bb8f
 	if (leaseFile == NULL) {
c8bb8f
 		log_error ("can't create %s: %m", path_dhclient_db);
c8bb8f
 		return;
c8bb8f
@@ -3105,7 +3105,7 @@ write_duid(struct data_string *duid)
c8bb8f
 		return DHCP_R_INVALIDARG;
c8bb8f
 
c8bb8f
 	if (leaseFile == NULL) {	/* XXX? */
c8bb8f
-		leaseFile = fopen(path_dhclient_db, "w");
c8bb8f
+		leaseFile = fopen(path_dhclient_db, "we");
c8bb8f
 		if (leaseFile == NULL) {
c8bb8f
 			log_error("can't create %s: %m", path_dhclient_db);
c8bb8f
 			return ISC_R_IOERROR;
c8bb8f
@@ -3285,7 +3285,7 @@ int write_client_lease (client, lease, r
c8bb8f
 		return 1;
c8bb8f
 
c8bb8f
 	if (leaseFile == NULL) {	/* XXX */
c8bb8f
-		leaseFile = fopen (path_dhclient_db, "w");
c8bb8f
+		leaseFile = fopen (path_dhclient_db, "we");
c8bb8f
 		if (leaseFile == NULL) {
c8bb8f
 			log_error ("can't create %s: %m", path_dhclient_db);
c8bb8f
 			return 0;
c8bb8f
@@ -3772,9 +3772,9 @@ void go_daemon ()
c8bb8f
 	close(2);
c8bb8f
 
c8bb8f
 	/* Reopen them on /dev/null. */
c8bb8f
-	open("/dev/null", O_RDWR);
c8bb8f
-	open("/dev/null", O_RDWR);
c8bb8f
-	open("/dev/null", O_RDWR);
c8bb8f
+	open("/dev/null", O_RDWR | O_CLOEXEC);
c8bb8f
+	open("/dev/null", O_RDWR | O_CLOEXEC);
c8bb8f
+	open("/dev/null", O_RDWR | O_CLOEXEC);
c8bb8f
 
c8bb8f
 	write_client_pid_file ();
c8bb8f
 
c8bb8f
@@ -3791,14 +3791,14 @@ void write_client_pid_file ()
c8bb8f
 		return;
c8bb8f
 	}
c8bb8f
 
c8bb8f
-	pfdesc = open (path_dhclient_pid, O_CREAT | O_TRUNC | O_WRONLY, 0644);
c8bb8f
+	pfdesc = open (path_dhclient_pid, O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC, 0644);
c8bb8f
 
c8bb8f
 	if (pfdesc < 0) {
c8bb8f
 		log_error ("Can't create %s: %m", path_dhclient_pid);
c8bb8f
 		return;
c8bb8f
 	}
c8bb8f
 
c8bb8f
-	pf = fdopen (pfdesc, "w");
c8bb8f
+	pf = fdopen (pfdesc, "we");
c8bb8f
 	if (!pf) {
c8bb8f
 		close(pfdesc);
c8bb8f
 		log_error ("Can't fdopen %s: %m", path_dhclient_pid);
c8bb8f
diff -up dhcp-4.2.2b1/common/bpf.c.cloexec dhcp-4.2.2b1/common/bpf.c
c8bb8f
--- dhcp-4.2.2b1/common/bpf.c.cloexec	2011-07-01 14:13:30.976887712 +0200
c8bb8f
+++ dhcp-4.2.2b1/common/bpf.c	2011-07-01 14:13:31.030887673 +0200
c8bb8f
@@ -94,7 +94,7 @@ int if_register_bpf (info)
c8bb8f
 	for (b = 0; 1; b++) {
c8bb8f
 		/* %Audit% 31 bytes max. %2004.06.17,Safe% */
c8bb8f
 		sprintf(filename, BPF_FORMAT, b);
c8bb8f
-		sock = open (filename, O_RDWR, 0);
c8bb8f
+		sock = open (filename, O_RDWR | O_CLOEXEC, 0);
c8bb8f
 		if (sock < 0) {
c8bb8f
 			if (errno == EBUSY) {
c8bb8f
 				continue;
c8bb8f
diff -up dhcp-4.2.2b1/common/dlpi.c.cloexec dhcp-4.2.2b1/common/dlpi.c
c8bb8f
--- dhcp-4.2.2b1/common/dlpi.c.cloexec	2011-07-01 14:13:30.977887712 +0200
c8bb8f
+++ dhcp-4.2.2b1/common/dlpi.c	2011-07-01 14:13:31.032887673 +0200
c8bb8f
@@ -806,7 +806,7 @@ dlpiopen(const char *ifname) {
c8bb8f
 	}
c8bb8f
 	*dp = '\0';
c8bb8f
 	
c8bb8f
-	return open (devname, O_RDWR, 0);
c8bb8f
+	return open (devname, O_RDWR | O_CLOEXEC, 0);
c8bb8f
 }
c8bb8f
 
c8bb8f
 /*
c8bb8f
diff -up dhcp-4.2.2b1/common/nit.c.cloexec dhcp-4.2.2b1/common/nit.c
c8bb8f
--- dhcp-4.2.2b1/common/nit.c.cloexec	2011-07-01 14:13:30.978887712 +0200
c8bb8f
+++ dhcp-4.2.2b1/common/nit.c	2011-07-01 14:13:31.033887672 +0200
c8bb8f
@@ -81,7 +81,7 @@ int if_register_nit (info)
c8bb8f
 	struct strioctl sio;
c8bb8f
 
c8bb8f
 	/* Open a NIT device */
c8bb8f
-	sock = open ("/dev/nit", O_RDWR);
c8bb8f
+	sock = open ("/dev/nit", O_RDWR | O_CLOEXEC);
c8bb8f
 	if (sock < 0)
c8bb8f
 		log_fatal ("Can't open NIT device for %s: %m", info -> name);
c8bb8f
 
c8bb8f
diff -up dhcp-4.2.2b1/common/resolv.c.cloexec dhcp-4.2.2b1/common/resolv.c
c8bb8f
--- dhcp-4.2.2b1/common/resolv.c.cloexec	2009-11-20 02:49:01.000000000 +0100
c8bb8f
+++ dhcp-4.2.2b1/common/resolv.c	2011-07-01 14:13:31.033887672 +0200
c8bb8f
@@ -49,7 +49,7 @@ void read_resolv_conf (parse_time)
c8bb8f
 	struct domain_search_list *dp, *dl, *nd;
c8bb8f
 	isc_result_t status;
c8bb8f
 
c8bb8f
-	if ((file = open (path_resolv_conf, O_RDONLY)) < 0) {
c8bb8f
+	if ((file = open (path_resolv_conf, O_RDONLY | O_CLOEXEC)) < 0) {
c8bb8f
 		log_error ("Can't open %s: %m", path_resolv_conf);
c8bb8f
 		return;
c8bb8f
 	}
c8bb8f
diff -up dhcp-4.2.2b1/common/upf.c.cloexec dhcp-4.2.2b1/common/upf.c
c8bb8f
--- dhcp-4.2.2b1/common/upf.c.cloexec	2011-07-01 14:13:30.979887712 +0200
c8bb8f
+++ dhcp-4.2.2b1/common/upf.c	2011-07-01 14:13:31.034887671 +0200
c8bb8f
@@ -77,7 +77,7 @@ int if_register_upf (info)
c8bb8f
 		/* %Audit% Cannot exceed 36 bytes. %2004.06.17,Safe% */
c8bb8f
 		sprintf(filename, "/dev/pf/pfilt%d", b);
c8bb8f
 
c8bb8f
-		sock = open (filename, O_RDWR, 0);
c8bb8f
+		sock = open (filename, O_RDWR | O_CLOEXEC, 0);
c8bb8f
 		if (sock < 0) {
c8bb8f
 			if (errno == EBUSY) {
c8bb8f
 				continue;
c8bb8f
diff -up dhcp-4.2.2b1/omapip/trace.c.cloexec dhcp-4.2.2b1/omapip/trace.c
c8bb8f
--- dhcp-4.2.2b1/omapip/trace.c.cloexec	2010-05-27 02:34:57.000000000 +0200
c8bb8f
+++ dhcp-4.2.2b1/omapip/trace.c	2011-07-01 14:13:31.036887669 +0200
c8bb8f
@@ -141,10 +141,10 @@ isc_result_t trace_begin (const char *fi
c8bb8f
 		return DHCP_R_INVALIDARG;
c8bb8f
 	}
c8bb8f
 
c8bb8f
-	traceoutfile = open (filename, O_CREAT | O_WRONLY | O_EXCL, 0600);
c8bb8f
+	traceoutfile = open (filename, O_CREAT | O_WRONLY | O_EXCL | O_CLOEXEC, 0600);
c8bb8f
 	if (traceoutfile < 0 && errno == EEXIST) {
c8bb8f
 		log_error ("WARNING: Overwriting trace file \"%s\"", filename);
c8bb8f
-		traceoutfile = open (filename, O_WRONLY | O_EXCL | O_TRUNC,
c8bb8f
+		traceoutfile = open (filename, O_WRONLY | O_EXCL | O_TRUNC | O_CLOEXEC,
c8bb8f
 				     0600);
c8bb8f
 	}
c8bb8f
 
c8bb8f
@@ -431,7 +431,7 @@ void trace_file_replay (const char *file
c8bb8f
 	isc_result_t result;
c8bb8f
 	int len;
c8bb8f
 
c8bb8f
-	traceinfile = fopen (filename, "r");
c8bb8f
+	traceinfile = fopen (filename, "re");
c8bb8f
 	if (!traceinfile) {
c8bb8f
 		log_error("Can't open tracefile %s: %m", filename);
c8bb8f
 		return;
c8bb8f
diff -up dhcp-4.2.2b1/relay/dhcrelay.c.cloexec dhcp-4.2.2b1/relay/dhcrelay.c
c8bb8f
--- dhcp-4.2.2b1/relay/dhcrelay.c.cloexec	2011-05-10 15:07:37.000000000 +0200
c8bb8f
+++ dhcp-4.2.2b1/relay/dhcrelay.c	2011-07-01 14:18:07.630209767 +0200
c8bb8f
@@ -183,11 +183,11 @@ main(int argc, char **argv) {
c8bb8f
 	/* Make sure that file descriptors 0(stdin), 1,(stdout), and
c8bb8f
 	   2(stderr) are open. To do this, we assume that when we
c8bb8f
 	   open a file the lowest available file descriptor is used. */
c8bb8f
-	fd = open("/dev/null", O_RDWR);
c8bb8f
+	fd = open("/dev/null", O_RDWR | O_CLOEXEC);
c8bb8f
 	if (fd == 0)
c8bb8f
-		fd = open("/dev/null", O_RDWR);
c8bb8f
+		fd = open("/dev/null", O_RDWR | O_CLOEXEC);
c8bb8f
 	if (fd == 1)
c8bb8f
-		fd = open("/dev/null", O_RDWR);
c8bb8f
+		fd = open("/dev/null", O_RDWR | O_CLOEXEC);
c8bb8f
 	if (fd == 2)
c8bb8f
 		log_perror = 0; /* No sense logging to /dev/null. */
c8bb8f
 	else if (fd != -1)
c8bb8f
@@ -540,13 +540,13 @@ main(int argc, char **argv) {
c8bb8f
 
c8bb8f
 		if (no_pid_file == ISC_FALSE) {
c8bb8f
 			pfdesc = open(path_dhcrelay_pid,
c8bb8f
-				      O_CREAT | O_TRUNC | O_WRONLY, 0644);
c8bb8f
+				      O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC, 0644);
c8bb8f
 
c8bb8f
 			if (pfdesc < 0) {
c8bb8f
 				log_error("Can't create %s: %m",
c8bb8f
 					  path_dhcrelay_pid);
c8bb8f
 			} else {
c8bb8f
-				pf = fdopen(pfdesc, "w");
c8bb8f
+				pf = fdopen(pfdesc, "we");
c8bb8f
 				if (!pf)
c8bb8f
 					log_error("Can't fdopen %s: %m",
c8bb8f
 						  path_dhcrelay_pid);
c8bb8f
diff -up dhcp-4.2.2b1/server/confpars.c.cloexec dhcp-4.2.2b1/server/confpars.c
c8bb8f
--- dhcp-4.2.2b1/server/confpars.c.cloexec	2010-10-14 00:34:45.000000000 +0200
c8bb8f
+++ dhcp-4.2.2b1/server/confpars.c	2011-07-01 14:13:31.039887666 +0200
c8bb8f
@@ -116,7 +116,7 @@ isc_result_t read_conf_file (const char 
c8bb8f
 	}
c8bb8f
 #endif
c8bb8f
 
c8bb8f
-	if ((file = open (filename, O_RDONLY)) < 0) {
c8bb8f
+	if ((file = open (filename, O_RDONLY | O_CLOEXEC)) < 0) {
c8bb8f
 		if (leasep) {
c8bb8f
 			log_error ("Can't open lease database %s: %m --",
c8bb8f
 				   path_dhcpd_db);
c8bb8f
diff -up dhcp-4.2.2b1/server/db.c.cloexec dhcp-4.2.2b1/server/db.c
c8bb8f
--- dhcp-4.2.2b1/server/db.c.cloexec	2010-09-14 00:15:26.000000000 +0200
c8bb8f
+++ dhcp-4.2.2b1/server/db.c	2011-07-01 14:13:31.040887665 +0200
c8bb8f
@@ -1035,7 +1035,7 @@ void db_startup (testp)
c8bb8f
 	}
c8bb8f
 #endif
c8bb8f
 	if (!testp) {
c8bb8f
-		db_file = fopen (path_dhcpd_db, "a");
c8bb8f
+		db_file = fopen (path_dhcpd_db, "ae");
c8bb8f
 		if (!db_file)
c8bb8f
 			log_fatal ("Can't open %s for append.", path_dhcpd_db);
c8bb8f
 		expire_all_pools ();
c8bb8f
@@ -1083,12 +1083,12 @@ int new_lease_file ()
c8bb8f
 		     path_dhcpd_db, (int)t) >= sizeof newfname)
c8bb8f
 		log_fatal("new_lease_file: lease file path too long");
c8bb8f
 
c8bb8f
-	db_fd = open (newfname, O_WRONLY | O_TRUNC | O_CREAT, 0664);
c8bb8f
+	db_fd = open (newfname, O_WRONLY | O_TRUNC | O_CREAT | O_CLOEXEC, 0664);
c8bb8f
 	if (db_fd < 0) {
c8bb8f
 		log_error ("Can't create new lease file: %m");
c8bb8f
 		return 0;
c8bb8f
 	}
c8bb8f
-	if ((new_db_file = fdopen(db_fd, "w")) == NULL) {
c8bb8f
+	if ((new_db_file = fdopen(db_fd, "we")) == NULL) {
c8bb8f
 		log_error("Can't fdopen new lease file: %m");
c8bb8f
 		close(db_fd);
c8bb8f
 		goto fdfail;
c8bb8f
diff -up dhcp-4.2.2b1/server/dhcpd.c.cloexec dhcp-4.2.2b1/server/dhcpd.c
c8bb8f
--- dhcp-4.2.2b1/server/dhcpd.c.cloexec	2011-04-21 16:08:15.000000000 +0200
c8bb8f
+++ dhcp-4.2.2b1/server/dhcpd.c	2011-07-01 14:19:40.354124505 +0200
c8bb8f
@@ -270,11 +270,11 @@ main(int argc, char **argv) {
c8bb8f
         /* Make sure that file descriptors 0 (stdin), 1, (stdout), and
c8bb8f
            2 (stderr) are open. To do this, we assume that when we
c8bb8f
            open a file the lowest available file descriptor is used. */
c8bb8f
-        fd = open("/dev/null", O_RDWR);
c8bb8f
+        fd = open("/dev/null", O_RDWR | O_CLOEXEC);
c8bb8f
         if (fd == 0)
c8bb8f
-                fd = open("/dev/null", O_RDWR);
c8bb8f
+                fd = open("/dev/null", O_RDWR | O_CLOEXEC);
c8bb8f
         if (fd == 1)
c8bb8f
-                fd = open("/dev/null", O_RDWR);
c8bb8f
+                fd = open("/dev/null", O_RDWR | O_CLOEXEC);
c8bb8f
         if (fd == 2)
c8bb8f
                 log_perror = 0; /* No sense logging to /dev/null. */
c8bb8f
         else if (fd != -1)
c8bb8f
@@ -793,7 +793,7 @@ main(int argc, char **argv) {
c8bb8f
 	 */
c8bb8f
 	if (no_pid_file == ISC_FALSE) {
c8bb8f
 		/*Read previous pid file. */
c8bb8f
-		if ((i = open (path_dhcpd_pid, O_RDONLY)) >= 0) {
c8bb8f
+		if ((i = open (path_dhcpd_pid, O_RDONLY | O_CLOEXEC)) >= 0) {
c8bb8f
 			status = read(i, pbuf, (sizeof pbuf) - 1);
c8bb8f
 			close (i);
c8bb8f
 			if (status > 0) {
c8bb8f
@@ -812,7 +812,7 @@ main(int argc, char **argv) {
c8bb8f
 		}
c8bb8f
 
c8bb8f
 		/* Write new pid file. */
c8bb8f
-		i = open(path_dhcpd_pid, O_WRONLY|O_CREAT|O_TRUNC, 0644);
c8bb8f
+		i = open(path_dhcpd_pid, O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0644);
c8bb8f
 		if (i >= 0) {
c8bb8f
 			sprintf(pbuf, "%d\n", (int) getpid());
c8bb8f
 			IGNORE_RET (write(i, pbuf, strlen(pbuf)));
c8bb8f
@@ -840,9 +840,9 @@ main(int argc, char **argv) {
c8bb8f
                 close(2);
c8bb8f
 
c8bb8f
                 /* Reopen them on /dev/null. */
c8bb8f
-                open("/dev/null", O_RDWR);
c8bb8f
-                open("/dev/null", O_RDWR);
c8bb8f
-                open("/dev/null", O_RDWR);
c8bb8f
+                open("/dev/null", O_RDWR | O_CLOEXEC);
c8bb8f
+                open("/dev/null", O_RDWR | O_CLOEXEC);
c8bb8f
+                open("/dev/null", O_RDWR | O_CLOEXEC);
c8bb8f
                 log_perror = 0; /* No sense logging to /dev/null. */
c8bb8f
 
c8bb8f
        		IGNORE_RET (chdir("/"));
c8bb8f
diff -up dhcp-4.2.2b1/server/ldap.c.cloexec dhcp-4.2.2b1/server/ldap.c
c8bb8f
--- dhcp-4.2.2b1/server/ldap.c.cloexec	2010-03-25 16:26:58.000000000 +0100
c8bb8f
+++ dhcp-4.2.2b1/server/ldap.c	2011-07-01 14:13:31.043887665 +0200
c8bb8f
@@ -685,7 +685,7 @@ ldap_start (void)
c8bb8f
 
c8bb8f
   if (ldap_debug_file != NULL && ldap_debug_fd == -1)
c8bb8f
     {
c8bb8f
-      if ((ldap_debug_fd = open (ldap_debug_file, O_CREAT | O_TRUNC | O_WRONLY,
c8bb8f
+      if ((ldap_debug_fd = open (ldap_debug_file, O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC,
c8bb8f
                                  S_IRUSR | S_IWUSR)) < 0)
c8bb8f
         log_error ("Error opening debug LDAP log file %s: %s", ldap_debug_file,
c8bb8f
                    strerror (errno));