The SHELL environment variable was preserved from the user's

environment instead of being reset based on the passwd database
when the "env_reset" option was used.  Now it is reset as it should be.
This commit is contained in:
Todd C. Miller
2002-01-15 23:43:59 +00:00
parent 5236ceedf7
commit ea24bef19c
3 changed files with 8 additions and 25 deletions

2
env.c
View File

@@ -341,7 +341,7 @@ rebuild_env(sudo_mode, envp)
if (!(didvar & DID_HOME))
*nep++ = format_env("HOME", user_dir);
if (!(didvar & DID_SHELL))
*nep++ = format_env("SHELL", user_shell);
*nep++ = format_env("SHELL", sudo_user.pw->pw_shell);
if (!(didvar & DID_LOGNAME))
*nep++ = format_env("LOGNAME", user_name);
if (!(didvar & DID_USER))