Bug 135 - $HOME changes when it shouldn't
$HOME changes when it shouldn't
Status: RESOLVED INVALID
Product: Sudo
Classification: Unclassified
Component: Sudo
1.6.7
PC Linux
: normal normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-04-13 17:58 MDT by Todd Heer
Modified: 2004-05-12 18:39 MDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Todd Heer 2004-04-13 17:58:49 MDT
Seems as though something has changed between v1.6.2 and v1.6.7p5 such that when
a user who has "ALL=(ALL) ALL" in the sodoers file runs 'sudo su' the $HOME
environment variable gets changed, as opposed to 'sudo su -'. 

I have tried compiling the 1.6.7p5 version with and without the
--enable-shell-sets-home configuration option, but the results are the same -
$HOME gets changed to the "target" user (root in this case). Trying the -H and
-s flags has had no effect on the issue. 

It is my understanding that the default nature should be that $HOME remain the
same when running "sudo su", as it does with my v1.6.2 running on AIX.
Comment 1 Todd C. Miller 2004-05-12 14:39:27 MDT
No, this has not changed.  What *has* changed is that sudo now sets the USER and 
LOGNAME environment variables to the target user.  If you don't want that, add a 
line like:

    Defaults   !set_logname

to your sudoers file.