mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Add --no-preserve-encryption flag
* Add an option to send datasets with params or replicate without preserving encryption * Add a test case for the new functionality Reviewed-by: Paul Dagnelie <paul.dagnelie@klarasystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Chris Jacobs <idefix2020dev@gmail.com> Closes #18240
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
# encryption child
|
||||
# 10. Verify that an unencrypted recursive send can be received as an
|
||||
# encryption child
|
||||
# 11. Verify an encrypted pool can be sent with props only when -U is set
|
||||
#
|
||||
|
||||
verify_runnable "both"
|
||||
@@ -119,6 +120,13 @@ log_mustnot eval "zfs send -i $esnap $esnap2 |" \
|
||||
"zfs recv -o pbkdf2iters=100k $TESTPOOL/recv"
|
||||
log_must zfs destroy -r $TESTPOOL/recv
|
||||
|
||||
# The user has to explicitly allow sending a dataset unecrypted when sending
|
||||
# an encrypted dataset with properties
|
||||
log_note "Must not be able to send an encrypted dataset with props unless the -U flag is set"
|
||||
log_mustnot eval "zfs send -p $esnap | zfs recv $TESTPOOL/recv"
|
||||
log_must eval "zfs send -p -U $esnap | zfs recv $TESTPOOL/recv"
|
||||
log_must zfs destroy -r $TESTPOOL/recv
|
||||
|
||||
# Test that we can receive a simple stream as an encryption root.
|
||||
log_note "Must be able to receive stream as encryption root"
|
||||
ds=$TESTPOOL/recv
|
||||
|
||||
Reference in New Issue
Block a user