From f45e640df8ff95cd8314698da75643a16943ae4d Mon Sep 17 00:00:00 2001 From: Alain Spineux Date: Mon, 24 Oct 2022 14:55:15 +0200 Subject: [PATCH] VolEnc: rename BlockEncrytion into VolumeEncryption --- bacula/src/stored/block.c | 2 +- bacula/src/stored/block_util.c | 2 +- bacula/src/stored/dev.c | 2 +- bacula/src/stored/label.c | 2 +- bacula/src/stored/stored_conf.c | 2 +- bacula/src/stored/stored_conf.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bacula/src/stored/block.c b/bacula/src/stored/block.c index f205aa7ab..2c34b6932 100644 --- a/bacula/src/stored/block.c +++ b/bacula/src/stored/block.c @@ -74,7 +74,7 @@ bool DCR::write_block_to_device(bool final) ok = false; goto bail_out; /* fatal error */ } - if (dcr->despooling && dev->device->block_encryption!=ET_NONE && dev->crypto_device_ctx!=NULL) { + if (dcr->despooling && dev->device->volume_encryption!=ET_NONE && dev->crypto_device_ctx!=NULL) { // DEVICE *old = block->dev; block->dev = dev; // uint64_t checksum = ser_block_header(block, dev->do_checksum()); diff --git a/bacula/src/stored/block_util.c b/bacula/src/stored/block_util.c index 8b1626dd3..10e8fac76 100644 --- a/bacula/src/stored/block_util.c +++ b/bacula/src/stored/block_util.c @@ -384,7 +384,7 @@ uint64_t ser_block_header(DEV_BLOCK *block, bool do_checksum) ser_declare; uint32_t block_len = block->binbuf; uint32_t hdr_option = 0x0; - bool do_encrypt_vol = dev->device->block_encryption!=ET_NONE && dev->crypto_device_ctx!=NULL; + bool do_encrypt_vol = dev->device->volume_encryption!=ET_NONE && dev->crypto_device_ctx!=NULL; bool do_encrypt_block = do_encrypt_vol && !block->first_block; hdr_option |= (do_checksum?BLKHOPT_CHKSUM:0) | (do_encrypt_vol?BLKHOPT_ENCRYPT_VOL:0) | diff --git a/bacula/src/stored/dev.c b/bacula/src/stored/dev.c index c5b0985fe..148a8a660 100644 --- a/bacula/src/stored/dev.c +++ b/bacula/src/stored/dev.c @@ -1180,7 +1180,7 @@ bool DEVICE::load_encryption_key(DCR *dcr, const char *operation, { enum { op_none, op_label, op_read }; bool ok = true; // No error - if (!device->block_encryption) { + if (!device->volume_encryption) { return ok; } JCR *jcr = dcr->jcr; diff --git a/bacula/src/stored/label.c b/bacula/src/stored/label.c index ad5882cb3..d30160ad7 100644 --- a/bacula/src/stored/label.c +++ b/bacula/src/stored/label.c @@ -743,7 +743,7 @@ static void create_volume_label_record(DCR *dcr, DEVICE *dev, ser_string(dev->VolHdr.PoolType); ser_string(dev->VolHdr.MediaType); - if (dev->device->block_encryption == ET_STRONG) { + if (dev->device->volume_encryption == ET_STRONG) { ser_string("OBFUSCATED"); } else { ser_string(dev->VolHdr.HostName); diff --git a/bacula/src/stored/stored_conf.c b/bacula/src/stored/stored_conf.c index 7891b2182..00c3cafbd 100644 --- a/bacula/src/stored/stored_conf.c +++ b/bacula/src/stored/stored_conf.c @@ -202,7 +202,7 @@ static RES_ITEM dev_items[] = { {"Dedupengine", store_res, ITEM(res_dev.dedup), R_DEDUP, 0, 0}, #endif {"SyncOnClose", store_bit, ITEM(res_dev.cap_bits), CAP_SYNCONCLOSE, ITEM_DEFAULT, 0}, - {"BlockEncryption", store_enctype,ITEM(res_dev.block_encryption), 0, ITEM_DEFAULT, 0}, + {"VolumeEncryption", store_enctype,ITEM(res_dev.volume_encryption), 0, ITEM_DEFAULT, 0}, {NULL, NULL, {0}, 0, 0, 0} }; diff --git a/bacula/src/stored/stored_conf.h b/bacula/src/stored/stored_conf.h index ef2b46a79..ccb1d9573 100644 --- a/bacula/src/stored/stored_conf.h +++ b/bacula/src/stored/stored_conf.h @@ -240,7 +240,7 @@ public: bool set_vol_append_only; /* Set 'Append Only' filesystem flag for volumes */ bool set_vol_immutable; /* Set 'Immutable' filesystem flag for volumes */ bool set_vol_read_only; /* Set permission of volumes when marking them as Full/Used */ - uint32_t block_encryption; /* call the key-manager command to get the cipher and the key to use */ + uint32_t volume_encryption; /* call the key-manager command to get the cipher and the key to use */ utime_t min_volume_protection_time; /* Minimum Volume Protection Time */ uint32_t drive_index; /* Autochanger drive index */ uint32_t cap_bits; /* Capabilities of this device */ -- 2.47.3