|
#define | G_LOG_DOMAIN "md main" |
| GLib log domain.
|
|
#define | GVMD_VERSION "-1" |
| The version number of this program.
|
|
#define | GVM_OS_NAME "-1" |
| The name of the underlying Operating System.
|
|
#define | SCANNERCERT "/var/lib/openvas/CA/servercert.pem" |
| Location of scanner certificate.
|
|
#define | SCANNERKEY "/var/lib/openvas/private/CA/serverkey.pem" |
| Location of scanner certificate private key.
|
|
#define | CACERT "/var/lib/openvas/CA/cacert.pem" |
| Location of Certificate Authority certificate.
|
|
#define | CLIENTCERT "/var/lib/openvas/CA/clientcert.pem" |
| Location of client certificate.
|
|
#define | CLIENTKEY "/var/lib/openvas/private/CA/clientkey.pem" |
| Location of client certificate private key.
|
|
#define | GVMD_PORT 9390 |
| Manager port. More...
|
|
#define | MAX_CONNECTIONS 512 |
| Second argument to ‘listen’.
|
|
#define | DEFAULT_CLIENT_WATCH_INTERVAL 1 |
| Default value for client_watch_interval.
|
|
#define | DEFAULT_BROKER_ADDRESS "localhost:1883" |
| Default broker address.
|
|
#define | BA_SIZE 100 |
| Maximum number of frames in backtrace. More...
|
|
|
static void | set_gnutls_priority (gnutls_session_t *session, const char *priority) |
| Sets the GnuTLS priorities for a given session. More...
|
|
static int | option_lock (lockfile_t *lockfile_checking) |
| Lock gvm-helping for an option. More...
|
|
static connection_watcher_data_t * | connection_watcher_data_new (gvm_connection_t *client_connection) |
| Create a new connection watcher thread data structure. More...
|
|
static void * | watch_client_connection (void *data) |
| Thread start routine watching the client connection. More...
|
|
static int | serve_client (int server_socket, gvm_connection_t *client_connection) |
| Serve the client. More...
|
|
static void | accept_and_maybe_fork (int server_socket, sigset_t *sigmask_current) |
| Accept and fork. More...
|
|
static int | fork_connection_internal (gvm_connection_t *client_connection, const gchar *uuid, int scheduler) |
| Fork a child connected to the Manager. More...
|
|
static int | fork_connection_for_scheduler (gvm_connection_t *client_connection, const gchar *uuid) |
| Fork a child connected to the Manager. More...
|
|
static int | fork_connection_for_event (gvm_connection_t *client_connection, const gchar *uuid) |
| Fork a child connected to the Manager. More...
|
|
static void | log_config_free () |
| Free logging configuration.
|
|
static void | cleanup () |
| Clean up for exit. More...
|
|
static void | handle_sigabrt (int given_signal) |
| Handle a SIGABRT signal. More...
|
|
static void | handle_termination_signal (int signal) |
| Handle a termination signal. More...
|
|
static void | handle_sigsegv (int given_signal) |
| Handle a SIGSEGV signal. More...
|
|
static void | handle_sigchld (int given_signal, siginfo_t *info, void *ucontext) |
| Handle a SIGCHLD signal. More...
|
|
static void | handle_sigabrt_simple (int signal) |
| Handle a SIGABRT signal. More...
|
|
static int | update_nvt_cache_osp (const gchar *update_socket) |
| Update the NVT Cache using OSP. More...
|
|
static int | update_nvt_cache_retry () |
| Update NVT cache in forked child, retrying if scanner loading. More...
|
|
static int | fork_update_nvt_cache () |
| Update the NVT cache in a child process. More...
|
|
static int | fork_feed_sync () |
| Forks a process to sync the feed. More...
|
|
static void | serve_and_schedule () |
| Serve incoming connections, scheduling periodically. More...
|
|
static int | manager_listen (const char *address_str_unix, const char *address_str_tls, const char *port_str, const char *socket_owner, const char *socket_group, const char *socket_mode, int *soc) |
| Set a socket to listen for connections. More...
|
|
static gboolean | parse_authentication_goption_arg (const gchar *opt, const gchar *arg, gpointer data, GError **err) |
| parse_authentication_goption_arg is used to parse authentication parameter. More...
|
|
int | gvmd (int argc, char **argv, char *env[]) |
| Entry point to the manager. More...
|
|
|
static int | client_watch_interval = DEFAULT_CLIENT_WATCH_INTERVAL |
| Interval in seconds to check whether client connection was closed.
|
|
static int | manager_socket = -1 |
| The socket accepting GMP connections from clients.
|
|
static int | manager_socket_2 = -1 |
| The optional, second socket accepting GMP connections from clients.
|
|
static int | use_tls = 0 |
| Whether to use TLS for client connections.
|
|
static gnutls_session_t | client_session |
| The client session.
|
|
static gnutls_certificate_credentials_t | client_credentials |
| The client credentials.
|
|
static db_conn_info_t | database = { NULL, NULL, NULL, NULL } |
| Database connection info.
|
|
static int | is_parent = 1 |
| Is this process parent or child?
|
|
volatile int | termination_signal = 0 |
| Flag for signal handlers.
|
|
static gchar ** | disabled_commands = NULL |
| The address of the Scanner.
|
|
gboolean | disable_encrypted_credentials |
| Flag indicating that encrypted credentials are disabled. More...
|
|
static gboolean | scheduling_enabled |
| Flag indicating that task scheduling is enabled.
|
|
char | client_address [INET6_ADDRSTRLEN] |
| The GMP client's address.
|
|
static sigset_t * | sigmask_normal = NULL |
| Signal mask to restore when going from blocked to normal signaling.
|
|
static gchar * | priorities_option = "NORMAL" |
| GnuTLS priorities.
|
|
static gchar * | dh_params_option = NULL |
| GnuTLS DH params file.
|
|
static int | update_in_progress = 0 |
| Whether an NVT update is in progress.
|
|
static int | feed_version_check_in_progress = 0 |
| Whether a feed version check is in progress.
|
|
GSList * | log_config = NULL |
| Logging parameters, as passed to setup_log_handlers.
|
|
The Greenbone Vulnerability Manager daemon.
This file defines the Greenbone Vulnerability Manager daemon. The Manager serves the Greenbone Management Protocol (GMP) to clients such as Greenbone Security Assistant (the web interface). The Manager and GMP give clients full access to an OpenVAS Scanner.
The entry point to the daemon is the main function. From there the references in the function documentation describe the flow of control in the program.
static void serve_and_schedule |
( |
| ) |
|
|
static |
Serve incoming connections, scheduling periodically.
Enter an infinite loop, waiting for connections and passing the work to ‘accept_and_maybe_fork’.
Periodically, call the manage scheduler to start and stop scheduled tasks.