mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
Kernel: Don't assume there are no nodes if m_unveiled_paths.is_empty()
If m_unveiled_paths.is_empty(), the root node (which is m_unveiled_paths
itself) is the matching veil. This means we should not return nullptr in
this case, but just use the code path for the general case.
This fixes a bug where calling e.g. unveil("/", "r") would refuse you
access to anything, because find_matching_unveiled_path would wrongly
return nullptr.
Since find_matching_unveiled_path can no longer return nullptr, we can
now just return a reference instead.
This commit is contained in:
committed by
Andreas Kling
parent
8930db0900
commit
c1de46aaaf
@@ -102,7 +102,7 @@ public:
|
||||
private:
|
||||
friend class FileDescription;
|
||||
|
||||
const UnveilNode* find_matching_unveiled_path(StringView path);
|
||||
UnveilNode const& find_matching_unveiled_path(StringView path);
|
||||
KResult validate_path_against_process_veil(StringView path, int options);
|
||||
|
||||
bool is_vfs_root(InodeIdentifier) const;
|
||||
|
||||
Reference in New Issue
Block a user