diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-01-06 13:46:54 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2020-01-06 14:33:10 +0000 |
commit | ccbb15c9d7d7cac10228311aa1c7e448343a345d (patch) | |
tree | c7dec29d7f73f8aa66f456bb51f5a4605879c836 /src | |
parent | 53ef3d8498e76615b531f2f61604334e9884ba03 (diff) |
Hurd: account for setgroups() being callable unprivileged
Diffstat (limited to 'src')
-rw-r--r-- | src/src/exim.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/src/exim.c b/src/src/exim.c index 3fda22232..af4b52559 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -3641,15 +3641,15 @@ an error return. The following code should cope with both types of system. in the call to exim_setugid(). However, if this process isn't running as root, setgroups() can't be used -since you have to be root to run it, even if throwing away groups. Not being -root here happens only in some unusual configurations. We just ignore the -error. */ +since you have to be root to run it, even if throwing away groups. +Except, sigh, for Hurd - where you can. +Not being root here happens only in some unusual configurations. */ -if ( +if ( !unprivileged #ifndef OS_SETGROUPS_ZERO_DROPS_ALL - setgroups(0, NULL) != 0 && + && setgroups(0, NULL) != 0 #endif - setgroups(1, group_list) != 0 && !unprivileged) + && setgroups(1, group_list) != 0) exim_fail("exim: setgroups() failed: %s\n", strerror(errno)); /* If the configuration file name has been altered by an argument on the |