mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
Kernel: unlink() should not follow symlinks
This commit is contained in:
parent
f026f0f4bb
commit
b1ffde6199
Notes:
sideshowbarker
2024-07-19 10:13:54 +09:00
Author: https://github.com/awesomekling
Commit: b1ffde6199
2 changed files with 16 additions and 1 deletions
|
@ -518,7 +518,7 @@ KResult VFS::link(StringView old_path, StringView new_path, Custody& base)
|
|||
KResult VFS::unlink(StringView path, Custody& base)
|
||||
{
|
||||
RefPtr<Custody> parent_custody;
|
||||
auto custody_or_error = resolve_path(path, base, &parent_custody);
|
||||
auto custody_or_error = resolve_path(path, base, &parent_custody, O_NOFOLLOW_NOERROR);
|
||||
if (custody_or_error.is_error())
|
||||
return custody_or_error.error();
|
||||
auto& custody = *custody_or_error.value();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue