]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/filed/filed_conf.h
Use Bacula in place of Libz variables so we can build with/without libz and lzo
[bacula/bacula] / bacula / src / filed / filed_conf.h
1 /*
2    Bacula(R) - The Network Backup Solution
3
4    Copyright (C) 2000-2016 Kern Sibbald
5
6    The original author of Bacula is Kern Sibbald, with contributions
7    from many 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    This notice must be preserved when any source code is 
15    conveyed and/or propagated.
16
17    Bacula(R) is a registered trademark of Kern Sibbald.
18 */
19 /*
20  * Bacula File Daemon specific configuration
21  *
22  *     Kern Sibbald, Sep MM
23  */
24
25 /*
26  * Resource codes -- they must be sequential for indexing
27  */
28 #define R_FIRST                       1001
29
30 #define R_DIRECTOR                    1001
31 #define R_CLIENT                      1002
32 #define R_MSGS                        1003
33 #define R_CONSOLE                     1004
34
35 #define R_LAST                        R_CONSOLE
36
37 /*
38  * Some resource attributes
39  */
40 #define R_NAME                        1020
41 #define R_ADDRESS                     1021
42 #define R_PASSWORD                    1022
43 #define R_TYPE                        1023
44
45
46 /* Definition of the contents of each Resource */
47 struct CONSRES {
48    RES   hdr;
49    char *password;                    /* Director password */
50    char *address;                     /* Director address or zero */
51    int   heartbeat_interval;
52    int   comm_compression;
53    int32_t DIRport;
54    bool tls_authenticate;             /* Authenticate with TSL */
55    bool tls_enable;                   /* Enable TLS */
56    bool tls_require;                  /* Require TLS */
57    bool tls_verify_peer;              /* TLS Verify Client Certificate */
58    char *tls_ca_certfile;             /* TLS CA Certificate File */
59    char *tls_ca_certdir;              /* TLS CA Certificate Directory */
60    char *tls_certfile;                /* TLS Server Certificate File */
61    char *tls_keyfile;                 /* TLS Server Key File */
62    char *tls_dhfile;                  /* TLS Diffie-Hellman Parameters */
63    alist *tls_allowed_cns;            /* TLS Allowed Clients */
64    TLS_CONTEXT *tls_ctx;              /* Shared TLS Context */
65 };
66
67 /* Definition of the contents of each Resource */
68 struct DIRRES {
69    RES   hdr;
70    char *password;                    /* Director password */
71    char *address;                     /* Director address or zero */
72    bool monitor;                      /* Have only access to status and .status functions */
73    bool remote;                       /* Remote console, can run and control jobs */
74    bool tls_authenticate;             /* Authenticate with TSL */
75    bool tls_enable;                   /* Enable TLS */
76    bool tls_require;                  /* Require TLS */
77    bool tls_verify_peer;              /* TLS Verify Client Certificate */
78    char *tls_ca_certfile;             /* TLS CA Certificate File */
79    char *tls_ca_certdir;              /* TLS CA Certificate Directory */
80    char *tls_certfile;                /* TLS Server Certificate File */
81    char *tls_keyfile;                 /* TLS Server Key File */
82    char *tls_dhfile;                  /* TLS Diffie-Hellman Parameters */
83    alist *tls_allowed_cns;            /* TLS Allowed Clients */
84    uint64_t max_bandwidth_per_job;    /* Bandwidth limitation (per director) */
85    TLS_CONTEXT *tls_ctx;              /* Shared TLS Context */
86    alist *disable_cmds;               /* Commands to disable */
87    bool *disabled_cmds_array;         /* Disabled commands array */
88    CONSRES *console;
89 };
90
91 struct CLIENT {
92    RES   hdr;
93    dlist *FDaddrs;
94    dlist *FDsrc_addr;                 /* address to source connections from */
95    char *working_directory;
96    char *pid_directory;
97    char *subsys_directory;
98    char *plugin_directory;            /* Plugin directory */
99    char *scripts_directory;
100    char *snapshot_command;
101    MSGS *messages;                    /* daemon message handler */
102    uint32_t MaxConcurrentJobs;
103    utime_t SDConnectTimeout;          /* timeout in seconds */
104    utime_t heartbeat_interval;        /* Interval to send heartbeats */
105    uint32_t max_network_buffer_size;  /* max network buf size */
106    bool comm_compression;             /* Enable comm line compression */
107    bool pki_sign;                     /* Enable Data Integrity Verification via Digital Signatures */
108    bool pki_encrypt;                  /* Enable Data Encryption */
109    char *pki_keypair_file;            /* PKI Key Pair File */
110    alist *pki_signing_key_files;      /* PKI Signing Key Files */
111    alist *pki_master_key_files;       /* PKI Master Key Files */
112    uint32_t pki_cipher;               /* PKI Cipher type */
113    uint32_t pki_digest;               /* PKI Digest type */
114    bool tls_authenticate;             /* Authenticate with TLS */
115    bool tls_enable;                   /* Enable TLS */
116    bool tls_require;                  /* Require TLS */
117    char *tls_ca_certfile;             /* TLS CA Certificate File */
118    char *tls_ca_certdir;              /* TLS CA Certificate Directory */
119    char *tls_certfile;                /* TLS Client Certificate File */
120    char *tls_keyfile;                 /* TLS Client Key File */
121
122    X509_KEYPAIR *pki_keypair;         /* Shared PKI Public/Private Keypair */
123    alist *pki_signers;                /* Shared PKI Trusted Signers */
124    alist *pki_recipients;             /* Shared PKI Recipients */
125    TLS_CONTEXT *tls_ctx;              /* Shared TLS Context */
126    char *verid;                       /* Custom Id to print in version command */
127    uint64_t max_bandwidth_per_job;    /* Bandwidth limitation (global) */
128    alist *disable_cmds;               /* Commands to disable */
129    bool *disabled_cmds_array;         /* Disabled commands array */
130 };
131
132
133
134 /* Define the Union of all the above
135  * resource structure definitions.
136  */
137 union URES {
138    DIRRES res_dir;
139    CLIENT res_client;
140    MSGS   res_msgs;
141    CONSRES res_cons;
142    RES    hdr;
143 };