# Sudoedit behaviour changed [SOLVED]: upstream bug

## punloh

Hello. 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 runs with environment unmodified. Has anyone got an idea what I need to change to get back to the behaviour specified in manual. Right now I have to mask >=app-admin/sudo-1.8.1_p2.

Update: this was reported to upstream and confirmed to be a regression

http://www.sudo.ws/bugs/show_bug.cgi?id=515Last edited by punloh on Wed Oct 12, 2011 6:19 am; edited 1 time in total

----------

## Hu

Could you explain why this is a problem?  I understand from your post that the observed behavior deviates from the documented behavior, but it is not clear why this requires that you use an old version.

----------

## punloh

Perhaps I didn't make myself clear. Versions newer than 1.7.4_p5 deviate from expected behaviour while 1.7.4_p5 works as expected. So I have to stick with the old version until I resolve the problem with the newer ones.

----------

## Hu

That much was clear.  However, it is not clear what you are doing that relies on the behavior exhibited by older versions.

----------

## punloh

Emacs looks for init files based on the variables listed in the first post. So in the old version of sudo the sudoedit command ran Emacs with my user's configs while now it runs Emacs with root's configs. The whole point of sudoedit is being able to run any editor one wants customized the way one wants without compromising the security because actual modification of the protected file is handled by sudo while editor runs with invoking user's privileges and environment unmodified.

----------

