* bug#18658: 24.3; deformed server-socket-dir @ 2014-10-07 19:57 Devon Sean McCullough 2014-10-10 1:03 ` Glenn Morris 2020-08-13 10:01 ` Lars Ingebrigtsen 0 siblings, 2 replies; 3+ messages in thread From: Devon Sean McCullough @ 2014-10-07 19:57 UTC (permalink / raw) To: 18658 Double slashes in server-socket-dir is a bug waiting to happen. Peace --Devon P.S. Fix follows: --- lisp/server.el.~1~ 2014-10-07 13:27:34.000000000 -0400 +++ lisp/server.el 2014-10-07 13:34:03.000000000 -0400 @@ -266,7 +266,10 @@ ;; does not read the init file. (defvar server-socket-dir (and (featurep 'make-network-process '(:family local)) - (format "%s/emacs%d" (or (getenv "TMPDIR") "/tmp") (user-uid))) + (expand-file-name (format "emacs%d" + (user-uid)) + (or (getenv "TMPDIR") + "/tmp"))) "The directory in which to place the server socket. If local sockets are not supported, this is nil.") ^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#18658: 24.3; deformed server-socket-dir 2014-10-07 19:57 bug#18658: 24.3; deformed server-socket-dir Devon Sean McCullough @ 2014-10-10 1:03 ` Glenn Morris 2020-08-13 10:01 ` Lars Ingebrigtsen 1 sibling, 0 replies; 3+ messages in thread From: Glenn Morris @ 2014-10-10 1:03 UTC (permalink / raw) To: Devon Sean McCullough; +Cc: 18658 Devon Sean McCullough wrote: > Double slashes in server-socket-dir is a bug waiting to happen. You mean, if someone sets TMPDIR to a value ending in a slash? POSIX requires (non-leading) multiple / in a filename to be entirely equivalent to one /, so it it hard to see how this could cause any problems. Nevertheless expand-file-name does seem a bit cleaner. ^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#18658: 24.3; deformed server-socket-dir 2014-10-07 19:57 bug#18658: 24.3; deformed server-socket-dir Devon Sean McCullough 2014-10-10 1:03 ` Glenn Morris @ 2020-08-13 10:01 ` Lars Ingebrigtsen 1 sibling, 0 replies; 3+ messages in thread From: Lars Ingebrigtsen @ 2020-08-13 10:01 UTC (permalink / raw) To: Devon Sean McCullough; +Cc: 18658 Devon Sean McCullough <Emacs-Hacker2014@jovi.net> writes: > Double slashes in server-socket-dir is a bug waiting to happen. [...] > - (format "%s/emacs%d" (or (getenv "TMPDIR") "/tmp") (user-uid))) > + (expand-file-name (format "emacs%d" > + (user-uid)) > + (or (getenv "TMPDIR") > + "/tmp"))) Thanks; I applied a version of this to Emacs 28. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-13 10:01 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-10-07 19:57 bug#18658: 24.3; deformed server-socket-dir Devon Sean McCullough 2014-10-10 1:03 ` Glenn Morris 2020-08-13 10:01 ` Lars Ingebrigtsen
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.