From 05836fab4c613a8fbf1b44ae4b5a5bca4e5c434a Mon Sep 17 00:00:00 2001 From: Bananymous Date: Thu, 19 Jun 2025 19:02:28 +0300 Subject: [PATCH] Kernel: Allow accessing fd's inode without having read/search access I have no idea what the point of this was. VFS is already verifying read and search access --- kernel/kernel/Process.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/kernel/kernel/Process.cpp b/kernel/kernel/Process.cpp index db8abf5d..392d3c57 100644 --- a/kernel/kernel/Process.cpp +++ b/kernel/kernel/Process.cpp @@ -514,10 +514,6 @@ namespace Kernel if (fd == AT_FDCWD) return TRY(m_working_directory.clone()); - const auto status_flags = TRY(m_open_file_descriptors.status_flags_of(fd)); - if (!(status_flags & O_RDONLY) && !(status_flags & O_SEARCH)) - return BAN::Error::from_errno(EBADF); - return TRY(m_open_file_descriptors.file_of(fd)); }