mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
Kernel: unlink() should not follow symlinks
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user