GNU bug report logs -
#33847
27.0.50; emacsclient does not find server socket
Previous Next
Reported by: Ulrich Mueller <ulm <at> gentoo.org>
Date: Sun, 23 Dec 2018 09:49:01 UTC
Severity: normal
Tags: patch
Merged with 41707
Found in version 27.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 33847 <at> debbugs.gnu.org (full text, mbox):
Ulrich Mueller wrote:
> IMHO that's not an acceptable solution. emacsclient should just work in
> the default configuration, without requiring the user to jump through
> hoops, and an Emacs daemon should persist between sessions (otherwise
> "daemon" would be a misnomer). Or is that use case really so uncommon?
We have a conflict here between "just work" and security. There are multiple
workarounds for the problem that you mention; if none of them are convenient
enough perhaps you can suggest a more-convenient one. The default should be
secure, though.
> if there is a security problem, how would it disappear by moving
> the socket to XDG_RUNTIME_DIR? Note that other tools like "screen" also
> place their sockets in a subdir of /tmp.
XDG_RUNTIME_DIR is guaranteed to be a directory owned by the user and readable
and writable by nobody else. /tmp/emacsUID does not have that property.
Tools like 'screen' that predate XDG_RUNTIME_DIR traditionally suffered from
similar security problems. On my Fedora 29 platform, 'screen' works around the
problem by being setgid 'screen' and putting files under /run/screen/S-eggert,
where /run/screen is mode drwxrwxr-x with owner 'root' and group 'screen'. The
exact location of the /run/screen directory is platform-specific; I guess that
it typically used to be /tmp/screens but got moved due to security concerns.
The 'screen' workaround does not appear to apply to Emacs, since Emacs is
programmable and if Emacs were made setgid its users could easily modify Emacs's
behavior to manipulate the contents of any such /run/emacs directory in any way
they pleased.
This bug report was last modified 3 years and 226 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.