all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ulrich Mueller <ulm@gentoo.org>
To: emacs-devel@gnu.org
Subject: Re: Questions about XDG_RUNTIME_DIR and server-socket-dir
Date: Mon, 04 Feb 2019 13:49:14 +0100	[thread overview]
Message-ID: <w6gzhrbra5x.fsf@kph.uni-mainz.de> (raw)
In-Reply-To: <32b703fc-e89c-23c3-cf21-74b4af6640f1@cs.ucla.edu> (Paul Eggert's message of "Sat, 2 Feb 2019 22:10:24 -0800")

>>>>> On Sun, 03 Feb 2019, Paul Eggert wrote:

> XDG_RUNTIME_DIR is a per-user-login directory that is like TMPDIR
> except without some of the security problems of TMPDIR (e.g., an
> attacker can create a symlink in TMPDIR to some victim location). That
> is, XDG_RUNTIME_DIR is accessible only to you, whereas TMPDIR
> traditionally is world-accessible. Also, XDG_RUNTIME_DIR's lifetime is
> intended to be just while the user is logged in. For more, please see:

> https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

That limited lifetime is also one of its problems, as I had already
pointed out in bug #33847. XDG_RUNTIME_DIR will disappear when the login
session ends, leading to an Emacs daemon process that has no socket and
can no longer be connected to. However, I suspect that some peoples'
workflow includes an Emacs daemon process that persists their login
session, which is no longer possible with the new location (at least not
in the default configuration).

> I don't see the harm in changing it, if each new setting is intended
> to correspond to a different user login. That might be simpler than
> adding yet another environment variable.

I had suggested (including a patch) in bug #33847 that the client should
fall back to TMPDIR if it doesn't find the socket in XDG_RUNTIME_DIR.
That way, the daemon could started from an environment without
XDG_RUNTIME_DIR (i.e., with the socket in TMPDIR, persisting login
sessions), and emacsclient would still find the socket, even if the
users started it from a GUI session.



      parent reply	other threads:[~2019-02-04 12:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-03  5:21 Questions about XDG_RUNTIME_DIR and server-socket-dir Phil Sainty
2019-02-03  6:01 ` Eli Zaretskii
2019-02-03  9:18   ` Phil Sainty
2019-02-03 11:21     ` Eli Zaretskii
2019-02-03 21:12       ` Phil Sainty
2019-02-04  3:30         ` Eli Zaretskii
2019-02-04  4:10           ` Stefan Monnier
2019-02-04  5:06           ` Phil Sainty
2019-02-03  6:10 ` Paul Eggert
2019-02-03  8:41   ` Phil Sainty
2019-02-03 16:42     ` Paul Eggert
2019-02-04 12:49   ` Ulrich Mueller [this message]

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=w6gzhrbra5x.fsf@kph.uni-mainz.de \
    --to=ulm@gentoo.org \
    --cc=emacs-devel@gnu.org \
    /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.