Add front-end support for setting resouce limits.

The special value "user" means preserve the invoking user's limit.
The value "default" means don't override the default limit for the
user as assigned by the system (PAM, loging.conf, userdb, etc).
This commit is contained in:
Todd C. Miller
2021-11-08 18:21:11 -07:00
parent f279df5e18
commit 74ef983f60
4 changed files with 240 additions and 4 deletions

View File

@@ -300,8 +300,10 @@ int tcsetpgrp_nobg(int fd, pid_t pgrp_id);
void disable_coredump();
void restore_limits(void);
void restore_nproc(void);
void set_policy_rlimits(void);
void unlimit_nproc(void);
void unlimit_sudo(void);
int serialize_limits(char **info, size_t info_max);
int serialize_rlimits(char **info, size_t info_max);
bool parse_policy_rlimit(const char *str);
#endif /* SUDO_SUDO_H */