1 From c4906ff521df3f1c9fc4a302300fc135447ee40a Mon Sep 17 00:00:00 2001
2 From: babak sarashki <babak.sarashki@windriver.com>
3 Date: Sun, 3 Nov 2019 14:38:21 -0800
4 Subject: [PATCH 07/20] openldap userconfig setgid
6 From Stx 1901: openldap-userconfig-setgid.patch
8 Normally, skips reading of user configuration file when running with different effective UID.
9 This patch adds the same behavior for GID.
11 Author: Nalin Dahyabhai <nalin@redhat.com>
13 libraries/libldap/init.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
16 diff --git a/libraries/libldap/init.c b/libraries/libldap/init.c
17 index 89235f9..de16b60 100644
18 --- a/libraries/libldap/init.c
19 +++ b/libraries/libldap/init.c
20 @@ -684,7 +684,7 @@ void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl )
21 openldap_ldap_init_w_sysconf(LDAP_CONF_FILE);
24 - if ( geteuid() != getuid() )
25 + if ( geteuid() != getuid() || getegid() != getgid() )