Bug 515 - Sudoedit behaviour changed between sudo 1.7.4_p5 and 1.8.2
Sudoedit behaviour changed between sudo 1.7.4_p5 and 1.8.2
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.8.2
PC Linux
: low normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-08 14:08 MDT by punloh
Modified: 2011-10-22 19:39 MDT (History)
0 users

See Also:


Attachments
Patch to preserve LOGNAME, USER and USERNAME in sudoedit (855 bytes, patch)
2011-10-10 13:12 MDT, Todd C. Miller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description punloh 2011-10-08 14:08:26 MDT
When I had my sudo upgraded from 1.7.4_p5 to 1.8.2 sudoedit started to change
LOGNAME, USERNAME and USER environment variables to those of target user. Sudo
manual says resetting these variables when sudo is invoked is the expected
default behaviour while sudoedit is expected to run with environment unmodified. Both
1.8.1_p2 and 1.8.2 change the variables above while 1.7.4_p5 works as described
in the sudo manual. This is an inconvenience because editors such as emacs use
these vars to find the config files.
Comment 1 Todd C. Miller 2011-10-10 13:11:00 MDT
The problem is that set_logname was having an effect in edit mode.
Comment 2 Todd C. Miller 2011-10-10 13:12:45 MDT
Created attachment 317 [details]
Patch to preserve LOGNAME, USER and USERNAME in sudoedit

The problem is that "set_logname" is now the default and there was a missing check for edit mode when updating LOGNAME, etc.  The attached patch fixes this and will be in sudo 1.8.3.
Comment 3 Todd C. Miller 2011-10-22 19:39:10 MDT
Sudo 1.8.3 is out now which has this fixed.