Kernel: Move symlink recursion limit to .h, increase it to 8
As pointed out by BertalanD on Discord, POSIX specifies that _SC_SYMLOOP_MAX (implemented in the following commit) always needs to be equal or more than _POSIX_SYMLOOP_MAX (8, defined in LibC/bits/posix1_lim.h), hence I've increased it to that value to comply with the standard. The move to header is required for the following commit - to make this constant accessible outside of the VFS class, namely in sysconf.
This commit is contained in:
parent
ccb9cae8e9
commit
f75bab2a25
Notes:
sideshowbarker
2024-07-17 22:28:46 +09:00
Author: https://github.com/MartinBriza 🔰 Commit: https://github.com/SerenityOS/serenity/commit/f75bab2a25a Pull-request: https://github.com/SerenityOS/serenity/pull/11349 Reviewed-by: https://github.com/BertalanD ✅ Reviewed-by: https://github.com/timschumi ✅
2 changed files with 4 additions and 1 deletions
Kernel/FileSystem
|
@ -24,7 +24,6 @@
|
|||
namespace Kernel {
|
||||
|
||||
static Singleton<VirtualFileSystem> s_the;
|
||||
static constexpr int symlink_recursion_limit { 5 }; // FIXME: increase?
|
||||
static constexpr int root_mount_flags = MS_NODEV | MS_NOSUID | MS_RDONLY;
|
||||
|
||||
UNMAP_AFTER_INIT void VirtualFileSystem::initialize()
|
||||
|
|
|
@ -35,6 +35,10 @@ struct UidAndGid {
|
|||
class VirtualFileSystem {
|
||||
AK_MAKE_ETERNAL
|
||||
public:
|
||||
// Required to be at least 8 by POSIX
|
||||
// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html
|
||||
static constexpr int symlink_recursion_limit = 8;
|
||||
|
||||
static void initialize();
|
||||
static VirtualFileSystem& the();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue