On Fri, Aug 24, 2018 at 6:24 AM Vincent Lefevre <vinc...@vinc17.net> wrote:
>
> On 2018-08-14 10:51:41 -0700, Chris Waters wrote:
> > Vincent Lefevre <vinc...@vinc17.net> writes:
> > > But in any case, the bug needs to be fixed.
> >
> > Yeah, I don't believe this can reasonably be called a bug. Emacs, like
> > a lot of big complex apps, can and does write to various parts of the
> > filesystem when used. There's a good chance that if you check your
> > home directory, you'll find more files owned by root. Files like
> > .emacs.d/recentf or .emacs.d/auto-save-list/* or .emacs-places.
>
> Wrong. The "su" command changes the value of HOME to the home of the
> root user. Thus there are no issues with these files.

Ok, sorry that I can't remember *all* the ways that "su" without a
login option is broken. Even with that, it's still plenty broken, as
you have observed, which is why the man page for su recommends *not
using it without the login option*. There are simply too many things
that can break when you have random environment variables left around
pointing who-knows-where.

Blaming emacs for a problem with su which is documented by the su man
page, though, is simply not reasonable. If you're going to insist on
using su instead of sudo, then it's your job to vet all your
environment variables to make sure you don't get this sort of
well-documented side effect. Which can affect all sorts of
programs--not just emacs.

Reply via email to