mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
In -i mode, base the value of insert_env()'s dupcheck flag on DID_FOO flags.
Move checks for $HOME resetting into rebuild_env()
This commit is contained in:
5
sudo.c
5
sudo.c
@@ -332,11 +332,6 @@ main(argc, argv)
|
||||
if (ISSET(sudo_mode, MODE_IMPLIED_SHELL) && !def_shell_noargs)
|
||||
usage(1);
|
||||
|
||||
/* May need to set $HOME to target user if we are running a command. */
|
||||
if (ISSET(sudo_mode, MODE_RUN) && (def_always_set_home ||
|
||||
(ISSET(sudo_mode, MODE_SHELL) && def_set_home)))
|
||||
SET(sudo_mode, MODE_RESET_HOME);
|
||||
|
||||
/* Bail if a tty is required and we don't have one. */
|
||||
if (def_requiretty) {
|
||||
if ((fd = open(_PATH_TTY, O_RDWR|O_NOCTTY)) == -1)
|
||||
|
Reference in New Issue
Block a user