mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +00:00
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.
This commit is contained in:
parent
998c1152ef
commit
9eeee24a39
3 changed files with 15 additions and 1 deletions
9
Kernel/API/POSIX/sys/limits.h
Normal file
9
Kernel/API/POSIX/sys/limits.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define NGROUPS_MAX 32
|
Loading…
Add table
Add a link
Reference in a new issue