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
This commit is contained in:
parent
15e84f28ed
commit
05836fab4c
|
@ -514,10 +514,6 @@ namespace Kernel
|
||||||
if (fd == AT_FDCWD)
|
if (fd == AT_FDCWD)
|
||||||
return TRY(m_working_directory.clone());
|
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));
|
return TRY(m_open_file_descriptors.file_of(fd));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue