diff options
| author | Alexander Barton <alex@barton.de> | 2013-08-27 00:39:59 +0200 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2013-08-27 00:41:36 +0200 |
| commit | 41f75b69740bd205864bd34afbb65ab0a3776136 (patch) | |
| tree | a77df8b7876f954fb81876e4444e1228c86ff2d0 /src | |
| parent | e009ccbe66f67a4c5344d6a1f415c50b699765ad (diff) | |
| download | ngircd-41f75b69740bd205864bd34afbb65ab0a3776136.tar.gz ngircd-41f75b69740bd205864bd34afbb65ab0a3776136.zip | |
Ignore "operation not permitted" while dropping groups
Without this exception, you can't start ngIRCd as user any more, it is analog to setting the user and group ID.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ngircd/ngircd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c index 4099719b..e26ac3bd 100644 --- a/src/ngircd/ngircd.c +++ b/src/ngircd/ngircd.c @@ -725,9 +725,11 @@ NGIRCd_Init(bool NGIRCd_NoDaemon) goto out; } if (setgroups(0, NULL) != 0) { - Log(LOG_ERR, "Can't drop supplementary group ids: %s!", + real_errno = errno; + Log(LOG_ERR, "Can't drop supplementary group IDs: %s!", strerror(errno)); - goto out; + if (real_errno != EPERM) + goto out; } } #endif |