Kernel: fchdir() should fail for non-searchable directories

So sayeth POSIX.
This commit is contained in:
Andreas Kling 2019-09-13 14:35:18 +02:00
parent 7d85fc00e4
commit 2d1f3ec749
Notes: sideshowbarker 2024-07-19 12:08:05 +09:00

View file

@ -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;
}