]> granicus.if.org Git - sudo/commitdiff
Set dupcheck to TRUE when setting new HOME value if !env_reset but
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 18 Aug 2010 19:25:19 +0000 (15:25 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 18 Aug 2010 19:25:19 +0000 (15:25 -0400)
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

env.c

diff --git a/env.c b/env.c
index c6e0a6b43fdfa144fb3f138a024a3e7c8162f2ae..739631fd736bed8aac91c80b34ed4afb0978f44b 100644 (file)
--- 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))