]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/filed/filed_conf.c
Fix bug #1246 Sometimes access denied with VSS enabled. UCS
[bacula/bacula] / bacula / src / filed / filed_conf.c
index 4641e9d6a4e9632320f53cdf07ecc96a416c1a39..7a07998759466e5eb694008e17a954b440e1ee91 100644 (file)
@@ -20,7 +20,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Bacula® is a registered trademark of John Walker.
+   Bacula® is a registered trademark of Kern Sibbald.
    The licensor of Bacula is the Free Software Foundation Europe
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
@@ -56,8 +56,8 @@
  * types. Note, these should be unique for each
  * daemon though not a requirement.
  */
-int r_first = R_FIRST;
-int r_last  = R_LAST;
+int32_t r_first = R_FIRST;
+int32_t r_last  = R_LAST;
 static RES *sres_head[R_LAST - R_FIRST + 1];
 RES **res_head = sres_head;
 
@@ -72,12 +72,12 @@ RES **res_head = sres_head;
  */
 #if defined(_MSC_VER)
 extern "C" { // work around visual compiler mangling variables
-    URES res_all;
+   URES res_all;
 }
 #else
 URES res_all;
 #endif
-int  res_all_size = sizeof(res_all);
+int32_t res_all_size = sizeof(res_all);
 
 /* Definition of records permitted within each
  * resource with the routine to process the record
@@ -116,6 +116,7 @@ static RES_ITEM cli_items[] = {
    {"tlscacertificatedir",   store_dir,       ITEM(res_client.tls_ca_certdir), 0, 0, 0},
    {"tlscertificate",        store_dir,       ITEM(res_client.tls_certfile), 0, 0, 0},
    {"tlskey",                store_dir,       ITEM(res_client.tls_keyfile), 0, 0, 0},
+   {"verid",                 store_str,       ITEM(res_client.verid), 0, 0, 0},
    {NULL, NULL, {0}, 0, 0, 0}
 };
 
@@ -312,6 +313,9 @@ void free_resource(RES *sres, int type)
       if (res->res_client.tls_keyfile) {
          free(res->res_client.tls_keyfile);
       }
+      if (res->res_client.verid) {
+         free(res->res_client.verid);
+      }
       break;
    case R_MSGS:
       if (res->res_msgs.mail_cmd)
@@ -445,3 +449,10 @@ void save_resource(int type, RES_ITEM *items, int pass)
       }
    }
 }
+
+bool parse_fd_config(CONFIG *config, const char *configfile, int exit_code)
+{
+   config->init(configfile, NULL, exit_code, (void *)&res_all, res_all_size,
+      r_first, r_last, resources, res_head);
+   return config->parse_config();
+}