dovecot-1.3: restrict-access: Minor code cleanup.

dovecot at dovecot.org dovecot at dovecot.org
Fri Apr 10 02:14:28 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.3/rev/af9ac89e0910
changeset: 9055:af9ac89e0910
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 09 19:14:23 2009 -0400
description:
restrict-access: Minor code cleanup.

diffstat:

1 file changed, 1 insertion(+), 3 deletions(-)
src/lib/restrict-access.c |    4 +---

diffs (21 lines):

diff -r d591ee76ab9c -r af9ac89e0910 src/lib/restrict-access.c
--- a/src/lib/restrict-access.c	Thu Apr 09 19:14:06 2009 -0400
+++ b/src/lib/restrict-access.c	Thu Apr 09 19:14:23 2009 -0400
@@ -28,8 +28,6 @@ void restrict_access_init(struct restric
 	set->uid = (uid_t)-1;
 	set->gid = (gid_t)-1;
 	set->privileged_gid = (gid_t)-1;
-	set->first_valid_gid = 0;
-	set->last_valid_gid = (gid_t)-1;
 }
 
 static const char *get_uid_str(uid_t uid)
@@ -136,7 +134,7 @@ static void drop_restricted_groups(const
 
 	for (i = 0, used = 0; i < *gid_count; i++) {
 		if (gid_list[i] >= set->first_valid_gid &&
-		    (set->last_valid_gid == (gid_t)-1 ||
+		    (set->last_valid_gid == 0 ||
 		     gid_list[i] <= set->last_valid_gid)) {
 			if (gid_list[i] == 0)
 				*have_root_group = TRUE;


More information about the dovecot-cvs mailing list