Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 506c9e44 authored by NeilBrown's avatar NeilBrown
Browse files

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: default avatarNeilBrown <neilb@suse.de>
parent 961902c0
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -6054,8 +6054,15 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,
	struct mddev *mddev = NULL;
	int ro;

	switch (cmd) {
	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