projects
/
sudo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ece29bd
)
Reset HOME for "sudo -i" even if HOME was listed in env_keep.
author
Todd C. Miller
<Todd.Miller@courtesan.com>
Tue, 14 Sep 2010 15:28:40 +0000
(11:28 -0400)
committer
Todd C. Miller
<Todd.Miller@courtesan.com>
Tue, 14 Sep 2010 15:28:40 +0000
(11:28 -0400)
plugins/sudoers/env.c
patch
|
blob
|
history
diff --git
a/plugins/sudoers/env.c
b/plugins/sudoers/env.c
index 829c3b63b7c71122fc94e46541a3e41f44e93281..1ebb61807c27bc1bc9f2f17bbd143ce45f96cc1a 100644
(file)
--- a/
plugins/sudoers/env.c
+++ b/
plugins/sudoers/env.c
@@
-523,8
+523,8
@@
rebuild_env(int noexec)
sudo_setenv("USERNAME", user_name, FALSE);
}
- /* If
we didn't keep HOME, reset it based on target user
. */
- if (!ISSET(didvar, KEPT_HOME))
+ /* If
not a login shell and it wasn't kept above, reset HOME
. */
+ if (
ISSET(sudo_mode, MODE_LOGIN_SHELL) ||
!ISSET(didvar, KEPT_HOME))
reset_home = TRUE;
/*