mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 15:58:47 +00:00
md: allow non-privileged uses to GET_*_INFO about raid arrays.
The info is already available in /proc/mdstat and /sys/block in an accessible form so there is no point in putting a road-block in the ioctl for information gathering. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
961902c0f8
commit
506c9e44a8
@ -6054,8 +6054,15 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,
|
|||||||
struct mddev *mddev = NULL;
|
struct mddev *mddev = NULL;
|
||||||
int ro;
|
int ro;
|
||||||
|
|
||||||
if (!capable(CAP_SYS_ADMIN))
|
switch (cmd) {
|
||||||
return -EACCES;
|
case RAID_VERSION:
|
||||||
|
case GET_ARRAY_INFO:
|
||||||
|
case GET_DISK_INFO:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (!capable(CAP_SYS_ADMIN))
|
||||||
|
return -EACCES;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Commands dealing with the RAID driver but not any
|
* Commands dealing with the RAID driver but not any
|
||||||
|
Loading…
x
Reference in New Issue
Block a user