Go to the source code of this file.
Functions | |
| static void | handle_signal (int) |
| static std::unordered_map< std::string, std::string > | parse_args (int argc, char *argv[]) |
| static std::string | clean_domain (std::string d) |
| static void | load_list_file (const std::string &path, std::vector< std::string > &out) |
| static void | ensure_trusted_loaded () |
| static bool | is_trusted_domain (const std::string &host) |
| static void | ensure_log_file (const std::string &log_dir, const std::string &log_file, const char *user_name="BastionGuard", mode_t file_mode=0640) |
| static bool | can_bind_privileged_ports () |
| int | main (int argc, char *argv[]) |
Variables | |
| static bool | running = true |
| static std::unordered_set< std::string > | g_trusted |
| static bool | g_trusted_loaded = false |
|
static |
Definition at line 176 of file BastionGuard-daemon.cpp.
References can_bind_privileged_ports(), bg_process::Result::ok(), and bg_process::run().
Referenced by can_bind_privileged_ports(), and main().
|
static |
Definition at line 70 of file BastionGuard-daemon.cpp.
References clean_domain().
Referenced by clean_domain(), clean_domain(), clean_domain(), host_from_url(), is_payment_domain(), is_trusted_domain(), is_trusted_domain(), is_trusted_domain(), load_list_file(), load_list_file(), load_list_file(), and main().
|
static |
Definition at line 131 of file BastionGuard-daemon.cpp.
References _, and ensure_log_file().
Referenced by ensure_log_file(), and main().
|
static |
Definition at line 105 of file BastionGuard-daemon.cpp.
References _, ensure_trusted_loaded(), g_trusted, g_trusted_loaded, and load_list_file().
Referenced by ensure_trusted_loaded(), ensure_trusted_loaded(), is_trusted_domain(), is_trusted_domain(), and main().
|
static |
|
static |
Definition at line 116 of file BastionGuard-daemon.cpp.
References clean_domain(), ensure_trusted_loaded(), g_trusted, and is_trusted_domain().
Referenced by is_trusted_domain(), is_trusted_domain(), is_trusted_domain(), and main().
|
static |
Definition at line 79 of file BastionGuard-daemon.cpp.
References clean_domain(), and load_list_file().
Referenced by ensure_trusted_loaded(), ensure_trusted_loaded(), is_payment_domain(), is_trusted_domain(), load_list_file(), load_list_file(), and load_list_file().
| int main | ( | int | argc, |
| char * | argv[] ) |
Definition at line 183 of file BastionGuard-daemon.cpp.
References _, can_bind_privileged_ports(), clean_domain(), ensure_log_file(), ensure_trusted_loaded(), handle_signal(), is_trusted_domain(), main(), parse_args(), and running.
|
static |
Definition at line 50 of file BastionGuard-daemon.cpp.
References parse_args().
|
static |
Definition at line 67 of file BastionGuard-daemon.cpp.
Referenced by ensure_trusted_loaded(), ensure_trusted_loaded(), is_trusted_domain(), and is_trusted_domain().
|
static |
Definition at line 68 of file BastionGuard-daemon.cpp.
Referenced by ensure_trusted_loaded(), and ensure_trusted_loaded().
|
static |
Definition at line 47 of file BastionGuard-daemon.cpp.