mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
Kernel: fchdir() should fail for non-searchable directories
So sayeth POSIX.
This commit is contained in:
parent
7d85fc00e4
commit
2d1f3ec749
Notes:
sideshowbarker
2024-07-19 12:08:05 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/2d1f3ec7498
1 changed files with 3 additions and 0 deletions
|
@ -1211,6 +1211,9 @@ int Process::sys$fchdir(int fd)
|
|||
if (!description->is_directory())
|
||||
return -ENOTDIR;
|
||||
|
||||
if (!description->metadata().may_execute(*this))
|
||||
return -EACCES;
|
||||
|
||||
m_cwd = description->custody();
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue