From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: phillip.lord@russet.org.uk Newsgroups: gmane.emacs.bugs Subject: bug#36598: 26.1; (error "=?UTF-8?Q?=E2=80=98/tmp/emacs1000=E2=80=99?= is not a safe directory because it is a symlink") Date: Sun, 14 Jul 2019 20:11:31 +0100 Message-ID: <20a62c04ad67dc64665b32d7a31cfe8b@russet.org.uk> References: <87muhkr79y.fsf@silk.nichework.com> <87k1cmwnu6.fsf@mouse.gnus.org> <44a502116d2c0568d120b7328913b26a@russet.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="96798"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Roundcube Webmail/1.3.8 Cc: mah@everybody.org, 36598@debbugs.gnu.org, Stefan Monnier To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 14 21:18:00 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hmk0W-000P0i-Mb for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Jul 2019 21:18:00 +0200 Original-Received: from localhost ([::1]:33804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmjuo-0004Ko-6V for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Jul 2019 15:12:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33888) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmjul-0004Kg-SM for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2019 15:12:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hmjuk-0003WM-Pr for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2019 15:12:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37164) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hmjuk-0003WC-Ld for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2019 15:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hmjuk-0004dk-EV for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2019 15:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: phillip.lord@russet.org.uk Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Jul 2019 19:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36598 X-GNU-PR-Package: emacs Original-Received: via spool by 36598-submit@debbugs.gnu.org id=B36598.156313150217785 (code B ref 36598); Sun, 14 Jul 2019 19:12:02 +0000 Original-Received: (at 36598) by debbugs.gnu.org; 14 Jul 2019 19:11:42 +0000 Original-Received: from localhost ([127.0.0.1]:45985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmjuQ-0004cn-6w for submit@debbugs.gnu.org; Sun, 14 Jul 2019 15:11:42 -0400 Original-Received: from cloud103.planethippo.com ([78.129.138.110]:57662) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmjuN-0004cW-92 for 36598@debbugs.gnu.org; Sun, 14 Jul 2019 15:11:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Message-ID:References:In-Reply-To:Subject:Cc:To :From:Date:Content-Transfer-Encoding:Content-Type:MIME-Version:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=cMOFVR5qRCiB2tz4Tdwp0AWmNVexBFDPRoAZyEZYZxk=; b=htTzokCu0XUVxbLTg5AxL/SsjR qqbm7EJrL3CsbXMy2YJbWYV7LQJ6i/winOh1j9fCaoR4jpoBXXb8+RAffdB2yvGNc8bU0eklt/9M3 657Y3APf+4OFXdY6318r5wc2Q1S1POF16/AGh4JVCBq/MU8n/NNn4oM7/AY6VCxmXK+IqMKnQQNLg n5vIo0KAXMt70ak/ie4azDVpm6jXOhRfbZWeQHAWdxZlGEDjN05amNjS+1PHUVvTqz38cDaEemjp8 M3KCLf+A3eLxhzA3M4qshcR9SyCHRuqcziv/wYeeBuoBW3oBgA/nEcczof+l0wHt3qayRV5Re2emy 9NdTXQmw==; Original-Received: from [::1] (port=48326 helo=cloud103.planethippo.com) by cloud103.planethippo.com with esmtpa (Exim 4.92) (envelope-from ) id 1hmjuF-0000vq-In; Sun, 14 Jul 2019 20:11:31 +0100 In-Reply-To: X-Sender: phillip.lord@russet.org.uk X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:163029 Archived-At: On 2019-07-14 12:44, Lars Ingebrigtsen wrote: > phillip.lord@russet.org.uk writes: > >> On 2019-07-13 15:45, Lars Ingebrigtsen wrote: >>> phillip.lord@russet.org.uk writes: >>> >>>> Launch emacs-27, start the server. Now launch emacs-26 and start the >>>> server with a different. The problem is that >>>> emacs-27 creates the file /tmp/emacs($PID) as a symlink, while >>>> emacs-26 doesn't like it. >>>> >>>> Probably created by >>>> >>>> b663c837249 (Stefan Monnier 2019-05-03 538) >>> >>> Could you post a backtrace for the "doesn't like it" case? >> >> Sure. It is Emacs-26 that errors. >> >> As far as I can see, this will only affect the edge case of someone >> running two versions of Emacs. I tend to do this (I run gnus in a >> standalone release emacs, and everything else in another emacs). > > Commit b663c837249 (in May) which says "Cosmetic changes" is the one > that introduced this code? > > (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))))) > > And instead of making things work with an old emacsclient, it breaks > the > Emacs 26 emacsclient? Nearly. I think it breaks emacs-26 not the emacsclient. I haven't check the emacsclient code, but I guess Stefan was aiming for the situation when someone is using (say) emacsclient-26 with emacs-27. This is all a bit of a guess, though. > I may be reading the region history wrong, though. > > Stefan, was this checked in by mistake?