Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sensor relays and OSP sensors #756

Merged
merged 19 commits into from
Sep 26, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
6c6a2ed
Add relay functionality for GMP scanners
timopollmeier Sep 19, 2019
8ff5363
Merge branch 'master' of github.com:greenbone/gvm into sensor-relays
timopollmeier Sep 19, 2019
fd8af5e
Add scanner type "OSP Sensor"
timopollmeier Sep 20, 2019
760cc0e
Merge branch 'master' of github.com:greenbone/gvm into sensor-relays
timopollmeier Sep 23, 2019
6a837e9
Make credential optional in create_scanner
timopollmeier Sep 24, 2019
0bd5d07
Improve credential handling in modify_scanner
timopollmeier Sep 24, 2019
5f65d18
Use client certificate with OSP relays as well
timopollmeier Sep 24, 2019
b03a7c0
Fix adjust doc and logging for --relay-mapper
timopollmeier Sep 24, 2019
6634522
Add CHANGELOG entry for relays and OSP sensor type
timopollmeier Sep 24, 2019
34b3a4a
Merge branch 'master' into sensor-relays
timopollmeier Sep 25, 2019
72268d0
Fix documentation of slave_get_relay
timopollmeier Sep 26, 2019
2efd8bf
Clean up declarations and inits in slave_get_relay
timopollmeier Sep 26, 2019
a268ef5
Fix warnings in osp_connect_with_data
timopollmeier Sep 26, 2019
3f9d765
Clarify --relay-mapper option documentation
timopollmeier Sep 26, 2019
6996e4a
Get system/performance reports list also via OSP
timopollmeier Sep 26, 2019
30bee72
Get performance reports from OSP
timopollmeier Sep 26, 2019
cbd3f82
Free strings in get_osp_performance_string
timopollmeier Sep 26, 2019
fa06038
Remove unused return values from functions
timopollmeier Sep 26, 2019
2486eea
Move comment in get_system_report_types OSP case
timopollmeier Sep 26, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions src/gvmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1646,6 +1646,7 @@ gvmd (int argc, char** argv)
static gchar *modify_setting = NULL;
static gchar *scanner_name = NULL;
static gchar *rc_name = NULL;
static gchar *relay_mapper = NULL;
static gchar *role = NULL;
static gchar *disable = NULL;
static gchar *value = NULL;
Expand Down Expand Up @@ -1810,6 +1811,10 @@ gvmd (int argc, char** argv)
&manager_port_string_2,
"Use port number <number> for address 2.",
"<number>" },
{ "relay-mapper", '\0', 0, G_OPTION_ARG_FILENAME,
&relay_mapper,
"Excecutable for mapping scanner hosts to relays.",
"<file>" },
{ "role", '\0', 0, G_OPTION_ARG_STRING,
&role,
"Role for --create-user and --get-users.",
Expand Down Expand Up @@ -2015,6 +2020,36 @@ gvmd (int argc, char** argv)
}
}

/* Set relay mapper */
if (relay_mapper)
{
if (strcmp (relay_mapper, ""))
{
if (g_file_test (relay_mapper, G_FILE_TEST_EXISTS) == 0)
g_warning ("Relay mapper '%s' not found.", relay_mapper);
else if (g_file_test (relay_mapper, G_FILE_TEST_IS_EXECUTABLE) == 0)
g_warning ("Relay mapper '%s' is not executable.", relay_mapper);
else
{
g_debug ("Using relay mapper '%s'.", relay_mapper);
set_relay_mapper_path (relay_mapper);
}
}
else
g_debug ("Relay mapper disabled.");
}
else
{
gchar *default_mapper = g_find_program_in_path ("gvm-relay-mapper");
if (default_mapper)
{
g_message ("Using default relay mapper '%s'.", default_mapper);
set_relay_mapper_path (default_mapper);
}
else
g_debug ("No default relay mapper found.");
}

#ifdef GVMD_GIT_REVISION
g_message (" Greenbone Vulnerability Manager version %s (GIT revision %s) (DB revision %i)",
GVMD_VERSION,
Expand Down
Loading