-
Notifications
You must be signed in to change notification settings - Fork 155
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
Handle addition of ID to NVT preferences. #413
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep in mind that the following two files are using preferences of ping_host.nasl as well:
Those ids where not added to the ping_host.nasl file yet.
@@ -2139,7 +2127,7 @@ send_alive_test_preferences (target_t target) | |||
if (alive_test == ALIVE_TEST_CONSIDER_ALIVE) | |||
{ | |||
/* Also select a method, otherwise Ping Host logs a warning. */ | |||
if (sendf_to_server (OID_PING_HOST ":checkbox:Do a TCP ping <|> yes\n")) | |||
if (sendf_to_server (OID_PING_HOST ":1:checkbox:Do a TCP ping <|> yes\n")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ids where added to ping_host.nasl today.
@@ -5393,7 +5382,7 @@ run_otp_task (task_t task, scanner_t scanner, int from, char **report_id) | |||
(gpointer) g_strdup (credential_iterator_private_key | |||
(&credentials))); | |||
|
|||
if (sendf_to_server (OID_SSH_AUTH ":file:SSH private key:" | |||
if (sendf_to_server (OID_SSH_AUTH ":4:file:SSH private key:" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ids where added to ssh_authorization_init.nasl today.
user ? user : "") | ||
|| sendf_to_server (OID_SMB_AUTH ":password:SMB password:" | ||
|| sendf_to_server (OID_SMB_AUTH ":2:password:SMB password:" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ids where added to smb_authorization.nasl today.
" <|> %s\n", | ||
user ? user : "") | ||
|| sendf_to_server (OID_ESXI_AUTH ":password:ESXi login password:" | ||
|| sendf_to_server (OID_ESXI_AUTH ":2:password:ESXi login password:" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ids where added to gb_esxi_authorization.nasl today.
"SNMPv3 Privacy Password:" | ||
" <|> %s\n", | ||
privacy_password ? privacy_password : "") | ||
|| sendf_to_server (OID_SNMP_AUTH ":radio:" | ||
|| sendf_to_server (OID_SNMP_AUTH ":6:radio:" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ids where added to gb_snmp_authorization.nasl today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm keen to get this in but would like to see the GMP doc updated with the ID, and also a check of why the OID_PING_HOST preference was removed.
Also remove duplicate sending of "Do a TCP ping" preference.
Add the missing preference ID if found, so that the config preferences don't get deleted.
Fixed all issues. Also added to the PR a routine to update old-style preferences in config_preferences. |
" <|> %s\n", | ||
((alive_test & ALIVE_TEST_TCP_SYN_SERVICE) | ||
&& (alive_test & ALIVE_TEST_TCP_ACK_SERVICE)) | ||
? "yes" | ||
: "no")) | ||
return -1; | ||
|
||
if (sendf_to_server (OID_PING_HOST ":checkbox:TCP ping tries only TCP-SYN ping" | ||
if (sendf_to_server (OID_PING_HOST ":7:checkbox:TCP ping tries only TCP-SYN ping" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The id:7 for this preference was added to ping_host.nasl today.
uuid) | ||
== 0) | ||
{ | ||
sql ("INSERT INTO config_preferences (config, type, name, value)" | ||
" VALUES ((SELECT id FROM configs WHERE uuid = '%s')," | ||
" 'PLUGINS_PREFS'," | ||
" '" OID_GLOBAL_SETTINGS ":checkbox:Strictly unauthenticated'," | ||
" '" OID_GLOBAL_SETTINGS ":1:checkbox:Strictly unauthenticated'," |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The id:1 for this preference was added to global_settings.nasl today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's great, just one ID case missing in the docs. Can confirm updating old prefs works for me.
No description provided.