This is an automated email from the git hooks/post-receive script.
tbordaz pushed a commit to branch master
in repository 389-ds-base.
The following commit(s) were added to refs/heads/master by this push:
new a784a4e Ticket 49975: followup for broken prefix deployment
a784a4e is described below
commit a784a4eef6e77fc4ef3de2ad688edc7d1cb70616
Author: Thierry Bordaz <tbordaz(a)redhat.com>
AuthorDate: Tue Nov 6 10:21:16 2018 +0100
Ticket 49975: followup for broken prefix deployment
Bug Description:
setgroups fails when not called by superuser. In case of prefix deployment
DS is started by regular user
Fix Description:
Only superuser calls setgroups
https://pagure.io/389-ds-base/issue/49975
Reviewed by: Mark Reynolds, Ludwig Krispenz and William Brown
Platforms tested: F27
Flag Day: no
Doc impact: no
---
ldap/servers/slapd/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ldap/servers/slapd/main.c b/ldap/servers/slapd/main.c
index 8423641..d754c0f 100644
--- a/ldap/servers/slapd/main.c
+++ b/ldap/servers/slapd/main.c
@@ -394,7 +394,7 @@ main_setuid(char *username)
*
* In the future this may change however.
*/
- if (setgroups(0, NULL) != 0) {
+ if ((getuid()==0) && setgroups(0, NULL) != 0) {
int oserr = errno;
slapi_log_err(SLAPI_LOG_ERR, "main_setuid", "setgroups(0,
NULL) != 0, error %d (%s)\n",
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.