mirror_zfs/lib/libzfs
Tom Caputi 4a385862b7 Prevent raw zfs recv -F if dataset is unencrypted
The current design of ZFS encryption only allows a dataset to
have one DSL Crypto Key at a time. As a result, it is important
that the zfs receive code ensures that only one key can be in use
at a time for a given DSL Directory. zfs receive -F complicates
this, since the new dataset is received as a clone of the existing
one so that an atomic switch can be done at the end. To prevent
confusion about which dataset is actually encrypted a check was
added to ensure that encrypted datasets cannot use zfs recv -F to
completely replace existing datasets. Unfortunately, the check did
not take into account unencrypted datasets being overriden by
encrypted ones as a case.

Along the same lines, the code also failed to ensure that raw
recieves could not be done on top of existing unencrypted
datasets, which causes amny problems since the new stream cannot
be decrypted.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #7199
2018-02-21 12:30:11 -08:00
..
.gitignore Add a pkgconfig file 2014-08-28 07:59:43 -07:00
libzfs_changelist.c Native Encryption for ZFS on Linux 2017-08-14 10:36:48 -07:00
libzfs_config.c OpenZFS 4521 - zfstest is trying to execute evil "zfs unmount -a" 2017-02-03 13:24:44 -08:00
libzfs_core.pc.in Add a pkgconfig file 2014-08-28 07:59:43 -07:00
libzfs_crypto.c Encryption Stability and On-Disk Format Fixes 2018-02-02 11:37:16 -08:00
libzfs_dataset.c Project Quota on ZFS 2018-02-13 14:54:54 -08:00
libzfs_diff.c Native Encryption for ZFS on Linux 2017-08-14 10:36:48 -07:00
libzfs_import.c zpool import -d to specify device path 2018-01-26 10:49:46 -08:00
libzfs_iter.c OpenZFS 8940 - Sending an intra-pool resumable send stream may result in EXDEV 2018-02-14 14:35:04 -08:00
libzfs_mount.c Fix some ZFS Test Suite issues 2017-09-25 10:32:34 -07:00
libzfs_pool.c OpenZFS 8652 - Tautological comparisons with ZPROP_INVAL 2018-01-19 09:22:37 -08:00
libzfs_sendrecv.c Prevent raw zfs recv -F if dataset is unencrypted 2018-02-21 12:30:11 -08:00
libzfs_status.c Encryption Stability and On-Disk Format Fixes 2018-02-02 11:37:16 -08:00
libzfs_util.c OpenZFS 7431 - ZFS Channel Programs 2018-02-08 15:28:18 -08:00
libzfs.pc.in Add a pkgconfig file 2014-08-28 07:59:43 -07:00
Makefile.am Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
THIRDPARTYLICENSE.openssl Encryption patch follow-up 2017-10-11 16:54:48 -04:00
THIRDPARTYLICENSE.openssl.descrip Encryption patch follow-up 2017-10-11 16:54:48 -04:00