components/openldap/patches/07-fopenF.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 openldap calling fopen() without F flag.
Patch was developed in-house; it is Solaris specific and
will not be contributed upstream.

--- openldap-2.4.44/libraries/liblber/debug.c.old	Wed Feb 24 13:31:09 2016
+++ openldap-2.4.44/libraries/liblber/debug.c	Wed Feb 24 13:31:32 2016
@@ -53,10 +53,10 @@
 
 #ifdef HAVE_WINSOCK
 	if( log_file == NULL ) {
-		log_file = fopen( LDAP_RUNDIR LDAP_DIRSEP "openldap.log", "w" );
+		log_file = fopen( LDAP_RUNDIR LDAP_DIRSEP "openldap.log", "wF" );
 
 		if ( log_file == NULL ) {
-			log_file = fopen( "openldap.log", "w" );
+			log_file = fopen( "openldap.log", "wF" );
 			if ( log_file == NULL ) return;
 		}
 
--- openldap-2.4.44/libraries/libldap/fetch.c.old	Wed Feb 24 13:31:41 2016
+++ openldap-2.4.44/libraries/libldap/fetch.c	Wed Feb 24 13:31:55 2016
@@ -79,7 +79,7 @@
 
 		ldap_pvt_hex_unescape( p );
 
-		url = fopen( p, "rb" );
+		url = fopen( p, "rbF" );
 
 		ber_memfree( p );
 	} else {

--- openldap-2.4.44/libraries/libldap/init.c.old	Wed Feb 24 13:32:07 2016
+++ openldap-2.4.44/libraries/libldap/init.c	Wed Feb 24 13:32:19 2016
@@ -167,7 +167,7 @@
 
 	Debug(LDAP_DEBUG_TRACE, "ldap_init: trying %s\n", file, 0, 0);
 
-	fp = fopen(file, "r");
+	fp = fopen(file, "rF");
 	if(fp == NULL) {
 		/* could not open file */
 		return;