2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

Limit max_groups in sudo.conf to 1024.

The max_groups setting should no longer be needed anyway.
This commit is contained in:
Todd C. Miller
2021-02-16 12:37:23 -07:00
parent df91e15b82
commit a18b2a9ddf
4 changed files with 8 additions and 8 deletions

View File

@@ -319,7 +319,7 @@ sudoers_policy_deserialize_info(void *v)
if (MATCHES(*cur, "max_groups=")) {
errno = 0;
p = *cur + sizeof("max_groups=") - 1;
sudo_user.max_groups = sudo_strtonum(p, 1, INT_MAX, &errstr);
sudo_user.max_groups = sudo_strtonum(p, 1, 1024, &errstr);
if (sudo_user.max_groups == 0) {
sudo_warnx(U_("%s: %s"), *cur, U_(errstr));
goto bad;