diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2018-12-11 19:32:16 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2018-12-11 19:32:16 +0000 |
commit | cc426dd31990b8b50b210efc450e404596548ca1 (patch) | |
tree | 4c797c5d8886d8d05bb5346b747005b539105825 /sys/kern/kern_fork.c | |
parent | 959530cc41aea5f878c2c2cea5b545d295108bab (diff) |
Notes
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r-- | sys/kern/kern_fork.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 6bdf47510baf..acba58b89c8f 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -838,8 +838,7 @@ fork1(struct thread *td, struct fork_req *fr) * processes; don't let root exceed the limit. */ nprocs_new = atomic_fetchadd_int(&nprocs, 1) + 1; - if ((nprocs_new >= maxproc - 10 && priv_check_cred(td->td_ucred, - PRIV_MAXPROC, 0) != 0) || nprocs_new >= maxproc) { + if ((nprocs_new >= maxproc - 10 && priv_check_cred(td->td_ucred, PRIV_MAXPROC) != 0) || nprocs_new >= maxproc) { error = EAGAIN; sx_xlock(&allproc_lock); if (ppsratecheck(&lastfail, &curfail, 1)) { @@ -936,7 +935,7 @@ fork1(struct thread *td, struct fork_req *fr) * * XXXRW: Can we avoid privilege here if it's not needed? */ - error = priv_check_cred(td->td_ucred, PRIV_PROC_LIMIT, 0); + error = priv_check_cred(td->td_ucred, PRIV_PROC_LIMIT); if (error == 0) ok = chgproccnt(td->td_ucred->cr_ruidinfo, 1, 0); else { |