diff --git a/etc/NEWS b/etc/NEWS index bbcd7a5747a..2f07abb4eb5 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -119,13 +119,19 @@ the new version of the file again.) * Changes in Emacs 27.1 +** emacsclient + +++ -** emacsclient now supports the 'EMACS_SOCKET_NAME' environment variable. +*** emacsclient now supports the 'EMACS_SOCKET_NAME' environment variable. The behavior is identical to 'EMACS_SERVER_FILE', in that the command-line value specified via '--socket-name' will override the environment, and the natural default to TMPDIR, then "/tmp", continues to apply. +--- +*** When run by root, emacsclient no longer connects to non-root sockets. +(Instead you can use Tramp methods to run root commands in a non-root Emacs.) + +++ ** The function 'read-passwd' uses '*' as default character to hide passwords. diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 42b8dd6227b..6fbc2300958 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -1365,14 +1365,9 @@ set_local_socket (const char *local_socket_name) switch (sock_status) { case 1: - /* There's a socket, but it isn't owned by us. This is OK if - we are root. */ - if (0 != geteuid ()) - { - message (true, "%s: Invalid socket owner\n", progname); - return INVALID_SOCKET; - } - break; + /* There's a socket, but it isn't owned by us. */ + message (true, "%s: Invalid socket owner\n", progname); + return INVALID_SOCKET; case 2: /* `stat' failed */