dovecot-2.1: restrict_access(): If privileged and primary GIDs a...

dovecot at dovecot.org dovecot at dovecot.org
Sat Jan 28 20:09:06 EET 2012


details:   http://hg.dovecot.org/dovecot-2.1/rev/9b8657a98e2e
changeset: 14022:9b8657a98e2e
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Jan 28 20:08:40 2012 +0200
description:
restrict_access(): If privileged and primary GIDs are the same, ignore privileged GID.

diffstat:

 src/lib/restrict-access.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r 2a4b425b05dc -r 9b8657a98e2e src/lib/restrict-access.c
--- a/src/lib/restrict-access.c	Sat Jan 28 19:48:48 2012 +0200
+++ b/src/lib/restrict-access.c	Sat Jan 28 20:08:40 2012 +0200
@@ -267,6 +267,10 @@
 	/* set the primary/privileged group */
 	process_primary_gid = set->gid;
 	process_privileged_gid = set->privileged_gid;
+	if (process_privileged_gid == process_primary_gid) {
+		/* a pointless configuration, ignore it */
+		process_privileged_gid = (gid_t)-1;
+	}
 
 	have_root_group = process_primary_gid == 0;
 	if (process_primary_gid != (gid_t)-1 ||


More information about the dovecot-cvs mailing list