]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Add CustomerId Director::Director directive
authorEric Bollengier <eric@baculasystems.com>
Thu, 7 Oct 2021 16:26:47 +0000 (18:26 +0200)
committerEric Bollengier <eric@baculasystems.com>
Wed, 6 Sep 2023 07:49:01 +0000 (09:49 +0200)
bacula/src/dird/dird_conf.c
bacula/src/dird/dird_conf.h

index ae706f1a7efcc383ea244a9bb88192a94606250f..471be550616c4a01a9756b83b2018813052d0704 100644 (file)
@@ -402,7 +402,8 @@ static RES_ITEM dir_items[] = {
    {"TlsDhFile",            store_dir,       ITEM(res_dir.tls_dhfile), 0, 0, 0},
    {"TlsAllowedCn",         store_alist_str, ITEM(res_dir.tls_allowed_cns), 0, 0, 0},
    {"StatisticsRetention",  store_time,      ITEM(res_dir.stats_retention),  0, ITEM_DEFAULT, 60*60*24*31*12*5},
-   {"VerId",                store_str,       ITEM(res_dir.verid), 0, 0, 0},
+   {"VerId",           store_str,       ITEM(res_dir.verid), 0, 0, 0},
+   {"CustomerId",           store_str,       ITEM(res_dir.customerid), 0, 0, 0},
    {"CommCompression",      store_bool,      ITEM(res_dir.comm_compression), 0, ITEM_DEFAULT, true},
    {NULL, NULL, {0}, 0, 0, 0}
 };
@@ -1636,6 +1637,9 @@ void free_resource(RES *rres, int type)
       if (res->res_dir.verid) {
          free(res->res_dir.verid);
       }
+      if (res->res_dir.customerid) {
+         free(res->res_dir.customerid);
+      }
       break;
    case R_DEVICE:
    case R_COUNTER:
index cfce7e9e45b1c550ad142607b96fc801d2f15e62..526d010aff536a2ebe315b5d9e08c36d53e44a85 100644 (file)
@@ -129,6 +129,7 @@ public:
    bool tls_require;                  /* Require TLS */
    bool tls_verify_peer;              /* TLS Verify Client Certificate */
    char *verid;                       /* Custom Id to print in version command */
+   char *customerid;                  /* Custom CustomerID */
    /* Methods */
    char *name() const;
 };