openldap/openldap-userconfig-setgid.patch

17 lines
517 B
Diff
Raw Normal View History

Normally, skips reading of user configuration file when running with different effective UID.
This patch adds the same behavior for GID.
Author: Nalin Dahyabhai <nalin@redhat.com>
--- openldap-2.4.24.orig/libraries/libldap/init.c
+++ openldap-2.4.24/libraries/libldap/init.c
@@ -670,7 +670,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