Blame SOURCES/openldap-userconfig-setgid.patch

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