diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-20 22:22:58 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-20 22:39:56 +0200 |
commit | 9eeee24a39298055d9aaae606a55a5fb1c2a186f (patch) | |
tree | dfcfd204c2920e6197e8b36c0d69d22d8a4b2b1e /Kernel/API | |
parent | 998c1152efa116da5fabf89363d178c8fb729d77 (diff) | |
download | serenity-9eeee24a39298055d9aaae606a55a5fb1c2a186f.zip |
Kernel+LibC: Enforce a limit on the number of supplementary group IDs
This patch adds the NGROUPS_MAX constant and enforces it in
sys$setgroups() to ensure that no process has more than 32 supplementary
group IDs.
The number doesn't mean anything in particular, just had to pick a
number. Perhaps one day we'll have a reason to change it.
Diffstat (limited to 'Kernel/API')
-rw-r--r-- | Kernel/API/POSIX/sys/limits.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Kernel/API/POSIX/sys/limits.h b/Kernel/API/POSIX/sys/limits.h new file mode 100644 index 0000000000..df12d14894 --- /dev/null +++ b/Kernel/API/POSIX/sys/limits.h @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2022, Andreas Kling <kling@serenityos.org> + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#define NGROUPS_MAX 32 |