1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:38:10 +00:00

Kernel: Implement recursion limit on path resolution

Cautiously use 5 as a limit for now so that we don't blow the stack.
This can be increased in the future if we are sure that we won't be
blowing the stack, or if the implementation is changed to not use
recursion :^)
This commit is contained in:
Shannon Booth 2019-12-24 22:39:21 +13:00 committed by Andreas Kling
parent 3623e35978
commit 0e45b9423b
2 changed files with 8 additions and 11 deletions

View file

@ -88,7 +88,7 @@ public:
void sync();
Custody& root_custody();
KResultOr<NonnullRefPtr<Custody>> resolve_path(StringView path, Custody& base, RefPtr<Custody>* parent = nullptr, int options = 0);
KResultOr<NonnullRefPtr<Custody>> resolve_path(StringView path, Custody& base, RefPtr<Custody>* parent = nullptr, int options = 0, int symlink_recursion_level = 0);
private:
friend class FileDescription;