Skip to content

Commit

Permalink
Fix zpool create -o <property> error message
Browse files Browse the repository at this point in the history
When `zpool create -o <property>` 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 <ezomori.nozomu@gmail.com>
Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #9550 
Closes #9568
  • Loading branch information
behlendorf committed Nov 13, 2019
1 parent c5ebfbb commit 94a570e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/libzfs/libzfs_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,8 +724,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;
}
}
Expand Down

0 comments on commit 94a570e

Please sign in to comment.