GNU bug report logs -
#36598
26.1; (error "‘/tmp/emacs1000’ is not a safe directory because it is a symlink")
Previous Next
Reported by: mah <at> everybody.org (Mark A. Hershberger)
Date: Thu, 11 Jul 2019 14:12:01 UTC
Severity: normal
Tags: fixed
Found in version 26.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Noam Postavsky <npostavs <at> gmail.com> writes:
> mah <at> 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
This bug report was last modified 5 years and 355 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.