[Date Prev][Date Next] [Chronological] [Thread] [Top]

test001-slapdadd stalled (ITS-697) (ITS#1100)



Hi --

	The Jitterbug interface to the OpenLDAP problem queue never gave me
	the "login screen" mentioned so I couldn't create an account to
	post a follow up to ITS-697 

	OpenLDAP-2.0.7 would build but not run the testsuite on BSD/OS 4.2
	(or 4.1)

	There were two bugs, one from OpenLDAP and one from BSD/OS' pthreads,
	that conspired to cause the problem.

	I can't take credit for tracking down the BSD/OS thread related part
	of the problem - hats off and a thank you to BSDI for putting in the
	time&effort on that front.

	OpenLDAP has code conditionalized on HAVE_FCNTL but its autoconf
	setup did not check for fcntl(2) being present on the system.    
	The BSD/OS pthreads implementation overlooked support for the obsolete
	ioctl(...,FIONBIO,...) call in the pthreads logic (fcntl(2) works fine).

	The fix is to have OpenLDAP's ./configure script check for fcntl() 
	thereby defining HAVE_FCNTL and to add a #include <fcntl.h> in one
	module.

	With these small changes OpenLDAP 2.0.7 runs the testsuite successfully.

	Apply the patch below to an unpacked OpenLDAP-2.0.7 source tree,
	run 'autoconf' (to regenerate ./configure) and follow the rest of the
	instructions.

	Steven Schultz
	sms@to.gd-es.com

----------------------cut here-------------------
--- ./include/portable.h.in.dist	Mon Oct 30 10:13:40 2000
+++ ./include/portable.h.in	Fri Mar 30 20:25:04 2001
@@ -144,6 +144,9 @@
 /* Define if you have the flock function.  */
 #undef HAVE_FLOCK
 
+/* Define if you have the fcntl function */
+#undef HAVE_FCNTL
+
 /* Define if you have the gai_strerror function.  */
 #undef HAVE_GAI_STRERROR
 
--- ./libraries/liblber/sockbuf.c.dist	Tue Oct 17 11:52:56 2000
+++ ./libraries/liblber/sockbuf.c	Fri Mar 30 20:20:36 2001
@@ -17,6 +17,10 @@
 #include <ac/string.h>
 #include <ac/unistd.h>
 
+#ifdef	HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+
 #ifdef HAVE_IO_H
 #include <io.h>
 #endif /* HAVE_IO_H */
--- ./configure.in.dist	Mon Oct 30 09:46:17 2000
+++ ./configure.in	Fri Mar 30 20:26:18 2001
@@ -2010,6 +2010,7 @@
 	chroot			\
 	endgrent		\
 	endpwent		\
+	fcntl			\
 	flock			\
 	getdtablesize	\
 	getgrgid		\