|
Bugzilla – Full Text Bug Listing |
| Summary: | sudo resets HOME envar | ||
|---|---|---|---|
| Product: | Sudo | Reporter: | Tushar Teredesai <sukucorp> |
| Component: | Sudo | Assignee: | Todd C. Miller <Todd.Miller> |
| Status: | VERIFIED FIXED | ||
| Severity: | normal | ||
| Priority: | normal | ||
| Version: | 1.6.9 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Attachments: | add HOME to initial_keepenv_table to preserve HOME | ||
You are correct; I've fixed this in the sudo cvs tree. |
Created attachment 223 [details] add HOME to initial_keepenv_table to preserve HOME sudo is configured with the following options: "--disable-root-mailer --enable-noargs-shell --without-mail-if-no-user --disable-pam-session --without-lecture --without-sendmail --with-logging=file --without-pam". The sudoers file is the default that is installed by the package. As root, when I execute the command: HOME=<some_dir> sudo -u <some_user> HOME is set to /root (root's home dir) not <some_dir>. As per the documentation, sudo should not mess with the HOME envar unless -H or -i is specified. To fix it, I added HOME to the initial_keepenv_table (patch attached).