dovecot-1.3: restrict-access: One more root dropping fix.

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/d591ee76ab9c
changeset: 9054:d591ee76ab9c
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 09 19:14:06 2009 -0400
description:
restrict-access: One more root dropping fix.

diffstat:

1 file changed, 1 insertion(+), 1 deletion(-)
src/lib/restrict-access.c |    2 +-

diffs (12 lines):

diff -r 59165b07c874 -r d591ee76ab9c src/lib/restrict-access.c
--- a/src/lib/restrict-access.c	Thu Apr 09 19:08:07 2009 -0400
+++ b/src/lib/restrict-access.c	Thu Apr 09 19:14:06 2009 -0400
@@ -297,7 +297,7 @@ void restrict_access(const struct restri
 	}
 
 	/* verify that we actually dropped the privileges */
-	if (set->uid != 0 || disallow_root) {
+	if ((set->uid != (uid_t)-1 && set->uid != 0) || disallow_root) {
 		if (setuid(0) == 0) {
 			if (disallow_root &&
 			    (set->uid == 0 || set->uid == (uid_t)-1))


More information about the dovecot-cvs mailing list