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 <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Christos Longros <[email protected]>
Closes #18401
Closes #11903
This commit is contained in:
Christos Longros authored and GitHub committed 2026-04-20 10:15:29 -07:00
1 parent 4339b4eb2f
commit 1cebe8a38e
1 file changed
+1 -1
+1 -1
View File
@@ -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);