[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20130131112612.E7F446FC039@msa105.auone-net.jp>
Date: Thu, 31 Jan 2013 20:26:12 +0900
From: Kusanagi Kouichi <slash@...auone-net.jp>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
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@...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists