summaryrefslogtreecommitdiff
path: root/lib-src/emacsclient.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-04-24 17:41:05 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-04-24 17:42:09 -0700
commit2bf957394cdcb93396966d3289f5e200886cb424 (patch)
tree99f1f3af3c339638cfd622ec7fd1949ff1c3e3e0 /lib-src/emacsclient.c
parent445713f55561df9a9755ce13eec0c0324b1754c2 (diff)
downloademacs-2bf957394cdcb93396966d3289f5e200886cb424.tar.gz
Improve port to platforms lacking euidaccess (Bug#35406)
* lib-src/emacsclient.c (set_local_socket): Use faccessat with AT_EACCESS instead of using euidaccess. * admin/merge-gnulib, lib/gnulib.mk.in, m4/gnulib-comp.m4: Revert previous change.
Diffstat (limited to 'lib-src/emacsclient.c')
-rw-r--r--lib-src/emacsclient.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 5871a18ce69..fd56007b156 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -1472,7 +1472,7 @@ set_local_socket (char const *server_name)
int sockdirnamelen = snprintf (sockdirname, sizeof sockdirname,
"/run/user/%"PRIuMAX, id);
if (0 <= sockdirnamelen && sockdirnamelen < sizeof sockdirname
- && euidaccess (sockdirname, X_OK) == 0)
+ && faccessat (AT_FDCWD, sockdirname, X_OK, AT_EACCESS) == 0)
message
(true,
("%s: Should XDG_RUNTIME_DIR='%s' be in the environment?\n"