diff options
author | LOLi <[email protected]> | 2017-07-07 19:39:53 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-07-07 10:39:53 -0700 |
commit | 92e43c17188d47f47b69318e4884096dec380e36 (patch) | |
tree | 7bdc7d283ccab78569c4084794c6dfc2b4c363c0 /module/zfs | |
parent | 0ea05c64f8d08c20439dd2a06e949a2aa4115101 (diff) |
Fix 'zpool clear' on readonly pools
Illumos 4080 inadvertently allows 'zpool clear' on readonly pools: fix
this by reintroducing a check (POOL_CHECK_READONLY) in zfs_ioc_clear
registration code.
Signed-off-by: Giuseppe Di Natale <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Signed-off-by: loli10K <[email protected]>
Closes #6306
Diffstat (limited to 'module/zfs')
-rw-r--r-- | module/zfs/zfs_ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c index acdfba173..d56049931 100644 --- a/module/zfs/zfs_ioctl.c +++ b/module/zfs/zfs_ioctl.c @@ -6163,7 +6163,7 @@ zfs_ioctl_init(void) zfs_secpolicy_config, B_TRUE, POOL_CHECK_NONE); zfs_ioctl_register_pool(ZFS_IOC_CLEAR, zfs_ioc_clear, - zfs_secpolicy_config, B_TRUE, POOL_CHECK_NONE); + zfs_secpolicy_config, B_TRUE, POOL_CHECK_READONLY); zfs_ioctl_register_pool(ZFS_IOC_POOL_REOPEN, zfs_ioc_pool_reopen, zfs_secpolicy_config, B_TRUE, POOL_CHECK_SUSPENDED); |