libzfs recv: Check if user prop before inheritable

User props trigger an assert in zfs_prop_inheritable(), we must check
if the prop is a user prop first.

Signed-off-by: Ryan Moeller <ryan@iXsystems.com>

Backported as snippit from:
63652e1 Add --enable-asan and --enable-ubsan switches
This commit is contained in:
Ryan Moeller 2022-11-09 21:24:06 +00:00 committed by Tony Hutter
parent 0f4ee295ba
commit 1d9aa838ed
1 changed files with 2 additions and 2 deletions

View File

@ -4013,8 +4013,8 @@ zfs_setup_cmdline_props(libzfs_handle_t *hdl, zfs_type_t type,
* properties: if we're asked to exclude this kind of * properties: if we're asked to exclude this kind of
* values we remove them from "recvprops" input nvlist. * values we remove them from "recvprops" input nvlist.
*/ */
if (!zfs_prop_inheritable(prop) && if (!zfs_prop_user(name) && /* can be inherited too */
!zfs_prop_user(name) && /* can be inherited too */ !zfs_prop_inheritable(prop) &&
nvlist_exists(recvprops, name)) nvlist_exists(recvprops, name))
fnvlist_remove(recvprops, name); fnvlist_remove(recvprops, name);
else else