GNU bug report logs - #36583
26.1; emacs 26 tries loading original user's .emacs after su to root

Previous Next

Package: emacs;

Reported by: Steinar Bang <sb <at> dod.no>

Date: Wed, 10 Jul 2019 20:24:02 UTC

Severity: minor

Merged with 19477, 36604

Found in version 26.1

Full log


Message #15 received at 36583 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 36583 <at> debbugs.gnu.org, Steinar Bang <sb <at> dod.no>
Subject: Re: bug#36583: 26.1; emacs 26 tries loading original user's .emacs
 after su to root
Date: Thu, 11 Jul 2019 18:58:40 -0400
> This is explicitly documented in the manual.
> "How Emacs Finds Your Init File".

FWIW, I find this behavior very surprising (and dangerous).

Apparently you can circumvent it by setting LOGNAME to "root".

I can't find the place in code which distinguishes this case from the
case where the user doesn't `su` but instead sets his $HOME to some
other place, such as:

    HOME=/home/monnier/tmp/home emacs

BTW, thinking about "dangerous" above, I guess the behavior might make
sense when you're `su`ing *from* root rather than the other way around.


        Stefan





This bug report was last modified 123 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.