From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: emacsclient socket ownership Date: Tue, 06 Nov 2018 12:54:22 -0500 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1541527984 20848 195.159.176.226 (6 Nov 2018 18:13:04 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 6 Nov 2018 18:13:04 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 06 19:13:00 2018 Return-path: Envelope-to: ged-emacs-devel@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 1gK5qV-0005J7-9k for ged-emacs-devel@m.gmane.org; Tue, 06 Nov 2018 19:12:59 +0100 Original-Received: from localhost ([::1]:42466 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gK5sb-00066y-Px for ged-emacs-devel@m.gmane.org; Tue, 06 Nov 2018 13:15:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38800) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gK5oN-0007yr-Rd for emacs-devel@gnu.org; Tue, 06 Nov 2018 13:10:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gK5Yw-0003ph-1Y for emacs-devel@gnu.org; Tue, 06 Nov 2018 12:54:59 -0500 Original-Received: from [195.159.176.226] (port=36346 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gK5Yu-0002f5-S7 for emacs-devel@gnu.org; Tue, 06 Nov 2018 12:54:49 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1gK5WU-0005F3-5m for emacs-devel@gnu.org; Tue, 06 Nov 2018 18:52:18 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 26 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:7maL05yiQiJftfwHXU4YvE7CDnM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:231044 Archived-At: > There is no /run on macOS, and I'm pretty sure at least OpenBSD have > rejected the idea. It's OK: we can use OS-specific filenames. And we'd want to preserve compatibility between old emacsclient and new server.el and vice versa. > Would not a better choice be to locate the socket at > ${HOME}/.emacs.d/${something} instead? That's another option, indeed. IIRC it tends to work poorly when $HOME is on a network file system. > At heart, I don't think this is really a security issue, so much as that > root is the ultimate force for bypassing all protection in the Unix world. > Without going to something akin to SELinux, or some similar MAC > system, there isn't any way to prevent root accessing any socket, by > design. The problem is not Emacs trying to prevent root's emacsclient from connecting, but root's emacsclient trying to avoid connecting inadvertently to an attacker's socket. Stefan