11309 zfs recv on delegated dataset inside a zone can fail

Review Request #2089 — Created July 8, 2019 and submitted — Latest diff uploaded


After the zfs encryption changes were integrated, we (Joyent) found a regression when trying to receive a send stream to a delegated dataset inside a zone. This occurs due to failure on the zfs_secpolicy_recv check.

I've written a new test case for this issue. All of the pre-existing zfs-test suite send/recv tests still pass (they also passed previously).