Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-integ / recipes-support / openldap / files / 0007-openldap-userconfig-setgid.patch
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
5
6 From Stx 1901: openldap-userconfig-setgid.patch
7
8 Normally, skips reading of user configuration file when running with different effective UID.
9 This patch adds the same behavior for GID.
10
11 Author: Nalin Dahyabhai <nalin@redhat.com>
12 ---
13  libraries/libldap/init.c | 2 +-
14  1 file changed, 1 insertion(+), 1 deletion(-)
15
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);
22  
23  #ifdef HAVE_GETEUID
24 -       if ( geteuid() != getuid() )
25 +       if ( geteuid() != getuid() || getegid() != getgid() )
26                 return;
27  #endif
28  
29 -- 
30 2.17.1
31