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
18947b6ce3
commit
aaab6ad128
@ -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