The patch titled md: require CAP_SYS_ADMIN for (re-)configuring md devices via sysfs has been added to the -mm tree. Its filename is md-require-cap_sys_admin-for-re-configuring-md-devices-via-sysfs.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: md: require CAP_SYS_ADMIN for (re-)configuring md devices via sysfs From: NeilBrown <neilb@xxxxxxx> The ioctl requires CAP_SYS_ADMIN, so sysfs should too. Note that we don't require CAP_SYS_ADMIN for reading attributes even though the ioctl does. There is no reason to limit the read access, and much of the information is already available via /proc/mdstat Cc: Chris Wright <chrisw@xxxxxxxxxxxx> Signed-off-by: Neil Brown <neilb@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/md/md.c | 4 ++++ 1 file changed, 4 insertions(+) diff -puN drivers/md/md.c~md-require-cap_sys_admin-for-re-configuring-md-devices-via-sysfs drivers/md/md.c --- a/drivers/md/md.c~md-require-cap_sys_admin-for-re-configuring-md-devices-via-sysfs +++ a/drivers/md/md.c @@ -1928,6 +1928,8 @@ rdev_attr_store(struct kobject *kobj, st if (!entry->store) return -EIO; + if (!capable(CAP_SYS_ADMIN)) + return -EACCES; return entry->store(rdev, page, length); } @@ -2861,6 +2863,8 @@ md_attr_store(struct kobject *kobj, stru if (!entry->store) return -EIO; + if (!capable(CAP_SYS_ADMIN)) + return -EACCES; rv = mddev_lock(mddev); if (!rv) { rv = entry->store(mddev, page, length); _ Patches currently in -mm which might be from neilb@xxxxxxx are origin.patch generic_file_buffered_write-deadlock-on-vectored-write.patch md-possible-fix-for-unplug-problem.patch md-set-desc_nr-correctly-for-version-1-superblocks.patch md-delay-starting-md-threads-until-array-is-completely-setup.patch md-fix-resync-speed-calculation-for-restarted-resyncs.patch md-fix-a-plug-unplug-race-in-raid5.patch md-fix-some-small-races-in-bitmap-plugging-in-raid5.patch md-fix-usage-of-wrong-variable-in-raid1.patch md-unify-usage-of-symbolic-names-for-perms.patch md-require-cap_sys_admin-for-re-configuring-md-devices-via-sysfs.patch md-fix-will-configure-message-when-interpreting-md=-kernel-parameter.patch md-include-sector-number-in-messages-about-corrected-read-errors.patch md-dm-reduce-stack-usage-with-stacked-block-devices.patch lockdep-annotate-sunrpc-code.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html