]> 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:26:26 +0000 (15:26 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 18 Aug 2010 19:26:26 +0000 (15:26 -0400)
always_set_home is true.  Prevents a duplicate HOME in the environment
(old value plus the new one) introduced in f421f8827340.

plugins/sudoers/env.c

index bfae6a1b73cd2ddde6d9ddbe013fbaec38dfeb7d..1985bd0096c94cf37cb8dcb71f24ddd8849e7e0c 100644 (file)
@@ -587,7 +587,7 @@ rebuild_env(int 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))