"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/gvmd.c" between
gvmd-21.4.2.tar.gz and gvmd-21.4.3.tar.gz

About: OpenVAS Greenbone Vulnerability Manager is a layer between OpenVAS-Scanner and various client applications such as OpenVAS-Client or Greenbone Security Assistant. Among other features, it adds server-side storage of scan results and it makes it unnecessary for scan clients to keep connection until a scan finishes.

gvmd.c  (gvmd-21.4.2):gvmd.c  (gvmd-21.4.3)
skipping to change at line 1739 skipping to change at line 1739
gvmd (int argc, char** argv) gvmd (int argc, char** argv)
{ {
/* Process options. */ /* Process options. */
static gboolean check_alerts = FALSE; static gboolean check_alerts = FALSE;
static gboolean migrate_database = FALSE; static gboolean migrate_database = FALSE;
static gboolean encrypt_all_credentials = FALSE; static gboolean encrypt_all_credentials = FALSE;
static gboolean decrypt_all_credentials = FALSE; static gboolean decrypt_all_credentials = FALSE;
static gboolean disable_password_policy = FALSE; static gboolean disable_password_policy = FALSE;
static gboolean disable_scheduling = FALSE; static gboolean disable_scheduling = FALSE;
static gboolean dump_vt_verification = FALSE;
static gboolean get_roles = FALSE; static gboolean get_roles = FALSE;
static gboolean get_users = FALSE; static gboolean get_users = FALSE;
static gboolean get_scanners = FALSE; static gboolean get_scanners = FALSE;
static gboolean foreground = FALSE; static gboolean foreground = FALSE;
static gboolean print_version = FALSE; static gboolean print_version = FALSE;
static int max_ips_per_target = MANAGE_MAX_HOSTS; static int max_ips_per_target = MANAGE_MAX_HOSTS;
static int max_email_attachment_size = 0; static int max_email_attachment_size = 0;
static int max_email_include_size = 0; static int max_email_include_size = 0;
static int max_email_message_size = 0; static int max_email_message_size = 0;
static int verbose = 0; static int verbose = 0;
skipping to change at line 1793 skipping to change at line 1794
static gchar *scanner_name = NULL; static gchar *scanner_name = NULL;
static gchar *rc_name = NULL; static gchar *rc_name = NULL;
static gchar *relay_mapper = NULL; static gchar *relay_mapper = NULL;
static gboolean rebuild = FALSE; static gboolean rebuild = FALSE;
static gboolean rebuild_scap = FALSE; static gboolean rebuild_scap = FALSE;
static gchar *role = NULL; static gchar *role = NULL;
static gchar *disable = NULL; static gchar *disable = NULL;
static gchar *value = NULL; static gchar *value = NULL;
static gchar *feed_lock_path = NULL; static gchar *feed_lock_path = NULL;
static int feed_lock_timeout = 0; static int feed_lock_timeout = 0;
static gchar *vt_verification_collation = NULL;
GError *error = NULL; GError *error = NULL;
lockfile_t lockfile_checking, lockfile_serving; lockfile_t lockfile_checking, lockfile_serving;
GOptionContext *option_context; GOptionContext *option_context;
static GOptionEntry option_entries[] static GOptionEntry option_entries[]
= { = {
{ "check-alerts", '\0', 0, G_OPTION_ARG_NONE, { "check-alerts", '\0', 0, G_OPTION_ARG_NONE,
&check_alerts, &check_alerts,
"Check SecInfo alerts.", "Check SecInfo alerts.",
NULL }, NULL },
{ "client-watch-interval", '\0', 0, G_OPTION_ARG_INT, { "client-watch-interval", '\0', 0, G_OPTION_ARG_INT,
skipping to change at line 1865 skipping to change at line 1868
"Do not encrypt or decrypt credentials.", "Do not encrypt or decrypt credentials.",
NULL }, NULL },
{ "disable-password-policy", '\0', 0, G_OPTION_ARG_NONE, { "disable-password-policy", '\0', 0, G_OPTION_ARG_NONE,
&disable_password_policy, &disable_password_policy,
"Do not restrict passwords to the policy.", "Do not restrict passwords to the policy.",
NULL }, NULL },
{ "disable-scheduling", '\0', 0, G_OPTION_ARG_NONE, { "disable-scheduling", '\0', 0, G_OPTION_ARG_NONE,
&disable_scheduling, &disable_scheduling,
"Disable task scheduling.", "Disable task scheduling.",
NULL }, NULL },
{ "dump-vt-verification", '\0', 0, G_OPTION_ARG_NONE,
&dump_vt_verification,
"Dump the string the VTs verification hash is calculated from.",
NULL },
{ "encrypt-all-credentials", '\0', 0, G_OPTION_ARG_NONE, { "encrypt-all-credentials", '\0', 0, G_OPTION_ARG_NONE,
&encrypt_all_credentials, &encrypt_all_credentials,
"(Re-)Encrypt all credentials.", "(Re-)Encrypt all credentials.",
NULL }, NULL },
{ "feed-lock-path", '\0', 0, G_OPTION_ARG_FILENAME, { "feed-lock-path", '\0', 0, G_OPTION_ARG_FILENAME,
&feed_lock_path, &feed_lock_path,
"Sets the path to the feed lock file.", "Sets the path to the feed lock file.",
"<path>" }, "<path>" },
{ "feed-lock-timeout", '\0', 0, G_OPTION_ARG_INT, { "feed-lock-timeout", '\0', 0, G_OPTION_ARG_INT,
&feed_lock_timeout, &feed_lock_timeout,
skipping to change at line 1962 skipping to change at line 1969
{ "modify-setting", '\0', 0, G_OPTION_ARG_STRING, { "modify-setting", '\0', 0, G_OPTION_ARG_STRING,
&modify_setting, &modify_setting,
"Modify setting <uuid> and exit.", "Modify setting <uuid> and exit.",
"<uuid>" }, "<uuid>" },
{ "new-password", '\0', 0, G_OPTION_ARG_STRING, { "new-password", '\0', 0, G_OPTION_ARG_STRING,
&new_password, &new_password,
"Modify user's password and exit.", "Modify user's password and exit.",
"<password>" }, "<password>" },
{ "optimize", '\0', 0, G_OPTION_ARG_STRING, { "optimize", '\0', 0, G_OPTION_ARG_STRING,
&optimize, &optimize,
"Run an optimization: vacuum, analyze, cleanup-config-prefs," "Run an optimization: vacuum, analyze, add-feed-permissions,"
" cleanup-config-prefs, cleanup-feed-permissions,"
" cleanup-port-names, cleanup-report-formats, cleanup-result-encoding, " " cleanup-port-names, cleanup-report-formats, cleanup-result-encoding, "
" cleanup-result-nvts, cleanup-result-severities," " cleanup-result-nvts, cleanup-result-severities,"
" cleanup-schedule-times, migrate-relay-sensors," " cleanup-schedule-times, migrate-relay-sensors,"
" rebuild-report-cache or update-report-cache.", " rebuild-report-cache or update-report-cache.",
"<name>" }, "<name>" },
{ "osp-vt-update", '\0', 0, G_OPTION_ARG_STRING, { "osp-vt-update", '\0', 0, G_OPTION_ARG_STRING,
&osp_vt_update, &osp_vt_update,
"Unix socket for OSP NVT update. Defaults to the path of the" "Unix socket for OSP NVT update. Defaults to the path of the"
"'OpenVAS Default' scanner if it is an absolute path.", "'OpenVAS Default' scanner if it is an absolute path.",
"<scanner-socket>" }, "<scanner-socket>" },
skipping to change at line 2091 skipping to change at line 2099
"Use <pepper> to statically enhance salt of password hashes (maximal 4 character).", "Use <pepper> to statically enhance salt of password hashes (maximal 4 character).",
"<pepper>" }, "<pepper>" },
{ "hashcount", '\0', 0, G_OPTION_ARG_CALLBACK, { "hashcount", '\0', 0, G_OPTION_ARG_CALLBACK,
parse_authentication_goption_arg, parse_authentication_goption_arg,
"Use <hashcount> to enhance the computational cost of creating a passw ord hash.", "Use <hashcount> to enhance the computational cost of creating a passw ord hash.",
"<hashcount>" }, "<hashcount>" },
{ "version", '\0', 0, G_OPTION_ARG_NONE, { "version", '\0', 0, G_OPTION_ARG_NONE,
&print_version, &print_version,
"Print version and exit.", "Print version and exit.",
NULL }, NULL },
{ "vt-verification-collation", '\0', 0, G_OPTION_ARG_STRING,
&vt_verification_collation,
"Set collation for VT verification to <collation>, omit or leave"
" empty to choose automatically. Should be 'ucs_default' if DB uses"
" UTF-8 or 'C' for single-byte encodings.",
"<collation>" },
{ NULL } { NULL }
}; };
/* Set locale based on environment variables. */ /* Set locale based on environment variables. */
setlocale (LC_ALL, "C.UTF-8"); setlocale (LC_ALL, "C.UTF-8");
/* Process options. */ /* Process options. */
option_context = g_option_context_new ("- Manager of the Open Vulnerability As sessment System"); option_context = g_option_context_new ("- Manager of the Open Vulnerability As sessment System");
skipping to change at line 2150 skipping to change at line 2164
set_schedule_timeout (schedule_timeout); set_schedule_timeout (schedule_timeout);
/* Set the connection auto retry */ /* Set the connection auto retry */
set_scanner_connection_retry (scanner_connection_retry); set_scanner_connection_retry (scanner_connection_retry);
/* Set SecInfo update commit size */ /* Set SecInfo update commit size */
set_secinfo_commit_size (secinfo_commit_size); set_secinfo_commit_size (secinfo_commit_size);
/* Set VT verification collation override */
set_vt_verification_collation (vt_verification_collation);
/* Check which type of socket to use. */ /* Check which type of socket to use. */
if (manager_address_string_unix == NULL) if (manager_address_string_unix == NULL)
{ {
if (manager_address_string || manager_address_string_2) if (manager_address_string || manager_address_string_2)
use_tls = 1; use_tls = 1;
else else
{ {
use_tls = 0; use_tls = 0;
manager_address_string_unix = g_build_filename (GVM_RUN_DIR, manager_address_string_unix = g_build_filename (GVM_RUN_DIR,
skipping to change at line 2491 skipping to change at line 2508
ret = manage_rebuild_scap (log_config, &database); ret = manage_rebuild_scap (log_config, &database);
log_config_free (); log_config_free ();
if (ret) if (ret)
{ {
printf ("Failed to rebuild SCAP data.\n"); printf ("Failed to rebuild SCAP data.\n");
return EXIT_FAILURE; return EXIT_FAILURE;
} }
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
if (dump_vt_verification)
{
int ret;
proctitle_set ("gvmd: --dump-vt-verification");
if (option_lock (&lockfile_checking))
return EXIT_FAILURE;
ret = manage_dump_vt_verification (log_config, &database);
log_config_free ();
if (ret)
{
printf ("Failed to dump VT verification data.\n");
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
if (create_scanner) if (create_scanner)
{ {
int ret; int ret;
scanner_type_t type; scanner_type_t type;
char *stype; char *stype;
/* Create the scanner and then exit. */ /* Create the scanner and then exit. */
proctitle_set ("gvmd: Creating scanner"); proctitle_set ("gvmd: Creating scanner");
 End of changes. 7 change blocks. 
1 lines changed or deleted 37 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)