svn commit: r453156 - in head/net/openldap24-server: . files
Xin LI
delphij at FreeBSD.org
Mon Oct 30 05:53:40 UTC 2017
Author: delphij
Date: Mon Oct 30 05:53:38 2017
New Revision: 453156
URL: https://svnweb.freebsd.org/changeset/ports/453156
Log:
Workaround an issue with kqueue support.
OpenLDAP does slapd_daemon_init() which will initialize kqueue(), but then
calls lutil_detach() which will fork(), and the fork() would invalidate the
kqueue descriptor in the child process.
Completely solving this would require some intrusive changes so workaround
this for now by calling rfork() without RFFDG and reorder file descriptor
closure order.
While I'm there also refrain from stopping slapd when deinstalling.
Modified:
head/net/openldap24-server/Makefile
head/net/openldap24-server/files/extrapatch-ITS6300
head/net/openldap24-server/pkg-plist
Modified: head/net/openldap24-server/Makefile
==============================================================================
--- head/net/openldap24-server/Makefile Mon Oct 30 04:04:27 2017 (r453155)
+++ head/net/openldap24-server/Makefile Mon Oct 30 05:53:38 2017 (r453156)
@@ -65,7 +65,7 @@ BROKEN= incompatible OpenLDAP version: ${WANT_OPENLD
.endif
PORTREVISION_CLIENT= 0
-PORTREVISION_SERVER= 2
+PORTREVISION_SERVER= 3
OPENLDAP_SHLIB_MAJOR= 2
OPENLDAP_SHLIB_MINOR= 10.8
OPENLDAP_MAJOR= ${DISTVERSION:R}
Modified: head/net/openldap24-server/files/extrapatch-ITS6300
==============================================================================
--- head/net/openldap24-server/files/extrapatch-ITS6300 Mon Oct 30 04:04:27 2017 (r453155)
+++ head/net/openldap24-server/files/extrapatch-ITS6300 Mon Oct 30 05:53:38 2017 (r453156)
@@ -404,3 +404,31 @@
if ( LogTest( LDAP_DEBUG_ANY )) {
int t = ldap_pvt_thread_pool_backload( &connection_pool );
+--- libraries/liblutil/detach.c.orig 2017-06-01 20:01:07 UTC
++++ libraries/liblutil/detach.c
+@@ -73,7 +73,7 @@ lutil_detach( int debug, int do_close )
+ #ifdef HAVE_THR
+ pid = fork1();
+ #else
+- pid = fork();
++ pid = rfork(RFPROC);
+ #endif
+ switch ( pid )
+ {
+--- servers/slapd/main.c.orig 2017-06-01 20:01:07 UTC
++++ servers/slapd/main.c
+@@ -923,12 +923,11 @@ unhandled_option:;
+ if ( pid ) {
+ char buf[4];
+ rc = EXIT_SUCCESS;
+- close( waitfds[1] );
+ if ( read( waitfds[0], buf, 1 ) != 1 )
+ rc = EXIT_FAILURE;
+- _exit( rc );
+- } else {
++ close( waitfds[1] );
+ close( waitfds[0] );
++ _exit( rc );
+ }
+ }
+ #endif /* HAVE_WINSOCK */
Modified: head/net/openldap24-server/pkg-plist
==============================================================================
--- head/net/openldap24-server/pkg-plist Mon Oct 30 04:04:27 2017 (r453155)
+++ head/net/openldap24-server/pkg-plist Mon Oct 30 05:53:38 2017 (r453156)
@@ -1,4 +1,3 @@
- at preunexec %%RC_DIR%%/etc/rc.d/slapd stop 2>&1 >/dev/null || true
%%ETCDIR%%/schema/README
%%ETCDIR%%/schema/collective.ldif
@sample %%ETCDIR%%/schema/collective.schema.sample
More information about the svn-ports-head
mailing list