meta-starlingx/recipes-support/openldap/files/0007-openldap-userconfig-setgid.patch
babak sarashki 6fe3bd37d9 openldap port from stx to yocto
Not complete yet. Missing ltb-project-openldap-ppolicy
2019-11-05 18:58:33 -08:00

32 lines
961 B
Diff

From c4906ff521df3f1c9fc4a302300fc135447ee40a Mon Sep 17 00:00:00 2001
From: babak sarashki <babak.sarashki@windriver.com>
Date: Sun, 3 Nov 2019 14:38:21 -0800
Subject: [PATCH 07/20] openldap userconfig setgid
From Stx 1901: openldap-userconfig-setgid.patch
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>
---
libraries/libldap/init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libraries/libldap/init.c b/libraries/libldap/init.c
index 89235f9..de16b60 100644
--- a/libraries/libldap/init.c
+++ b/libraries/libldap/init.c
@@ -684,7 +684,7 @@ void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl )
openldap_ldap_init_w_sysconf(LDAP_CONF_FILE);
#ifdef HAVE_GETEUID
- if ( geteuid() != getuid() )
+ if ( geteuid() != getuid() || getegid() != getgid() )
return;
#endif
--
2.17.1