From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#33847: 27.0.50; emacsclient does not find server socket Date: Tue, 25 Dec 2018 16:24:10 -0800 Organization: UCLA Computer Science Department Message-ID: <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1545783794 31959 195.159.176.226 (26 Dec 2018 00:23:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 26 Dec 2018 00:23:14 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 Cc: 33847@debbugs.gnu.org To: Ulrich Mueller Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 26 01:23:09 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gbwyY-000889-OD for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Dec 2018 01:23:06 +0100 Original-Received: from localhost ([127.0.0.1]:43819 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbx0f-0004mw-5E for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Dec 2018 19:25:17 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:35470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gbx0V-0004iO-TG for bug-gnu-emacs@gnu.org; Tue, 25 Dec 2018 19:25:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gbx0R-0006ue-0K for bug-gnu-emacs@gnu.org; Tue, 25 Dec 2018 19:25:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37337) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gbx0Q-0006uT-T2 for bug-gnu-emacs@gnu.org; Tue, 25 Dec 2018 19:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gbx0Q-000814-HP for bug-gnu-emacs@gnu.org; Tue, 25 Dec 2018 19:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Dec 2018 00:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.154578385930751 (code B ref 33847); Wed, 26 Dec 2018 00:25:02 +0000 Original-Received: (at 33847) by debbugs.gnu.org; 26 Dec 2018 00:24:19 +0000 Original-Received: from localhost ([127.0.0.1]:36515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gbwzj-0007zu-3A for submit@debbugs.gnu.org; Tue, 25 Dec 2018 19:24:19 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:35660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gbwzh-0007ze-CE for 33847@debbugs.gnu.org; Tue, 25 Dec 2018 19:24:17 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id BFF19160AD6; Tue, 25 Dec 2018 16:24:11 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Orn_U93Kbxx2; Tue, 25 Dec 2018 16:24:11 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 02C96160D59; Tue, 25 Dec 2018 16:24:11 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id FJgKHqGt6WVb; Tue, 25 Dec 2018 16:24:10 -0800 (PST) Original-Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id D0EA0160A77; Tue, 25 Dec 2018 16:24:10 -0800 (PST) In-Reply-To: Content-Language: en-US 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: 208.118.235.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:153853 Archived-At: Ulrich Mueller wrote: > IMHO that's not an acceptable solution. emacsclient should just work in > the default configuration, without requiring the user to jump through > hoops, and an Emacs daemon should persist between sessions (otherwise > "daemon" would be a misnomer). Or is that use case really so uncommon? We have a conflict here between "just work" and security. There are multiple workarounds for the problem that you mention; if none of them are convenient enough perhaps you can suggest a more-convenient one. The default should be secure, though. > if there is a security problem, how would it disappear by moving > the socket to XDG_RUNTIME_DIR? Note that other tools like "screen" also > place their sockets in a subdir of /tmp. XDG_RUNTIME_DIR is guaranteed to be a directory owned by the user and readable and writable by nobody else. /tmp/emacsUID does not have that property. Tools like 'screen' that predate XDG_RUNTIME_DIR traditionally suffered from similar security problems. On my Fedora 29 platform, 'screen' works around the problem by being setgid 'screen' and putting files under /run/screen/S-eggert, where /run/screen is mode drwxrwxr-x with owner 'root' and group 'screen'. The exact location of the /run/screen directory is platform-specific; I guess that it typically used to be /tmp/screens but got moved due to security concerns. The 'screen' workaround does not appear to apply to Emacs, since Emacs is programmable and if Emacs were made setgid its users could easily modify Emacs's behavior to manipulate the contents of any such /run/emacs directory in any way they pleased.