all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: ibeas@gmx.com (Álvar Ibeas)
Cc: 19477@debbugs.gnu.org
Subject: bug#19477: 24.4; Init script from su terminal
Date: Wed, 31 Dec 2014 13:36:26 -0500	[thread overview]
Message-ID: <gma9238y51.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <87iogrixn9.fsf@gmx.com> ("Álvar Ibeas"'s message of "Wed, 31 Dec 2014 17:36:58 +0100")

Álvar Ibeas wrote:

> ``if you run Emacs from a shell started by `su', Emacs tries to find
> your own `.emacs', not that of the user you are currently pretending
> to be [...] It gets your user name from the environment variables
> `LOGNAME' and `USER'.''
>
> The variables LOGNAME and USER have both the value `root'. The command
> `logname' returns instead my own user name.

Emacs is behaving as documented.

The `su' programs from coreutils (it's since been removed in favour of
the util-linux one) and util-linux (as used by eg Red Hat) do not change
LOGNAME or USER when su'ing to root.

It seems that Debian's `su' comes from the `shadow' package and does
change them.

But all the `su' programs are behaving as documented too.
It's a shame they don't agree with each other...





  reply	other threads:[~2014-12-31 18:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-31 16:36 bug#19477: 24.4; Init script from su terminal Álvar Ibeas
2014-12-31 18:36 ` Glenn Morris [this message]
     [not found] ` <mailman.17015.1420051024.1147.bug-gnu-emacs@gnu.org>
2014-12-31 19:34   ` Álvar Ibeas
2015-01-02 19:01     ` Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gma9238y51.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=19477@debbugs.gnu.org \
    --cc=ibeas@gmx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.