mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:37:35 +00:00
Kernel: fchdir() should fail for non-searchable directories
So sayeth POSIX.
This commit is contained in:
parent
7d85fc00e4
commit
2d1f3ec749
1 changed files with 3 additions and 0 deletions
|
@ -1211,6 +1211,9 @@ int Process::sys$fchdir(int fd)
|
||||||
if (!description->is_directory())
|
if (!description->is_directory())
|
||||||
return -ENOTDIR;
|
return -ENOTDIR;
|
||||||
|
|
||||||
|
if (!description->metadata().may_execute(*this))
|
||||||
|
return -EACCES;
|
||||||
|
|
||||||
m_cwd = description->custody();
|
m_cwd = description->custody();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue