projects
/
sudo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
440e9b7
)
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:41 +0000
(11:28 -0400)
committer
Todd C. Miller
<Todd.Miller@courtesan.com>
Tue, 14 Sep 2010 15:28:41 +0000
(11:28 -0400)
--HG--
branch : 1.7
env.c
patch
|
blob
|
history
diff --git
a/env.c
b/env.c
index d2562a2a3be4499eb5f016c2ffb07dfd188a3656..37762fe9e7619f0746d6ff01a50a48b3120f42c6 100644
(file)
--- a/
env.c
+++ b/
env.c
@@
-702,8
+702,8
@@
rebuild_env(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;
/*