Bug 570 - USER env var no longer set
USER env var no longer set
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.8.6
PC Linux
: low normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-11 04:15 MDT by Gary van der Merwe
Modified: 2012-09-17 05:07 MDT (History)
0 users

See Also:


Attachments
Fix setting USER, USERNAME and LOGNAME in sudoers (356 bytes, patch)
2012-09-11 09:50 MDT, Todd C. Miller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gary van der Merwe 2012-09-11 04:15:28 MDT
As of 1.8.6, the USER and USERNAME env var are nolonger set when using sudo.


With 1.8.5.p3-1:
$ sudo env | grep USER
USER=root
USERNAME=root
SUDO_USER=garyvdm

With 1.8.6:
$ sudo env | grep USER
SUDO_USER=garyvdm
Comment 1 Todd C. Miller 2012-09-11 09:50:00 MDT
Created attachment 355 [details]
Fix setting USER, USERNAME and LOGNAME in sudoers

I've attached the fix for this.  The check for duplicate environment variables was removing those in error.
Comment 2 Gary van der Merwe 2012-09-17 05:07:52 MDT
I upgraded to 1.8.6.p1 from the arch linux repos today. Confirming that the bug is fixed.

Thank you for the quick responce.