From: Todd C. Miller Date: Wed, 18 Aug 2010 19:25:19 +0000 (-0400) Subject: Set dupcheck to TRUE when setting new HOME value if !env_reset but X-Git-Tag: SUDO_1_7_5~189 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eaa58c24e920e64a4de58792d305a3a9d1501e31;p=sudo Set dupcheck to TRUE when setting new HOME value if !env_reset but always_set_home is true. Prevents a duplicate HOME in the environment (old value plus the new one) introduced in 9f97e4b43a4b. --HG-- branch : 1.7 --- diff --git a/env.c b/env.c index c6e0a6b43..739631fd7 100644 --- a/env.c +++ b/env.c @@ -766,7 +766,7 @@ rebuild_env(noexec) /* Set $HOME to target user if not preserving user's value. */ if (reset_home && !ISSET(didvar, KEPT_HOME)) - sudo_setenv("HOME", runas_pw->pw_dir, ISSET(didvar, DID_HOME)); + sudo_setenv("HOME", runas_pw->pw_dir, TRUE); /* Provide default values for $TERM and $PATH if they are not set. */ if (!ISSET(didvar, DID_TERM))