diff options
Diffstat (limited to 'libsandbox')
-rw-r--r-- | libsandbox/pre_check_openat.c | 2 | ||||
-rw-r--r-- | libsandbox/wrapper-funcs/fopen_pre_check.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libsandbox/pre_check_openat.c b/libsandbox/pre_check_openat.c index 8fd3b23..99c03eb 100644 --- a/libsandbox/pre_check_openat.c +++ b/libsandbox/pre_check_openat.c @@ -19,7 +19,7 @@ bool sb_openat_pre_check(const char *func, const char *pathname, int dirfd, int save_errno(); /* Doesn't exist -> skip permission checks */ - if (faccessat(dirfd, pathname, F_OK, (flags & O_NOFOLLOW) ? AT_SYMLINK_NOFOLLOW : 0) == -1) { + if (sb_exists(dirfd, pathname, (flags & O_NOFOLLOW) ? AT_SYMLINK_NOFOLLOW : 0) == -1) { sb_debug_dyn("EARLY FAIL: %s(%s): %s\n", func, pathname, strerror(errno)); return false; } diff --git a/libsandbox/wrapper-funcs/fopen_pre_check.c b/libsandbox/wrapper-funcs/fopen_pre_check.c index 95108e0..e3ed2c6 100644 --- a/libsandbox/wrapper-funcs/fopen_pre_check.c +++ b/libsandbox/wrapper-funcs/fopen_pre_check.c @@ -11,7 +11,7 @@ bool sb_fopen_pre_check(const char *func, const char *pathname, const char *mode save_errno(); /* If we're trying to read, fail normally if file does not stat */ - if (faccessat(AT_FDCWD, pathname, F_OK, 0) == -1) { + if (sb_exists(AT_FDCWD, pathname, 0) == -1) { sb_debug_dyn("EARLY FAIL: %s(%s): %s\n", func, pathname, strerror(errno)); return false; |