From: Timo Sirainen Date: Thu, 9 Apr 2009 22:28:39 +0000 (-0400) Subject: Fix to previous restrict-access changes. X-Git-Tag: 2.0.alpha1~1002 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9652fd05b562c1fc2e81ad6da99ad42edbbb30c5;p=thirdparty%2Fdovecot%2Fcore.git Fix to previous restrict-access changes. --HG-- branch : HEAD --- diff --git a/src/lib/restrict-access.c b/src/lib/restrict-access.c index 34bfad8b48..041e1afaab 100644 --- a/src/lib/restrict-access.c +++ b/src/lib/restrict-access.c @@ -396,19 +396,19 @@ void restrict_access_by_env(const char *home, bool disallow_root) 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_remove("RESTRICT_SETGID"); + env_remove("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_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)