libzfs: report invalid permission name in zfs allow
zfs allow with a typo (e.g. "snapshop") produced the misleading error "operation not applicable to datasets of this type". Report "invalid permission" instead. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Christos Longros <chris.longros@gmail.com> Closes #18401 Closes #11903
This commit is contained in:
@@ -5138,7 +5138,7 @@ zfs_set_fsacl(zfs_handle_t *zhp, boolean_t un, nvlist_t *nvl)
|
||||
err = zfs_error(hdl, EZFS_BADVERSION, errbuf);
|
||||
break;
|
||||
case EINVAL:
|
||||
err = zfs_error(hdl, EZFS_BADTYPE, errbuf);
|
||||
err = zfs_error(hdl, EZFS_BADPERM, errbuf);
|
||||
break;
|
||||
case ENOENT:
|
||||
err = zfs_error(hdl, EZFS_NOENT, errbuf);
|
||||
|
||||
Reference in New Issue
Block a user