From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#41628: [PATCH] Allow emacsclient to connect to other user's socket when using -s Date: Sun, 31 May 2020 18:44:50 +0300 Message-ID: <835zcckt1p.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="101287"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41628@debbugs.gnu.org To: rabite@posteo.de Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 31 17:45:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jfQ97-000QAU-IL for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 31 May 2020 17:45:09 +0200 Original-Received: from localhost ([::1]:36442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfQ96-0003YV-H9 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 31 May 2020 11:45:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfQ90-0003Y7-9I for bug-gnu-emacs@gnu.org; Sun, 31 May 2020 11:45:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50322) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfQ8z-0004BG-UX for bug-gnu-emacs@gnu.org; Sun, 31 May 2020 11:45:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jfQ8z-0006Zc-RC for bug-gnu-emacs@gnu.org; Sun, 31 May 2020 11:45:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 31 May 2020 15:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41628 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 41628-submit@debbugs.gnu.org id=B41628.159093989925249 (code B ref 41628); Sun, 31 May 2020 15:45:01 +0000 Original-Received: (at 41628) by debbugs.gnu.org; 31 May 2020 15:44:59 +0000 Original-Received: from localhost ([127.0.0.1]:33635 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfQ8x-0006ZA-A9 for submit@debbugs.gnu.org; Sun, 31 May 2020 11:44:59 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42930) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfQ8v-0006Yx-3b for 41628@debbugs.gnu.org; Sun, 31 May 2020 11:44:57 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55968) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfQ8p-0004An-7F; Sun, 31 May 2020 11:44:51 -0400 Original-Received: from [176.228.60.248] (port=4813 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jfQ8o-000269-H8; Sun, 31 May 2020 11:44:51 -0400 In-Reply-To: (message from rabite on Sun, 31 May 2020 15:51:02 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:181292 Archived-At: > Date: Sun, 31 May 2020 15:51:02 +0200 > From: rabite > > Since commit 5c0d8bb95bbd5354e6b2cd2e56a91afe4e780759 emacsclient won't > connect to my usual emacs session when run as root. I use this all the > time to edit files, combined with "-T /sudo:root@localhost" to handle > permissions. Using a separate emacs process would be unpractical as it > would require setting up a whole new emacs configuration and keeping it > in sync with my main one. I think this is a common use-case for those > who have an emacs-server running all the time and supporting it makes a > lot of sense. In principle I see no reason emacsclient should refuse a > connection that is possible in theory. > > It looks like this "feature" has been explicitly disabled, maybe because > it might triggered unintentionally if running su doesn't set USER or > something? The discussion which led to that change is here: https://lists.gnu.org/r/emacs-devel/2018-11/msg00019.html