2
0
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:
Todd C. Miller
2005-02-16 04:16:22 +00:00
parent 74894ebf62
commit 87a8b5b48b
2 changed files with 14 additions and 11 deletions

5
sudo.c
View File

@@ -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)