Skip to content

Commit 2220dcb

Browse files
committed
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. Closes #11903 Signed-off-by: Christos Longros <chris.longros@gmail.com>
1 parent 74da516 commit 2220dcb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/libzfs/libzfs_dataset.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5138,7 +5138,7 @@ zfs_set_fsacl(zfs_handle_t *zhp, boolean_t un, nvlist_t *nvl)
51385138
err = zfs_error(hdl, EZFS_BADVERSION, errbuf);
51395139
break;
51405140
case EINVAL:
5141-
err = zfs_error(hdl, EZFS_BADTYPE, errbuf);
5141+
err = zfs_error(hdl, EZFS_BADPERM, errbuf);
51425142
break;
51435143
case ENOENT:
51445144
err = zfs_error(hdl, EZFS_NOENT, errbuf);

0 commit comments

Comments
 (0)