GNU bug report logs - #18658
24.3; deformed server-socket-dir

Previous Next

Package: emacs;

Reported by: Devon Sean McCullough <Emacs-Hacker2014 <at> jovi.net>

Date: Tue, 7 Oct 2014 19:59:01 UTC

Severity: minor

Tags: fixed, patch

Merged with 24513

Found in versions 24.3, 25.1

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18658 in the body.
You can then email your comments to 18658 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#18658; Package emacs. (Tue, 07 Oct 2014 19:59:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Devon Sean McCullough <Emacs-Hacker2014 <at> jovi.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 07 Oct 2014 19:59:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Devon Sean McCullough <Emacs-Hacker2014 <at> jovi.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3; deformed server-socket-dir
Date: Tue, 7 Oct 2014 15:57:58 -0400
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.")






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18658; Package emacs. (Fri, 10 Oct 2014 01:04:02 GMT) Full text and rfc822 format available.

Message #8 received at 18658 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Devon Sean McCullough <Emacs-Hacker2014 <at> jovi.net>
Cc: 18658 <at> debbugs.gnu.org
Subject: Re: bug#18658: 24.3; deformed server-socket-dir
Date: Thu, 09 Oct 2014 21:03:57 -0400
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.




Forcibly Merged 18658 24513. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 22 Sep 2016 19:44:01 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Wed, 12 Aug 2020 17:07:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18658; Package emacs. (Thu, 13 Aug 2020 10:02:01 GMT) Full text and rfc822 format available.

Message #15 received at 18658 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Devon Sean McCullough <Emacs-Hacker2014 <at> jovi.net>
Cc: 18658 <at> debbugs.gnu.org
Subject: Re: bug#18658: 24.3; deformed server-socket-dir
Date: Thu, 13 Aug 2020 12:01:29 +0200
Devon Sean McCullough <Emacs-Hacker2014 <at> 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




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 13 Aug 2020 10:02:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 18658 <at> debbugs.gnu.org and Devon Sean McCullough <Emacs-Hacker2014 <at> jovi.net> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 13 Aug 2020 10:02:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 10 Sep 2020 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 219 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.