From 2bf957394cdcb93396966d3289f5e200886cb424 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 24 Apr 2019 17:41:05 -0700 Subject: 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. --- lib-src/emacsclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib-src/emacsclient.c') 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" -- cgit v1.2.1