|
From: | rabite |
Subject: | bug#41628: [PATCH] Allow emacsclient to connect to other user's socket when using -s |
Date: | Sun, 31 May 2020 15:51:02 +0200 |
User-agent: | Posteo Webmail |
It looks like this "feature" has been explicitly disabled, maybe because it might triggered unintentionally if running su doesn't set USER or something?. So I propose a new approach to allow root emacsclient to connect to non-root emacs servers: If the user sets a socket file explicitly using the -s switch, the socket_status() function skips the uid check and returns without error as long as the call to stat was successful. Generally, this would allow any user to connect to any emacs server as long as the permissions allow it. If not, it shows the "connect: Permission denied" message, if the socket file is reachable at all, that is.
I added a tiny patch that implements this change. If necessary, I'd be willing to expand on it, or even implement a different approach depending on how much work/complicated it would be.
0001-allow-sockets-with-different-uid-if-set-explicitly.patch~
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |