mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-16 15:11:52 +00:00
Ensure that RLIMIT_NPROC limits are at least 1 to avoid bad interaction
with chgproccnt. MFC candiate. Reviewed by: alfred
This commit is contained in:
parent
58e9b41722
commit
d82b3e319a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=72780
@ -506,6 +506,10 @@ dosetrlimit(p, which, limp)
|
||||
limp->rlim_cur = maxprocperuid;
|
||||
if (limp->rlim_max > maxprocperuid)
|
||||
limp->rlim_max = maxprocperuid;
|
||||
if (limp->rlim_cur < 1)
|
||||
limp->rlim_cur = 1;
|
||||
if (limp->rlim_max < 1)
|
||||
limp->rlim_max = 1;
|
||||
break;
|
||||
}
|
||||
*alimp = *limp;
|
||||
|
Loading…
Reference in New Issue
Block a user