[dovecot-cvs] dovecot/src/lib restrict-access.c,1.16,1.17

cras at dovecot.org cras at dovecot.org
Mon Oct 18 11:17:34 EEST 2004


Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv10795

Modified Files:
	restrict-access.c 
Log Message:
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.



Index: restrict-access.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/restrict-access.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- restrict-access.c	24 Sep 2004 13:05:09 -0000	1.16
+++ restrict-access.c	18 Oct 2004 08:17:31 -0000	1.17
@@ -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");



More information about the dovecot-cvs mailing list