Subject: Re: bug#19477: 24.4; Init script from su terminal

From: Glenn Morris <[email-masked]>
Date: Fri, 02 Jan 2015 14:01:44 -0500

I'm not sure this should be closed.
Perhaps there is a better way for Emacs to do what it wants
(get the name under which you logged in) than consulting LOGNAME.
Eg it could do what `logname' the program does.
Although reading the info page for that, what it does (check
/var/run/utmp etc) doesn't seem that great, or portable.

I'm not sure that what Debian's su does is "correct", but I could not
find a standard for su. In any case, this seems like one of those things
that is impossible to ever get changed, because people come to rely on
it behaving the way it does.

In any case, I think the Emacs documentation could stand to be tweaked a
bit. Eg util-linux/coreutils su only leaves LOGNAME alone if you change
to root, not if you change to a non-root user.