]> git.proxmox.com Git - mirror_zfs.git/commit
Added encryption support for zfs recv -o / -x
authorTom Caputi <tcaputi@datto.com>
Fri, 13 Oct 2017 17:09:04 +0000 (13:09 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 15 Aug 2018 16:48:49 +0000 (09:48 -0700)
commitd9c460a0b659c044d4397b7405712f2c9450d3c4
tree973b92b7f835540f5ee722b56ff838828fd53116
parentfe8a7982ca90c3c9b8a09ec33f032527d7034a7b
Added encryption support for zfs recv -o / -x

One small integration that was absent from b52563 was
support for zfs recv -o / -x with regards to encryption
parameters. The main use cases of this are as follows:

* Receiving an unencrypted stream as encrypted without
  needing to create a "dummy" encrypted parent so that
  encryption can be inheritted.

* Allowing users to change their keylocation on receive,
  so long as the receiving dataset is an encryption root.

* Allowing users to explicitly exclude or override the
  encryption property from an unencrypted properties stream,
  allowing it to be received as encrypted.

* Receiving a recursive heirarchy of unencrypted datasets,
  encrypting the top-level one and forcing all children to
  inherit the encryption.

Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #7650
17 files changed:
contrib/pyzfs/libzfs_core/_libzfs_core.py
contrib/pyzfs/libzfs_core/bindings/libzfs_core.py
include/libzfs.h
include/libzfs_core.h
include/sys/dmu_send.h
lib/libzfs/libzfs_crypto.c
lib/libzfs/libzfs_dataset.c
lib/libzfs/libzfs_pool.c
lib/libzfs/libzfs_sendrecv.c
lib/libzfs_core/libzfs_core.c
man/man8/zfs.8
module/zfs/dmu_send.c
module/zfs/dsl_crypt.c
module/zfs/zfs_ioctl.c
tests/runfiles/linux.run
tests/zfs-tests/tests/functional/rsend/Makefile.am
tests/zfs-tests/tests/functional/rsend/send_encrypted_props.ksh [new file with mode: 0755]