Enforce process limit policy in one place to keep proccnt from diverging

from reality.
This commit is contained in:
Don Lewis 2000-09-14 23:07:39 +00:00
parent 37a23ef8ee
commit 42fd51cedc

View File

@ -253,8 +253,8 @@ fork1(p1, flags, procp)
* a nonprivileged user to exceed their current limit.
*/
ok = chgproccnt(p1->p_cred->p_uidinfo, 1,
p1->p_rlimit[RLIMIT_NPROC].rlim_cur);
if (uid != 0 && !ok) {
(uid != 0) ? p1->p_rlimit[RLIMIT_NPROC].rlim_cur : 0);
if (!ok) {
/*
* Back out the process count
*/