From 2c7549fb6fdaf8a60e9876b512e1f3e1a83b944f Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 13 Nov 2019 09:23:14 -0800 Subject: [PATCH] Fix `zpool create -o ` error message When `zpool create -o ` is run without root permissions and the pool property requested is not specifically enumerated in zpool_valid_proplist(). Then an incorrect error message referring to an invalid property is printed rather than the expected permission denied error. Specifying a pool property at create time should be handled the same way as filesystem properties in zfs_valid_proplist(). There should not be default zfs_error_aux() set for properties which are not listed. Reviewed-by: loli10K Reviewed-by: Kjeld Schouten Signed-off-by: Brian Behlendorf Closes #9550 Closes #9568 --- lib/libzfs/libzfs_pool.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/libzfs/libzfs_pool.c b/lib/libzfs/libzfs_pool.c index 1bd2b44be..d45b87ce6 100644 --- a/lib/libzfs/libzfs_pool.c +++ b/lib/libzfs/libzfs_pool.c @@ -734,8 +734,6 @@ zpool_valid_proplist(libzfs_handle_t *hdl, const char *poolname, break; default: - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "property '%s'(%d) not defined"), propname, prop); break; } }