Bug 570

Summary: USER env var no longer set
Product: Sudo Reporter: Gary van der Merwe <garyvdm>
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: normal    
Priority: low    
Version: 1.8.6   
Hardware: PC   
OS: Linux   
Attachments: Fix setting USER, USERNAME and LOGNAME in sudoers

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.