summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRyan Moeller <[email protected]>2022-11-09 21:24:06 +0000
committerTony Hutter <[email protected]>2022-11-30 10:13:23 -0800
commit1d9aa838ed5a11a49676678e03e6f0d50ec05d78 (patch)
treed9eca86b3ff7c90b281b9cd3923e424fc2c2e4f6 /lib
parent0f4ee295ba94803e5833f57481cfdbee5d1160d4 (diff)
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 <[email protected]> Backported as snippit from: 63652e1 Add --enable-asan and --enable-ubsan switches
Diffstat (limited to 'lib')
-rw-r--r--lib/libzfs/libzfs_sendrecv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c
index 899cc84cf..0dbd98b2b 100644
--- a/lib/libzfs/libzfs_sendrecv.c
+++ b/lib/libzfs/libzfs_sendrecv.c
@@ -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
* values we remove them from "recvprops" input nvlist.
*/
- if (!zfs_prop_inheritable(prop) &&
- !zfs_prop_user(name) && /* can be inherited too */
+ if (!zfs_prop_user(name) && /* can be inherited too */
+ !zfs_prop_inheritable(prop) &&
nvlist_exists(recvprops, name))
fnvlist_remove(recvprops, name);
else