zfs_ioc_snapshot: check user-prop permissions on snapshotted datasets
authorAndriy Gapon <avg@FreeBSD.org>
Tue, 27 Aug 2019 20:45:53 +0000 (23:45 +0300)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 27 Aug 2019 20:45:53 +0000 (13:45 -0700)
commite6203d288a787f7196bdc206edfc9148f9a58780
treec9a7f2d18419d5aeb1d9aa74a37f34faf6672bf7
parentf335b8ffe178276c7a98bdc87965a3dc9e2b59f5
zfs_ioc_snapshot: check user-prop permissions on snapshotted datasets

Previously, the permissions were checked on the pool which was obviously
incorrect.

After this change, zfs_check_userprops() only validates the properties
without any permission checks.  The permissions are checked individually
for each snapshotted dataset.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Matt Ahrens <mahrens@delphix.com>
Signed-off-by: Andriy Gapon <avg@FreeBSD.org>
Closes #9179
Closes #9180
module/zfs/zfs_ioctl.c