From af558a567bca4251e63c1c0d9d36fdba1fce9a4d Mon Sep 17 00:00:00 2001 From: rwatson Date: Mon, 19 Feb 2007 13:22:36 +0000 Subject: Use priv_check(9) instead of suser(9) for checking the privilege to set real-time priority on a thread. It looks like this suser(9) call was introduced after my first pass through replacing superuser checks with named privilege checks. --- sys/kern/kern_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/kern') diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index 09a1ccc..efce45b 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -330,7 +330,7 @@ rtprio_thread(struct thread *td, struct rtprio_thread_args *uap) break; /* Disallow setting rtprio in most cases if not superuser. */ - if (suser(td) != 0) { + if (priv_check(td, PRIV_SCHED_RTPRIO) != 0) { /* can't set realtime priority */ /* * Realtime priority has to be restricted for reasons which should be -- cgit v1.1