[dovecot-cvs] dovecot/src/lib restrict-access.c,1.14,1.15
cras at dovecot.org
cras at dovecot.org
Sat Aug 28 12:22:08 EEST 2004
Update of /home/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv20232/lib
Modified Files:
restrict-access.c
Log Message:
Or actually check also that RESTRICT_GID_FIRST=0 before allowing gid=0 use
Index: restrict-access.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/restrict-access.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- restrict-access.c 28 Aug 2004 09:19:59 -0000 1.14
+++ restrict-access.c 28 Aug 2004 09:22:06 -0000 1.15
@@ -199,7 +199,8 @@
i_fatal("We couldn't drop root privileges");
}
- if (gid != 0) {
+ env = getenv("RESTRICT_GID_FIRST");
+ if (gid != 0 || (env != NULL && atoi(env) != 0)) {
if (getgid() == 0 || getegid() == 0 || setgid(0) == 0)
i_fatal("We couldn't drop root group privileges");
}
More information about the dovecot-cvs
mailing list