components/openldap/patches/06-mdb-reopen.patch
author zihao.zhu@oracle.com <zihao.zhu@oracle.com>
Tue, 03 May 2016 19:23:30 -0700
changeset 5911 a8d897c4c442
permissions -rw-r--r--
PSARC/2016/225 OpenLDAP Update to 2.4.44 22159934 Update OpenLDAP 2.4.30 to OpenLDAP 2.4.44 15793387 Does slapd really belong in pkg:/library/openldap? 15811938 libldap_r-2.4.so.2.8.3`ldap_parse_sasl_bind_result+0x18d memory leaks 17937475 CVE-2013-4449: openldap: segfault on certain queries with rwm overlay 21837740 problem in SERVICE/OPENLDAP 21645415 OpenLDAP core dumps if listener-threads is set to 2 19597840 libldap_r-2.4.so.2.8.3`ldap_new_connection+0x192 causes SIGSEGV 20866611 TLS_PROTOCOL_MIN functional but undocumented in ldap.conf(5oldap) 21614972 ldapmodify doesn't operate as expected due to solaris renaming 21247153 openldap account should be password=NP not default to locked 21232554 binary is named openldapsearch, man page is ldapsearch 21630074 openldap calling fopen() without F 15826440 svc:/network/ldap/server:openldap_24 needs properties for slapd options 21607640 openldap server needs to support ldaps by default 18230501 OpenLDAP should ship with lint libraries 21772464 svc:/network/ldap/server:openldap_24 needs management authorizations 22959761 Need to set proper privileges in the method_credential in OpenLDAP manifest 23057730 pkg mediator should be used for OpenLDAP installation

Fixes problem with mdb reopen issue in the latest OpenLDAP 2.4.44 release.
Patch was developed in-house; it is Solaris specific and
will not be contributed upstream.

--- openldap-2.4.44/libraries/liblmdb/mdb.c.old	Wed Jan 13 15:03:32 2016
+++ openldap-2.4.44/libraries/liblmdb/mdb.c	Wed Jan 13 15:04:00 2016
@@ -4619,6 +4619,10 @@
 #else	/* MDB_USE_POSIX_MUTEX: */
 		pthread_mutexattr_t mattr;

+		/* destroy mti_rmutex and mti_wmutex if they were previously initialized */
+		(void) pthread_mutex_destroy(env->me_txns->mti_rmutex);
+		(void) pthread_mutex_destroy(env->me_txns->mti_wmutex); 
+
 		if ((rc = pthread_mutexattr_init(&mattr))
 			|| (rc = pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED))
 #ifdef MDB_ROBUST_SUPPORTED