diff options
author | 2023-07-17 09:43:51 -0400 | |
---|---|---|
committer | 2023-07-17 09:43:51 -0400 | |
commit | 6a6a6a6c9680e5868544887a7ab4d141833abfb6 (patch) | |
tree | b9e134feee6ba670fa4af6329fd7b6a5d5f79bf3 | |
parent | libsandbox/trace: cast NT_ARM_SYSTEM_CALL to avoid warnings (diff) | |
download | sandbox-6a6a6a6c9680e5868544887a7ab4d141833abfb6.tar.gz sandbox-6a6a6a6c9680e5868544887a7ab4d141833abfb6.tar.bz2 sandbox-6a6a6a6c9680e5868544887a7ab4d141833abfb6.zip |
sb_exists: drop use of faccessat
faccessat appears to perform quite poorly under certain conditions.
Go back to using fstatat until this can be debugged.
Bug: https://bugs.gentoo.org/910273
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
-rw-r--r-- | libsbutil/sb_exists.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/libsbutil/sb_exists.c b/libsbutil/sb_exists.c index 9ec7730..d34f0cc 100644 --- a/libsbutil/sb_exists.c +++ b/libsbutil/sb_exists.c @@ -10,15 +10,5 @@ int sb_exists(int dirfd, const char *pathname, int flags) { struct stat64 buf; - - if (faccessat(dirfd, pathname, F_OK, flags) == 0) - return 0; - - /* musl's faccessat gives EINVAL when the kernel does not support - * faccessat2 and AT_SYMLINK_NOFOLLOW is set. - * https://www.openwall.com/lists/musl/2023/06/19/1 */ - if (errno != EINVAL) - return -1; - return fstatat64(dirfd, pathname, &buf, flags); } |