From 9652fd05b562c1fc2e81ad6da99ad42edbbb30c5 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 9 Apr 2009 18:28:39 -0400 Subject: [PATCH] Fix to previous restrict-access changes. --HG-- branch : HEAD --- src/lib/restrict-access.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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) -- 2.47.3