unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#51327: 28.0.60; emacsclient warns about XDG_RUNTIME_DIR when starting daemon on-demand
@ 2021-10-22  4:58 Jim Porter
  2021-10-30 19:37 ` Jim Porter
  2021-11-05 10:38 ` bug#51327: 28.0.60; emacsclient warns about XDG_RUNTIME_DIR when starting daemon on demand Ulrich Mueller
  0 siblings, 2 replies; 35+ messages in thread
From: Jim Porter @ 2021-10-22  4:58 UTC (permalink / raw)
  To: 51327; +Cc: eggert

Normally, when running `emacsclient --alternate-editor=""' with no Emacs 
server running, it will run `emacs --daemon' and then connect to it. In 
Emacs 28, it will also issue the following warning:

   Should XDG_RUNTIME_DIR='/run/user/1000' be in the environment?
   (Be careful: XDG_RUNTIME_DIR is security-related.)

However, XDG_RUNTIME_DIR *is* set in my environment, so it shouldn't be 
warning me about it.

I believe this is due to the fix for bug#33847 (see commit 
007744dd0404d6febca88b00c22981cc630fb8c0). That bug asked for 
emacsclient to look in both XDG_RUNTIME_DIR and TMPDIR to find the 
server socket, in order to accommodate the case where `emacs --daemon' 
is started when XDG_RUNTIME_DIR is unset, but *is* set when running 
`emacsclient'.

That works for the issue described in bug#33847, but for users with 
XDG_RUNTIME_DIR set who want `emacs --daemon' to start on demand, the 
change means that emacsclient will look in TMPDIR to find a server 
socket, record that attempt, and then warn about it before finally going 
ahead and starting `emacs --daemon'.

I'm not an expert on XDG_RUNTIME_DIR, but my understanding is that this 
was added to improve security over using TMPDIR. However, as far as I 
can tell, the fix in bug#33847 partially undoes the security improvement 
for users who want to start `emacs --daemon' on demand.

I'm not sure what the fix here is, at least not while ensuring that both 
this case and the case in bug#33847 "just work" without setting some 
option...

(The original bug#33847 is rather long, and I see that similar concerns 
were raised there, so I hope I've summarized this accurately and I'm not 
just misunderstanding what this code is doing.)





^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2022-09-10  5:53 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-22  4:58 bug#51327: 28.0.60; emacsclient warns about XDG_RUNTIME_DIR when starting daemon on-demand Jim Porter
2021-10-30 19:37 ` Jim Porter
2021-10-30 22:33   ` Paul Eggert
2021-12-07 11:26     ` Stefan Kangas
2021-12-07 14:27       ` Eli Zaretskii
2021-12-07 14:58         ` Stefan Kangas
2021-12-07 19:03           ` Paul Eggert
2021-12-08  6:57             ` Jim Porter
2021-12-08 19:06               ` Paul Eggert
2021-12-08 19:16                 ` Eli Zaretskii
2021-12-08 20:23                   ` Stefan Kangas
2021-12-08 21:56                     ` Ulrich Mueller
2021-12-08 22:56                       ` Jim Porter
2021-12-08 23:44                       ` Paul Eggert
2021-12-09  0:19                         ` Ulrich Mueller
2021-12-09  7:32                       ` Eli Zaretskii
2021-12-09  7:44                         ` Ulrich Mueller
2021-12-09 17:12                           ` Paul Eggert
2021-12-09 18:34                             ` Eli Zaretskii
2021-12-09 19:45                               ` Jim Porter
2021-12-09 19:48                               ` Paul Eggert
2021-12-09 19:57                                 ` Eli Zaretskii
2021-12-09 20:04                                   ` Paul Eggert
2022-09-10  5:01                                     ` Lars Ingebrigtsen
2022-09-10  5:53                                       ` Paul Eggert via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-09  4:10             ` Richard Stallman
2021-11-05 10:38 ` bug#51327: 28.0.60; emacsclient warns about XDG_RUNTIME_DIR when starting daemon on demand Ulrich Mueller
2021-11-05 17:54   ` Jim Porter
2021-11-05 18:05     ` Ulrich Mueller
2021-11-05 18:38       ` Jim Porter
2021-11-05 19:02         ` Ulrich Mueller
2021-11-11 13:04           ` Ulrich Mueller
2021-11-11 17:06             ` Jim Porter
2021-11-12  2:21               ` Paul Eggert
2021-12-07 14:58   ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).