]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/filed/filed_conf.h
Backport from BEE
[bacula/bacula] / bacula / src / filed / filed_conf.h
1 /*
2    Bacula® - The Network Backup Solution
3
4    Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
5
6    The main author of Bacula is Kern Sibbald, with contributions from many
7    others, a complete list can be found in the file AUTHORS.
8
9    You may use this file and others of this release according to the
10    license defined in the LICENSE file, which includes the Affero General
11    Public License, v3.0 ("AGPLv3") and some additional permissions and
12    terms pursuant to its AGPLv3 Section 7.
13
14    Bacula® is a registered trademark of Kern Sibbald.
15 */
16 /*
17  * Bacula File Daemon specific configuration
18  *
19  *     Kern Sibbald, Sep MM
20  */
21
22 /*
23  * Resource codes -- they must be sequential for indexing
24  */
25 #define R_FIRST                       1001
26
27 #define R_DIRECTOR                    1001
28 #define R_CLIENT                      1002
29 #define R_MSGS                        1003
30
31 #define R_LAST                        R_MSGS
32
33 /*
34  * Some resource attributes
35  */
36 #define R_NAME                        1020
37 #define R_ADDRESS                     1021
38 #define R_PASSWORD                    1022
39 #define R_TYPE                        1023
40
41
42 /* Definition of the contents of each Resource */
43 struct DIRRES {
44    RES   hdr;
45    char *password;                    /* Director password */
46    char *address;                     /* Director address or zero */
47    bool monitor;                      /* Have only access to status and .status functions */
48    bool tls_authenticate;             /* Authenticate with TSL */
49    bool tls_enable;                   /* Enable TLS */
50    bool tls_require;                  /* Require TLS */
51    bool tls_verify_peer;              /* TLS Verify Client Certificate */
52    char *tls_ca_certfile;             /* TLS CA Certificate File */
53    char *tls_ca_certdir;              /* TLS CA Certificate Directory */
54    char *tls_certfile;                /* TLS Server Certificate File */
55    char *tls_keyfile;                 /* TLS Server Key File */
56    char *tls_dhfile;                  /* TLS Diffie-Hellman Parameters */
57    alist *tls_allowed_cns;            /* TLS Allowed Clients */
58    uint64_t max_bandwidth_per_job;    /* Bandwidth limitation (per director) */
59    TLS_CONTEXT *tls_ctx;              /* Shared TLS Context */
60    alist *disable_cmds;               /* Commands to disable */
61    bool *disabled_cmds_array;         /* Disabled commands array */
62 };
63
64 struct CLIENT {
65    RES   hdr;
66    dlist *FDaddrs;
67    dlist *FDsrc_addr;                 /* address to source connections from */
68    char *working_directory;
69    char *pid_directory;
70    char *subsys_directory;
71    char *plugin_directory;            /* Plugin directory */
72    char *scripts_directory;
73    MSGS *messages;                    /* daemon message handler */
74    uint32_t MaxConcurrentJobs;
75    utime_t SDConnectTimeout;          /* timeout in seconds */
76    utime_t heartbeat_interval;        /* Interval to send heartbeats */
77    uint32_t max_network_buffer_size;  /* max network buf size */
78    bool pki_sign;                     /* Enable Data Integrity Verification via Digital Signatures */
79    bool pki_encrypt;                  /* Enable Data Encryption */
80    char *pki_keypair_file;            /* PKI Key Pair File */
81    alist *pki_signing_key_files;      /* PKI Signing Key Files */
82    alist *pki_master_key_files;       /* PKI Master Key Files */
83    uint32_t pki_cipher;               /* PKI Cipher type */
84    uint32_t pki_digest;               /* PKI Digest type */
85    bool tls_authenticate;             /* Authenticate with TLS */
86    bool tls_enable;                   /* Enable TLS */
87    bool tls_require;                  /* Require TLS */
88    char *tls_ca_certfile;             /* TLS CA Certificate File */
89    char *tls_ca_certdir;              /* TLS CA Certificate Directory */
90    char *tls_certfile;                /* TLS Client Certificate File */
91    char *tls_keyfile;                 /* TLS Client Key File */
92
93    X509_KEYPAIR *pki_keypair;         /* Shared PKI Public/Private Keypair */
94    alist *pki_signers;                /* Shared PKI Trusted Signers */
95    alist *pki_recipients;             /* Shared PKI Recipients */
96    TLS_CONTEXT *tls_ctx;              /* Shared TLS Context */
97    char *verid;                       /* Custom Id to print in version command */
98    uint64_t max_bandwidth_per_job;    /* Bandwidth limitation (global) */
99    alist *disable_cmds;               /* Commands to disable */
100    bool *disabled_cmds_array;         /* Disabled commands array */
101 };
102
103
104
105 /* Define the Union of all the above
106  * resource structure definitions.
107  */
108 union URES {
109    DIRRES res_dir;
110    CLIENT res_client;
111    MSGS   res_msgs;
112    RES    hdr;
113 };