diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index 1feea8b64cf8..73ffb03db9f0 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -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;