[Openvas-commits] r1269 - in trunk/openvas-server: . doc openvasd
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Sep 1 21:58:44 CEST 2008
Author: jan
Date: 2008-09-01 21:58:43 +0200 (Mon, 01 Sep 2008)
New Revision: 1269
Modified:
trunk/openvas-server/ChangeLog
trunk/openvas-server/doc/otp_specification_10.txt
trunk/openvas-server/openvasd/comm.c
Log:
Making protocol extension "plugins_version", "plugins_cve_id",
"plugins_bugtraq_id" and "plugins_xrefs" standard.
* openvasd/comm.c (extract_extensions): Removed handling
of "plugins_version" "plugins_cve_id", "plugins_bugtraq_id"
and "plugins_xrefs" extension.
(send_plug_info): Always send NVT version, CVE ID, Bugtraq ID
and cross references.
* doc/otp_specification_10.txt: Updated to described
that protocol extension "plugins_version", "plugins_cve_id",
plugins_bugtraq_id" and "plugins_xrefs" have been made standard.
Modified: trunk/openvas-server/ChangeLog
===================================================================
--- trunk/openvas-server/ChangeLog 2008-09-01 14:47:16 UTC (rev 1268)
+++ trunk/openvas-server/ChangeLog 2008-09-01 19:58:43 UTC (rev 1269)
@@ -1,5 +1,20 @@
2008-09-01 Jan-Oliver Wagner <jan-oliver.wagner at intevation.de>
+ Making protocol extension "plugins_version", "plugins_cve_id",
+ "plugins_bugtraq_id" and "plugins_xrefs" standard.
+
+ * openvasd/comm.c (extract_extensions): Removed handling
+ of "plugins_version" "plugins_cve_id", "plugins_bugtraq_id"
+ and "plugins_xrefs" extension.
+ (send_plug_info): Always send NVT version, CVE ID, Bugtraq ID
+ and cross references.
+
+ * doc/otp_specification_10.txt: Updated to described
+ that protocol extension "plugins_version", "plugins_cve_id",
+ plugins_bugtraq_id" and "plugins_xrefs" have been made standard.
+
+2008-09-01 Jan-Oliver Wagner <jan-oliver.wagner at intevation.de>
+
Making protocol extension "dependencies" standard.
* openvasd/comm.c (extract_extensions): Removed handling
Modified: trunk/openvas-server/doc/otp_specification_10.txt
===================================================================
--- trunk/openvas-server/doc/otp_specification_10.txt 2008-09-01 14:47:16 UTC (rev 1268)
+++ trunk/openvas-server/doc/otp_specification_10.txt 2008-09-01 19:58:43 UTC (rev 1269)
@@ -72,7 +72,8 @@
Protocol extensions:
These protocol extensions have been made standard of the OTP
- protocol: "dependencies".
+ protocol: "dependencies", "plugins_version", "plugins_cve_id",
+ "plugins_bugtraq_id" and "plugins_xrefs".
GENERAL ASPECTS OF PROTOCOL
@@ -90,9 +91,6 @@
on various features. Available protocol features are:
timestamps (server will use command TIME)
- plugins_version (server will add revision to plugin information)
- plugins_cve_id (server will add cve id to plugin information)
- plugins_bugtraq_id (server will add bugtraq id to plugin information)
md5_caching (server will use the MD5 caching feature)
Syntax:
@@ -344,25 +342,8 @@
The server answers with this line (analogous to PLUGIN_LIST command):
- oid <|> name <|> category <|> copyright <|> description <|> summary <|> family
+ oid <|> name <|> category <|> copyright <|> description <|> summary <|> family <|> plugin_version <|> cve_id <|> bugtraq_id <|> xrefs
- The following extensions are appended in the given order:
-
- In case protocol feature "plugins_version" is selected, the respective
- plugin_version is appended to the line:
-
- oid <|> name <|> category <|> copyright <|> description <|> summary <|> family <|> plugin_version
-
- In case protocol feature "plugins_cve_id" is selected, the respective
- cve_id is appended to the line, e.g.:
-
- oid <|> name <|> category <|> copyright <|> description <|> summary <|> family <|> plugin_version <|> cve_id
-
- In case protocol feature "plugins_bugtraq_id" is selected, the respective
- bugtraq_id is appended to the line, e.g.:
-
- oid <|> name <|> category <|> copyright <|> description <|> summary <|> family <|> plugin_version <|> cve_id <|> bugtraq_id
-
In case no plugin with OID=oid is found, the server will not answer at all.
PLUGIN_LIST
@@ -374,17 +355,17 @@
The server will send PREFERENCES and RULES right after this command.
+ The client might request individual NVT information via PLUGIN_INFO
+ command.
+
Syntax:
SERVER <|> PLUGIN_LIST <|>
- oid <|> name <|> category <|> copyright <|> description <|> summary <|> family
- oid <|> name <|> category <|> copyright <|> description <|> summary <|> family
+ oid <|> name <|> category <|> copyright <|> description <|> summary <|> family <|> plugin_version <|> cve_id <|> bugtraq_id <|> xrefs
+ oid <|> name <|> category <|> copyright <|> description <|> summary <|> family <|> plugin_version <|> cve_id <|> bugtraq_id <|> xrefs
...
<|> SERVER
- Additional information might be apended according to some procotol features.
- Please refer to the description of the PLUGIN_INFO command for details.
-
PORT
Description:
Modified: trunk/openvas-server/openvasd/comm.c
===================================================================
--- trunk/openvas-server/openvasd/comm.c 2008-09-01 14:47:16 UTC (rev 1268)
+++ trunk/openvas-server/openvasd/comm.c 2008-09-01 19:58:43 UTC (rev 1269)
@@ -80,32 +80,13 @@
else if(!strcmp(t, "md5_by_name"))
caps->md5_by_name = 1;
-
+
+ caps->plugins_xrefs = 1;
+
/*
- * We send the plugins versions to the client
- */
- else if(!strcmp(t, "plugins_version"))
- caps->plugins_version = 1;
-
- /*
- * We send the CVE id
- */
- else if(!strcmp(t, "plugins_cve_id"))
- caps->plugins_cve_id = 1;
-
- /*
- * We send the Bugtraq ID
- */
- else if(!strcmp(t, "plugins_bugtraq_id"))
- caps->plugins_bugtraq_id = 1;
-
- else if(!strcmp(t, "plugins_xrefs"))
- caps->plugins_xrefs = 1;
-
- /*
* We send timestamps to the client
*/
- else if(!strcmp(t, "timestamps"))
+ if(!strcmp(t, "timestamps"))
caps->timestamps = 1;
/*
@@ -219,8 +200,7 @@
char * t;
const char *a, *b, *d, *e = NULL;
char * desc = NULL;
- ntp_caps * caps = arg_get_value(globals, "ntp_caps");
-
+
args = plugins->value;
if(plug_get_id(args) == 0)
plug_set_id(args, i);
@@ -234,12 +214,9 @@
j = plug_get_category(args);
if(j >= CAT_MAX || j < ACT_FIRST) j = CAT_MAX - 1;
- if(caps->plugins_version)
- {
- e = plug_get_version(args);
- if(!e)e = "?";
- }
-
+ e = plug_get_version(args);
+ if(!e)e = "?";
+
if ((a = plug_get_name(args)) == NULL ||
(b = plug_get_copyright(args)) == NULL ||
desc == NULL ||
@@ -275,38 +252,31 @@
categories[j],
b, desc, d,
plug_get_family(args));
-
- if(caps->plugins_version != 0)
- {
- strcat(str, " <|> ");
- strcat(str, e);
- }
-
- if(caps->plugins_cve_id)
+
+ strcat(str, " <|> ");
+ strcat(str, e);
+
{
- char * id = plug_get_cve_id(args);
- if(id == NULL)id = "NOCVE";
- strcat(str, " <|> ");
- strcat(str, id);
+ char * id = plug_get_cve_id(args);
+ if(id == NULL)id = "NOCVE";
+ strcat(str, " <|> ");
+ strcat(str, id);
}
-
- if(caps->plugins_bugtraq_id)
+
{
char * bid = plug_get_bugtraq_id(args);
if(bid == NULL)bid = "NOBID";
strcat(str, " <|> ");
strcat(str, bid);
}
-
- if(caps->plugins_xrefs)
+
{
char * xref = plug_get_xref(args);
if(xref == NULL)xref = "NOXREF";
strcat(str, " <|> ");
strcat(str, xref);
}
-
-
+
auth_printf(globals, "%s\n", str);
efree(&str);
}
More information about the Openvas-commits
mailing list