mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 22:35:10 +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:
@@ -2,7 +2,7 @@
|
||||
.\"
|
||||
.\" SPDX-License-Identifier: ISC
|
||||
.\"
|
||||
.\" Copyright (c) 2010-2020 Todd C. Miller <Todd.Miller@sudo.ws>
|
||||
.\" Copyright (c) 2010-2021 Todd C. Miller <Todd.Miller@sudo.ws>
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -17,7 +17,7 @@
|
||||
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.nr SL @SEMAN@
|
||||
.TH "SUDO.CONF" "@mansectform@" "December 5, 2020" "Sudo @PACKAGE_VERSION@" "File Formats Manual"
|
||||
.TH "SUDO.CONF" "@mansectform@" "February 16, 2021" "Sudo @PACKAGE_VERSION@" "File Formats Manual"
|
||||
.nh
|
||||
.if n .ad l
|
||||
.SH "NAME"
|
||||
@@ -496,7 +496,7 @@ version 1.8.7 and higher.
|
||||
.TP 10n
|
||||
max_groups
|
||||
The maximum number of user groups to retrieve from the group database.
|
||||
Values less than one will be ignored.
|
||||
Values less than one or larger than 1024 will be ignored.
|
||||
This setting is only used when querying the group database directly.
|
||||
It is intended to be used on systems where it is not possible to detect
|
||||
when the array to be populated with group entries is not sufficiently large.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
.\"
|
||||
.\" SPDX-License-Identifier: ISC
|
||||
.\"
|
||||
.\" Copyright (c) 2010-2020 Todd C. Miller <Todd.Miller@sudo.ws>
|
||||
.\" Copyright (c) 2010-2021 Todd C. Miller <Todd.Miller@sudo.ws>
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -16,7 +16,7 @@
|
||||
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.nr SL @SEMAN@
|
||||
.Dd December 5, 2020
|
||||
.Dd February 16, 2021
|
||||
.Dt SUDO.CONF @mansectform@
|
||||
.Os Sudo @PACKAGE_VERSION@
|
||||
.Sh NAME
|
||||
@@ -453,7 +453,7 @@ This setting is only available in
|
||||
version 1.8.7 and higher.
|
||||
.It max_groups
|
||||
The maximum number of user groups to retrieve from the group database.
|
||||
Values less than one will be ignored.
|
||||
Values less than one or larger than 1024 will be ignored.
|
||||
This setting is only used when querying the group database directly.
|
||||
It is intended to be used on systems where it is not possible to detect
|
||||
when the array to be populated with group entries is not sufficiently large.
|
||||
|
@@ -431,7 +431,7 @@ set_var_max_groups(const char *strval, const char *conf_file,
|
||||
int max_groups;
|
||||
debug_decl(set_var_max_groups, SUDO_DEBUG_UTIL);
|
||||
|
||||
max_groups = sudo_strtonum(strval, 1, INT_MAX, NULL);
|
||||
max_groups = sudo_strtonum(strval, 1, 1024, NULL);
|
||||
if (max_groups <= 0) {
|
||||
sudo_warnx(U_("invalid max groups \"%s\" in %s, line %u"), strval,
|
||||
conf_file, lineno);
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user