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.
This commit is contained in:
parent
c3c1b5e62a
commit
86138fc742
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user