Blame SOURCES/openldap-setugid.patch

2a8beb
Don't read the user's configuration file if we're running in a setuid
2a8beb
or setgid application.
2a8beb
--- openldap-2.2.13/libraries/libldap/init.c	2004-06-15 11:51:32.000000000 -0400
2a8beb
+++ openldap-2.2.13/libraries/libldap/init.c	2004-06-15 13:42:35.000000000 -0400
2a8beb
@@ -572,10 +572,11 @@
2a8beb
 		if( user != NULL ) {
2a8beb
 			gopts->ldo_def_sasl_authcid = LDAP_STRDUP( user );
2a8beb
 		}
2a8beb
-    }
2a8beb
+	}
2a8beb
 #endif
2a8beb
 
2a8beb
 	openldap_ldap_init_w_sysconf(LDAP_CONF_FILE);
2a8beb
+	if( ( getuid() == geteuid() ) && ( getgid() == getegid() ) ) {
2a8beb
 	openldap_ldap_init_w_userconf(LDAP_USERRC_FILE);
2a8beb
 
2a8beb
 	{
2a8beb
@@ -605,4 +606,5 @@
2a8beb
 	}
2a8beb
 
2a8beb
 	openldap_ldap_init_w_env(gopts, NULL);
2a8beb
+	}
2a8beb
 }