Messages in this thread Patch in this message | | | Date | Thu, 31 Jan 2013 20:26:12 +0900 | From | Kusanagi Kouichi <> | Subject | [PATCH] ioprio: Allow CAP_SYS_NICE to set IOPRIO_CLASS_RT |
| |
sched_setscheduler allows a process with CAP_SYS_NICE to set real-time policy. Let ioprio_set follow this.
Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp> --- fs/ioprio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ioprio.c b/fs/ioprio.c index e50170c..155b51e 100644 --- a/fs/ioprio.c +++ b/fs/ioprio.c @@ -70,7 +70,7 @@ SYSCALL_DEFINE3(ioprio_set, int, which, int, who, int, ioprio) switch (class) { case IOPRIO_CLASS_RT: - if (!capable(CAP_SYS_ADMIN)) + if (!capable(CAP_SYS_NICE) && !capable(CAP_SYS_ADMIN)) return -EPERM; /* fall through, rt has prio field too */ case IOPRIO_CLASS_BE: -- 1.7.10.4
| |