diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/legacy/euidaccess.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/legacy/euidaccess.c b/src/legacy/euidaccess.c index f37a4ecf..47b464d3 100644 --- a/src/legacy/euidaccess.c +++ b/src/legacy/euidaccess.c @@ -1,18 +1,10 @@ #include <unistd.h> #include <fcntl.h> -#include <errno.h> -#include "syscall.h" #include "libc.h" int euidaccess(const char *filename, int amode) { - int ret = __syscall(SYS_faccessat, AT_FDCWD, filename, amode, AT_EACCESS); - if (ret != -ENOSYS) return __syscall_ret(ret); - - if (getuid() == geteuid() && getgid() == getegid()) - return syscall(SYS_access, filename, amode); - - return __syscall_ret(-ENOSYS); + return faccessat(AT_FDCWD, filename, amode, AT_EACCESS); } weak_alias(euidaccess, eaccess); |