dovecot: If RESTRICT_* environments aren't set, don't try to ena...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Jan 6 00:19:14 EET 2008
details: http://hg.dovecot.org/dovecot/rev/bffc8788eb94
changeset: 7112:bffc8788eb94
user: Timo Sirainen <tss at iki.fi>
date: Sun Jan 06 00:19:10 2008 +0200
description:
If RESTRICT_* environments aren't set, don't try to enable group -1.
diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
src/lib/restrict-access.c | 6 +++++-
diffs (19 lines):
diff -r 3b61ff127127 -r bffc8788eb94 src/lib/restrict-access.c
--- a/src/lib/restrict-access.c Sat Jan 05 02:29:24 2008 +0200
+++ b/src/lib/restrict-access.c Sun Jan 06 00:19:10 2008 +0200
@@ -112,10 +112,14 @@ static void fix_groups_list(const char *
return;
}
} else {
+ if (egid == (gid_t)-1 && *tmp == NULL) {
+ /* nothing to do */
+ return;
+ }
/* Some OSes don't like an empty groups list,
so use the effective GID as the only one. */
gid_list = t_new(gid_t, 2);
- gid_list[0] = egid;
+ gid_list[0] = egid != (gid_t)-1 ? egid : getegid();
gid_count = 1;
}
More information about the dovecot-cvs
mailing list