mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 06:14:39 +01:00
block: grant IOPRIO_CLASS_RT to CAP_SYS_NICE
CAP_SYS_ADMIN is too broad, and ionice fits into CAP_SYS_NICE's grouping. Retain CAP_SYS_ADMIN permission for backwards compatibility. Signed-off-by: Khazhismel Kumykov <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Acked-by: Serge Hallyn <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
1 parent
a7863b3423
commit
9d3a39a5f1
2 files changed
+3
-1
No files matched your search
+1
-1
@@ -69,7 +69,7 @@ int ioprio_check_cap(int ioprio)
|
||||
|
||||
switch (class) {
|
||||
case IOPRIO_CLASS_RT:
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
if (!capable(CAP_SYS_NICE) && !capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
fallthrough;
|
||||
/* rt has prio field too */
|
||||
|
||||
@@ -288,6 +288,8 @@ struct vfs_ns_cap_data {
|
||||
processes and setting the scheduling algorithm used by another
|
||||
process. */
|
||||
/* Allow setting cpu affinity on other processes */
|
||||
/* Allow setting realtime ioprio class */
|
||||
/* Allow setting ioprio class on other processes */
|
||||
|
||||
#define CAP_SYS_NICE 23
|
||||
|
||||
|
||||
Reference in new issue
Block a user