Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > 172e847adc0819a13f4601fe4bd4f2d3 > files > 10

openldap-2.4.21-11.fc13.src.rpm

Don't read the user's configuration file if we're running in a setuid
or setgid application.
diff -up openldap-2.4.14/libraries/libldap/init.c.setugid openldap-2.4.14/libraries/libldap/init.c
--- openldap-2.4.14/libraries/libldap/init.c.setugid	2009-02-17 08:31:19.000000000 +0100
+++ openldap-2.4.14/libraries/libldap/init.c	2009-02-17 08:39:01.000000000 +0100
@@ -634,7 +634,7 @@ void ldap_int_initialize( struct ldapopt
 	openldap_ldap_init_w_sysconf(LDAP_CONF_FILE);
 
 #ifdef HAVE_GETEUID
-	if ( geteuid() != getuid() )
+	if ( geteuid() != getuid() || getegid() != getgid() )
 		return;
 #endif