aboutsummaryrefslogtreecommitdiff
path: root/sys/posix4
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2006-08-03 12:50:21 +0000
committerDavid Xu <davidxu@FreeBSD.org>2006-08-03 12:50:21 +0000
commit3ad6cdbdf30237e9dc2221653227b2ffc8f395c4 (patch)
tree9e2ef09980cb45421e39650cb2979ba6b8dca663 /sys/posix4
parent6036942467a3c87e3e53367e4e4c284b6dece214 (diff)
Notes
Diffstat (limited to 'sys/posix4')
-rw-r--r--sys/posix4/p1003_1b.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/posix4/p1003_1b.c b/sys/posix4/p1003_1b.c
index 7f366f1483cc..055889e37e61 100644
--- a/sys/posix4/p1003_1b.c
+++ b/sys/posix4/p1003_1b.c
@@ -195,6 +195,10 @@ int sched_setscheduler(struct thread *td,
struct thread *targettd;
struct proc *targetp;
+ /* Don't allow non root user to set a scheduler policy */
+ if (suser(td) != 0)
+ return (EPERM);
+
e = copyin(uap->param, &sched_param, sizeof(sched_param));
if (e)
return (e);