dovecot-1.3: Fix to previous restrict-access changes.

dovecot at dovecot.org dovecot at dovecot.org
Fri Apr 10 01:28:48 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.3/rev/85a587bcc16f
changeset: 9050:85a587bcc16f
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 09 18:28:39 2009 -0400
description:
Fix to previous restrict-access changes.

diffstat:

1 file changed, 9 insertions(+), 9 deletions(-)
src/lib/restrict-access.c |   18 +++++++++---------

diffs (32 lines):

diff -r e812e3ed2d6f -r 85a587bcc16f src/lib/restrict-access.c
--- a/src/lib/restrict-access.c	Thu Apr 09 14:51:24 2009 -0400
+++ b/src/lib/restrict-access.c	Thu Apr 09 18:28:39 2009 -0400
@@ -396,19 +396,19 @@ void restrict_access_by_env(const char *
 	restrict_access(&set, home);
 
 	/* clear the environment, so we don't fail if we get back here */
-	env_put("RESTRICT_SETUID=");
+	env_remove("RESTRICT_SETUID");
 	if (process_privileged_gid == (gid_t)-1) {
 		/* if we're dropping privileges before executing and
 		   a privileged group is set, the groups must be fixed
 		   after exec */
-		env_put("RESTRICT_SETGID=");
-		env_put("RESTRICT_SETGID_PRIV=");
-	}
-	env_put("RESTRICT_GID_FIRST=");
-	env_put("RESTRICT_GID_LAST=");
-	env_put("RESTRICT_SETEXTRAGROUPS=");
-	env_put("RESTRICT_USER=");
-	env_put("RESTRICT_CHROOT=");
+		env_remove("RESTRICT_SETGID");
+		env_remove("RESTRICT_SETGID_PRIV");
+	}
+	env_remove("RESTRICT_GID_FIRST");
+	env_remove("RESTRICT_GID_LAST");
+	env_remove("RESTRICT_SETEXTRAGROUPS");
+	env_remove("RESTRICT_USER");
+	env_remove("RESTRICT_CHROOT");
 }
 
 void restrict_access_allow_coredumps(bool allow ATTR_UNUSED)


More information about the dovecot-cvs mailing list