[Openvas-commits] r1391 - in trunk/openvas-server: . openvasd

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Sep 22 13:02:50 CEST 2008


Author: jan
Date: 2008-09-22 13:02:50 +0200 (Mon, 22 Sep 2008)
New Revision: 1391

Modified:
   trunk/openvas-server/ChangeLog
   trunk/openvas-server/openvasd/attack.c
   trunk/openvas-server/openvasd/comm.c
   trunk/openvas-server/openvasd/ntp_11.c
Log:
* openvasd/ntp_11.c (ntp_11_parse_input): Replaced call of ntp_11_prefs()
by calling ntp_11_read_prefs() for PREFERENCES command. ntp_11_prefs
does nothing relevant except calling ntp_11_read_prefs.
(ntp_11_prefs): Removed. It only handled escape_crlf which is fixed to
true for OTP.

* openvasd/attack.c (attack_network): Removed retrieval of ntp_caps as
these are not used here anyway.

* openvasd/comm.c (comm_init): Removed any consideration of ntpcaps
element "plugins_xrefs", "timestamps" and "ciphered".




Modified: trunk/openvas-server/ChangeLog
===================================================================
--- trunk/openvas-server/ChangeLog	2008-09-22 10:51:14 UTC (rev 1390)
+++ trunk/openvas-server/ChangeLog	2008-09-22 11:02:50 UTC (rev 1391)
@@ -1,7 +1,21 @@
+2008-09-22  Jan-Oliver Wagner <jan-oliver.wagner at intevation.de>
+
+	* openvasd/ntp_11.c (ntp_11_parse_input): Replaced call of ntp_11_prefs()
+	by calling ntp_11_read_prefs() for PREFERENCES command. ntp_11_prefs
+	does nothing relevant except calling ntp_11_read_prefs.
+	(ntp_11_prefs): Removed. It only handled escape_crlf which is fixed to
+	true for OTP.
+
+	* openvasd/attack.c (attack_network): Removed retrieval of ntp_caps as
+	these are not used here anyway.
+
+	* openvasd/comm.c (comm_init): Removed any consideration of ntpcaps
+	element "plugins_xrefs", "timestamps" and "ciphered".
+
 2008-09-19  Michael Wiegand <michael.wiegand at intevation.de>
 
 	* openvasd/ntp_11.c (ntp_11_prefs, ntp_11_send_prefs_errors): Removed
-	support for PREFERENCES	ERROR message type as it was never properly
+	support for PREFERENCES ERROR message type as it was never properly
 	implemented and is now obsolete.
 
 	* openvasd/comm.c (plugin_send_infos): Tidied up plugin search code,

Modified: trunk/openvas-server/openvasd/attack.c
===================================================================
--- trunk/openvas-server/openvasd/attack.c	2008-09-22 10:51:14 UTC (rev 1390)
+++ trunk/openvas-server/openvasd/attack.c	2008-09-22 11:02:50 UTC (rev 1391)
@@ -518,7 +518,6 @@
   int global_socket		= -1;
   struct arglist * preferences  = NULL;
   struct arglist * plugins      = NULL;
-  ntp_caps* caps		= NULL;
   struct openvas_rules *rules	= NULL;
   struct arglist * rejected_hosts =  NULL;
   int restoring    = 0;
@@ -543,7 +542,6 @@
   global_socket  = (int)arg_get_value(globals, "global_socket");
  
   plugins        = arg_get_value(globals, "plugins");
-  caps           = arg_get_value(globals, "ntp_caps");
   rules          = arg_get_value(globals, "rules");
   rejected_hosts = emalloc(sizeof(struct arglist));
   

Modified: trunk/openvas-server/openvasd/comm.c
===================================================================
--- trunk/openvas-server/openvasd/comm.c	2008-09-22 10:51:14 UTC (rev 1390)
+++ trunk/openvas-server/openvasd/comm.c	2008-09-22 11:02:50 UTC (rev 1391)
@@ -72,13 +72,10 @@
   buf[sizeof(buf) - 1] = '\0';
   if(!strncmp(buf, "< OTP/1.0 >", 11))
     {
-      caps->ntp_version = NTP_12;
-      caps->ciphered = FALSE;
+      caps->ntp_version = OTP_10;
       caps->ntp_11 = TRUE;
       caps->scan_ids = TRUE;
       caps->pubkey_auth = FALSE;
-      caps->plugins_xrefs = TRUE;
-      caps->timestamps = FALSE;
       nsend(soc, "< OTP/1.0 >\n", 12, 0);
     }
   /*ENABLE_CRYPTO_LAYER*/

Modified: trunk/openvas-server/openvasd/ntp_11.c
===================================================================
--- trunk/openvas-server/openvasd/ntp_11.c	2008-09-22 10:51:14 UTC (rev 1390)
+++ trunk/openvas-server/openvasd/ntp_11.c	2008-09-22 11:02:50 UTC (rev 1391)
@@ -55,9 +55,7 @@
 #endif
 
 
-static int ntp_11_prefs(struct arglist *);
 static int ntp_11_read_prefs(struct arglist *);
-static void ntp_11_send_prefs_errors(struct arglist *);
 static int ntp_11_rules(struct arglist *);
 static int ntp_11_long_attack(struct arglist *, char *);
 static int ntp_11_recv_file(struct arglist*);
@@ -126,7 +124,7 @@
       }
 
     case CREQ_PREFERENCES:
-      ntp_11_prefs(globals);
+      ntp_11_read_prefs(globals);
       break;
 
     case CREQ_RULES:
@@ -234,24 +232,7 @@
   arg_add_value(preferences, "TARGET", ARG_STRING, strlen(target), target);
  return 0;
 } 
-static int ntp_11_prefs(globals)
- struct arglist * globals;
-{
- int problem;
- ntp_caps * caps;
- struct arglist * prefs;
- char * value;
 
- problem = ntp_11_read_prefs(globals);
- caps = arg_get_value(globals, "ntp_caps");
- prefs = arg_get_value(globals, "preferences");
- value = arg_get_value(prefs, "ntp_escape_crlf");
- if(value)caps->escape_crlf = 1;
- return(problem);
-}
-
-
-
 static int 
 ntp_11_read_prefs(globals)
  struct arglist * globals;



More information about the Openvas-commits mailing list