unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Noam Postavsky <npostavs@gmail.com>
Cc: "Mark A. Hershberger" <mah@everybody.org>, 36598@debbugs.gnu.org
Subject: bug#36598: 26.1; (error "‘/tmp/emacs1000’ is not a safe directory because it is a symlink")
Date: Sat, 13 Jul 2019 15:06:06 +0200	[thread overview]
Message-ID: <m38st2qe2p.fsf@gnus.org> (raw)
In-Reply-To: <87r26u14re.fsf@gmail.com> (Noam Postavsky's message of "Sat, 13 Jul 2019 08:46:29 -0400")

Noam Postavsky <npostavs@gmail.com> writes:

> mah@everybody.org (Mark A. Hershberger) writes:
>
>> $ ls -l /tmp/emacs1000
>> lrwxrwxrwx 1 mah mah 20 Jul 11 09:53 /tmp/emacs1000 -> /run/user/1000/emacs
>>
>> Whoever set up the symlink for /tmp/emacs1000
>
> Do you know who that is?

It's probably this code?  But it works for me; it just sets up a symlink
from /tmp for compatibility with older emacsclients, I think?

(defun server-ensure-safe-dir (dir)

[...]

    (let ((olddir (or (getenv "TMPDIR") "/tmp")))
      (when (and (equal dir (format "%s/emacs" (getenv "XDG_RUNTIME_DIR")))
                 (file-writable-p olddir))
        (let ((link (format "%s/emacs%d" olddir (user-uid))))
          (unless (file-directory-p link)
            ;; We're using the new location, so try and setup a symlink from
            ;; the old location, in case we want to use an old emacsclient.
            ;; FIXME: Check that it's safe to use!
            (make-symbolic-link dir link t)))))


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





      reply	other threads:[~2019-07-13 13:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-11 14:10 bug#36598: 26.1; (error "‘/tmp/emacs1000’ is not a safe directory because it is a symlink") Mark A. Hershberger
2019-07-13  4:38 ` Lars Ingebrigtsen
2019-07-13 14:30   ` phillip.lord
2019-07-13 14:45     ` Lars Ingebrigtsen
2019-07-13 15:56       ` phillip.lord
2019-07-14  1:43         ` Glenn Morris
2019-07-14 11:44         ` Lars Ingebrigtsen
2019-07-14 19:11           ` phillip.lord
2019-07-15 13:04             ` Stefan Monnier
2019-07-18  6:27               ` Eli Zaretskii
2019-07-23 12:07                 ` Noam Postavsky
2019-07-13 12:46 ` Noam Postavsky
2019-07-13 13:06   ` Lars Ingebrigtsen [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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=m38st2qe2p.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=36598@debbugs.gnu.org \
    --cc=mah@everybody.org \
    --cc=npostavs@gmail.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 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).