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:
3
sudo.c
3
sudo.c
@@ -511,7 +511,8 @@ init_vars(sudo_mode)
|
||||
log_error(0, "uid %ld does not exist in the passwd file!",
|
||||
(long) pw.pw_uid);
|
||||
}
|
||||
user_shell = sudo_user.pw->pw_shell;
|
||||
if (user_shell == NULL || *user_shell == '\0')
|
||||
user_shell = sudo_user.pw->pw_shell;
|
||||
|
||||
/* It is now safe to use log_error() and set_perms() */
|
||||
|
||||
|
Reference in New Issue
Block a user