From 256c3de2f1ffb8dd3e497528c83df55582209e78 Mon Sep 17 00:00:00 2001 From: Aggelos Economopoulos Date: Thu, 7 May 2009 00:15:58 +0300 Subject: [PATCH] Allow USCHED_DEL_CPU for non-superuser processes --- sys/kern/kern_usched.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_usched.c b/sys/kern/kern_usched.c index 10960260ca..da48f96147 100644 --- a/sys/kern/kern_usched.c +++ b/sys/kern/kern_usched.c @@ -163,7 +163,8 @@ sys_usched_set(struct usched_set_args *uap) struct lwp *lp; int cpuid; /* USCHED_GET_CPU doesn't require root privileges. */ - if (uap->cmd != USCHED_GET_CPU && (error = priv_check(curthread, PRIV_ROOT)) != 0) + if ((uap->cmd != USCHED_GET_CPU) && (uap->cmd != USCHED_DEL_CPU) && + (error = priv_check(curthread, PRIV_ROOT)) != 0) return (error); if (uap->pid != 0 && uap->pid != curthread->td_proc->p_pid) -- 2.11.4.GIT