Blame SOURCES/openldap-setugid.patch

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