]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
VolEnc: rename BlockEncrytion into VolumeEncryption
authorAlain Spineux <alain@baculasystems.com>
Mon, 24 Oct 2022 12:55:15 +0000 (14:55 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:56:59 +0000 (13:56 +0200)
bacula/src/stored/block.c
bacula/src/stored/block_util.c
bacula/src/stored/dev.c
bacula/src/stored/label.c
bacula/src/stored/stored_conf.c
bacula/src/stored/stored_conf.h

index f205aa7abc0118158ace2fd3213795b722f3b835..2c34b69324baad6d19fc42e10dcdddbb5d5c41c4 100644 (file)
@@ -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());
index 8b1626dd34617603a587b7fcf011a336467752a9..10e8fac7667d1788db75a7f1c7398e20828fe79a 100644 (file)
@@ -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) |
index c5b0985fe7d3e9e1a5186dee706a33f9ba50e6e3..148a8a66068c1f0d4a528d560f37cd015221d432 100644 (file)
@@ -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;
index ad5882cb3c05971550a390c9aa6e3dd858e37ebd..d30160ad7beafeaf6326116e7998ef518802d681 100644 (file)
@@ -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);
index 7891b2182f4ce5ed3b18574a44c296132e7bad44..00c3cafbd1987767313e0faf36c84a44ac66894d 100644 (file)
@@ -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}
 };
index ef2b46a7903bbc945213ae73300eec75689ca600..ccb1d9573a954796afef62e2b25c4426b1bb3388 100644 (file)
@@ -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 */