commit: 8d2f296c626d3068fcbbbc423be3246206277da9
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 15 01:40:35 2025 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Feb 15 01:43:29 2025 +0000
URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=8d2f296c
Skip access checks for open(O_PATH)
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
libsandbox/libsandbox.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libsandbox/libsandbox.c b/libsandbox/libsandbox.c
index 5764cf6..b46b1ba 100644
--- a/libsandbox/libsandbox.c
+++ b/libsandbox/libsandbox.c
@@ -802,6 +802,9 @@ bool before_syscall_fd(int sb_nr, const char *func, int fd)
{
bool before_syscall_open_int(int sb_nr, const char *func, int dirfd, const
char *file, int flags)
{
+ if (flags & O_PATH)
+ return true;
+
const char *ext_func;
if (flags & O_CREAT) {
if (flags & (O_WRONLY|O_RDWR)) {