Mercurial > dovecot > original-hg > dovecot-1.2
changeset 2767:54dfccbe7f11 HEAD
We failed with "Can't drop root group privileges" if root's gid wasn't 0.
This happened often with Solaris. Thanks to Gregory Bond for figuring out.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 18 Oct 2004 11:17:31 +0300 |
parents | 26a091f3add6 |
children | d344be0bb70f |
files | src/lib/restrict-access.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/restrict-access.c Mon Oct 18 04:13:25 2004 +0300 +++ b/src/lib/restrict-access.c Mon Oct 18 11:17:31 2004 +0300 @@ -203,7 +203,7 @@ } env = getenv("RESTRICT_GID_FIRST"); - if (gid != 0 || (env != NULL && atoi(env) != 0)) { + if ((gid != 0 || (env != NULL && atoi(env) != 0)) && uid != 0) { if (getgid() == 0 || getegid() == 0 || setgid(0) == 0) { if (gid == 0) i_fatal("GID 0 isn't permitted");