diff options
author | rwatson <rwatson@FreeBSD.org> | 2007-02-19 13:22:36 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2007-02-19 13:22:36 +0000 |
commit | af558a567bca4251e63c1c0d9d36fdba1fce9a4d (patch) | |
tree | 585fe30099a9d48b0056301f58e209e0d3875069 /sys/kern/kern_resource.c | |
parent | 566d08ef612649fd58f63b8cf488b1f8d27e8a4d (diff) | |
download | FreeBSD-src-af558a567bca4251e63c1c0d9d36fdba1fce9a4d.zip FreeBSD-src-af558a567bca4251e63c1c0d9d36fdba1fce9a4d.tar.gz |
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.
Diffstat (limited to 'sys/kern/kern_resource.c')
-rw-r--r-- | sys/kern/kern_resource.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |