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 f421f8827340.
This commit is contained in:
@@ -587,7 +587,7 @@ rebuild_env(int noexec)
|
|||||||
|
|
||||||
/* Set $HOME to target user if not preserving user's value. */
|
/* Set $HOME to target user if not preserving user's value. */
|
||||||
if (reset_home && !ISSET(didvar, KEPT_HOME))
|
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. */
|
/* Provide default values for $TERM and $PATH if they are not set. */
|
||||||
if (!ISSET(didvar, DID_TERM))
|
if (!ISSET(didvar, DID_TERM))
|
||||||
|
Reference in New Issue
Block a user