aboutsummaryrefslogtreecommitdiff
path: root/common/config.h.in
blob: a671414f00df36cc4837952a2074f7da6dc26516 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef COMMON_CONFIG_H_
#define COMMON_CONFIG_H_

#define CONFIG_DIR "@CMAKE_INSTALL_PREFIX@/etc/bastion/"
#define CONFIG_PATH CONFIG_DIR "bastion.conf"
#define VERSION "@PROJECT_VERSION@"
#define GIT_HASH "@GIT_HASH@"

#define MAX_HOSTNAME_LENGTH 64

#define DEFAULT_PORT 2222
#define DEFAULT_DSAKEY_PATH "@CMAKE_INSTALL_PREFIX@/etc/bastion/ssh_host_dsa_key"
#define DEFAULT_RSAKEY_PATH "@CMAKE_INSTALL_PREFIX@/etc/bastion/ssh_host_rsa_key"
#define DEFAULT_ECDSAKEY_PATH "@CMAKE_INSTALL_PREFIX@/etc/bastion/ssh_host_ecdsa_key"

#ifdef SESSION_RECORDING
#define DEFAULT_SESSION_RECORDING_PATH "@CMAKE_INSTALL_PREFIX@/var/log/bastion/$d/$h/$u/$i.gz"
#define SESSION_RECORDING_FILENAME_MAX_LEN 255
#define SESSION_RECORDING_DIRECTORY_MODE S_IRUSR | S_IWUSR | S_IXUSR
#endif

char config_load(const char *config_file);
int config_get_port(void);
const char * config_get_key_dsa(void);
const char * config_get_key_rsa(void);
const char * config_get_key_ecdsa(void);
#ifdef SESSION_RECORDING
const char * config_get_session_recording_path(void);
#endif
void config_clean(void);

#endif