mrc0mmand / rpms / openldap

Forked from rpms/openldap 3 years ago
Clone
103552
Normally, skips reading of user configuration file when running with different effective UID.
103552
This patch adds the same behavior for GID.
103552
103552
Author: Nalin Dahyabhai <nalin@redhat.com>
103552
103552
diff --git a/libraries/libldap/init.c b/libraries/libldap/init.c
103552
index e6b17b4..fbf4829 100644
103552
--- a/libraries/libldap/init.c
103552
+++ b/libraries/libldap/init.c
103552
@@ -678,7 +678,7 @@ void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl )
103552
 	openldap_ldap_init_w_sysconf(LDAP_CONF_FILE);
103552
 
103552
 #ifdef HAVE_GETEUID
103552
-	if ( geteuid() != getuid() )
103552
+	if ( geteuid() != getuid() || getegid() != getgid() )
103552
 		return;
103552
 #endif
103552