Skip to content

Commit

Permalink
Remove --update
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmundell committed Mar 4, 2020
1 parent 1bb244f commit a369c3a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 52 deletions.
21 changes: 0 additions & 21 deletions src/gvmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1637,7 +1637,6 @@ gvmd (int argc, char** argv)
static gchar *relay_mapper = NULL;
static gboolean rebuild = FALSE;
static gchar *role = NULL;
static gboolean update = FALSE;
static gchar *disable = NULL;
static gchar *value = NULL;
GError *error = NULL;
Expand Down Expand Up @@ -1880,10 +1879,6 @@ gvmd (int argc, char** argv)
&manager_address_string_unix,
"Listen on UNIX socket at <filename>.",
"<filename>" },
{ "update", 'm', 0, G_OPTION_ARG_NONE,
&update,
"Update entire NVT db from the scanner, without removing it first.",
NULL },
{ "user", '\0', 0, G_OPTION_ARG_STRING,
&user,
"User for --new-password.",
Expand Down Expand Up @@ -2260,22 +2255,6 @@ gvmd (int argc, char** argv)
return EXIT_SUCCESS;
}

if (update)
{
int ret;

proctitle_set ("gvmd: --update");

if (option_lock (&lockfile_checking))
return EXIT_FAILURE;

ret = manage_update (log_config, database);
log_config_free ();
if (ret)
return EXIT_FAILURE;
return EXIT_SUCCESS;
}

if (create_scanner)
{
int ret;
Expand Down
3 changes: 0 additions & 3 deletions src/manage.h
Original file line number Diff line number Diff line change
Expand Up @@ -3683,9 +3683,6 @@ manage_update_nvts_osp (const gchar *);
int
manage_rebuild (GSList *, const gchar *);

int
manage_update (GSList *, const gchar *);


/* Wizards. */

Expand Down
28 changes: 0 additions & 28 deletions src/manage_sql_nvts.c
Original file line number Diff line number Diff line change
Expand Up @@ -1862,31 +1862,3 @@ manage_rebuild (GSList *log_config, const gchar *database)

return ret;
}

/**
* @brief Update NVT db.
*
* @param[in] log_config Log configuration.
* @param[in] database Location of manage database.
*
* @return 0 success, -1 error, -2 database is wrong version,
* -3 database needs to be initialised from server,
* -4 no osp update socket.
*/
int
manage_update (GSList *log_config, const gchar *database)
{
int ret;

g_info (" Updating NVTs.");

ret = manage_option_setup (log_config, database);
if (ret)
return ret;

ret = update_or_rebuild (1);

manage_option_cleanup ();

return ret;
}

0 comments on commit a369c3a

Please sign in to comment.