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

Add basic support for setting resource limits in sudoers.

The default for rlimit_core is "0,0"
Resource limits are passed back to the front-end in command_info[]
when set.
This commit is contained in:
Todd C. Miller
2021-11-08 17:46:19 -07:00
parent 9c465f84ad
commit f279df5e18
7 changed files with 210 additions and 1 deletions

View File

@@ -597,6 +597,50 @@ struct sudo_defs_types sudo_defs_table[] = {
"intercept_allow_setid", T_FLAG,
N_("Allow an intercepted command to run set setuid or setgid programs"),
NULL,
}, {
"rlimit_as", T_RLIMIT|T_BOOL,
N_("The maximum size to which the process's address space may grow (in bytes): %s"),
NULL,
}, {
"rlimit_core", T_RLIMIT|T_BOOL,
N_("The largest size core dump file that may be created (in bytes): %s"),
NULL,
}, {
"rlimit_cpu", T_RLIMIT|T_BOOL,
N_("The maximum amount of CPU time that the process may use (in seconds): %s"),
NULL,
}, {
"rlimit_data", T_RLIMIT|T_BOOL,
N_("The maximum size of the data segment for the process (in bytes): %s"),
NULL,
}, {
"rlimit_fsize", T_RLIMIT|T_BOOL,
N_("The largest size file that the process may create (in bytes): %s"),
NULL,
}, {
"rlimit_locks", T_RLIMIT|T_BOOL,
N_("The maximum number of locks that the process may establish: %s"),
NULL,
}, {
"rlimit_memlock", T_RLIMIT|T_BOOL,
N_("The maximum size that the process may lock in memory (in bytes): %s"),
NULL,
}, {
"rlimit_nofile", T_RLIMIT|T_BOOL,
N_("The maximum number of files that the process may have open: %s"),
NULL,
}, {
"rlimit_nproc", T_RLIMIT|T_BOOL,
N_("The maximum number of processes that the user may run simultaneously: %s"),
NULL,
}, {
"rlimit_rss", T_RLIMIT|T_BOOL,
N_("The maximum size to which the process's resident set size may grow (in bytes): %s"),
NULL,
}, {
"rlimit_stack", T_RLIMIT|T_BOOL,
N_("The maximum size to which the process's stack may grow (in bytes): %s"),
NULL,
}, {
NULL, 0, NULL
}