all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Ulrich Mueller <ulm@gentoo.org>
Cc: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>,
	emacs-devel <emacs-devel@gnu.org>
Subject: Re: emacsclient startup messages
Date: Sat, 30 Oct 2021 12:47:29 -0700	[thread overview]
Message-ID: <074495a9-aff8-edce-f81f-51fdfc622f6e@gmail.com> (raw)
In-Reply-To: <d6f8ea4b-5f99-68fd-1b0a-03a1a97da0b5@gmail.com>

On 10/30/2021 12:16 PM, Jim Porter wrote:
> On 10/30/2021 10:39 AM, Ulrich Mueller wrote:
>> There can be situations where there is an XDG environment for the client
>> but not for the daemon.
> 
> Right, the patch in bug#33847 should handle that case correctly, but I'm 
> pretty sure the current implementation opens users who spawn the Emacs 
> daemon on-demand to symlink attacks. That's due to the code needing to 
> check both XDG_RUNTIME_DIR and TMPDIR before being sure there's no 
> daemon to connect to.
> 
> I can think of two ways to avoid this issue:
[snip]
> 2) If XDG_RUNTIME_DIR and ALTERNATE_EDITOR/--alternate-editor are both 
> set, never check TMPDIR. This should let both cases work without 
> requiring users to explicitly set a flag anywhere, but it the lack of 
> explicitness could be more confusing. I think this should work fine in 
> all cases, since users running `emacs --daemon' without XDG probably 
> won't be using ALTERNATE_EDITOR (the daemon should always be running, so 
> there's no need for an alternate editor).

I posted a patch for method (2) to bug#51327 here: 
<https://lists.gnu.org/archive/html/bug-gnu-emacs/2021-10/msg02638.html>.



  reply	other threads:[~2021-10-30 19:47 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-26  5:26 emacsclient startup messages Pedro Andres Aranda Gutierrez
2021-10-26 12:18 ` Eli Zaretskii
2021-10-26 16:43   ` Pedro Andres Aranda Gutierrez
2021-10-26 16:32 ` Jim Porter
2021-10-26 16:46   ` Pedro Andres Aranda Gutierrez
2021-10-26 17:03     ` Jim Porter
2021-10-27  5:05       ` Pedro Andres Aranda Gutierrez
2021-10-30 17:39   ` Ulrich Mueller
2021-10-30 19:16     ` Jim Porter
2021-10-30 19:47       ` Jim Porter [this message]
2021-10-31 10:03         ` Pedro Andres Aranda Gutierrez
2021-10-31 15:44           ` Pedro Andres Aranda Gutierrez
2021-11-05  7:04             ` Pedro Andres Aranda Gutierrez
2021-11-05  8:04               ` Eli Zaretskii
2021-11-05  9:40                 ` Ulrich Mueller
2021-11-05 16:35                   ` Jim Porter
2021-11-05 17:52                     ` Ulrich Mueller
2021-11-06 11:35                       ` Pedro Andres Aranda Gutierrez
2021-11-06 18:40                         ` Jim Porter
2021-11-07  9:49                       ` Peter Oliver

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=074495a9-aff8-edce-f81f-51fdfc622f6e@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=paaguti@gmail.com \
    --cc=ulm@gentoo.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.