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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Sep 1 00:04:36 CEST 2008


Author: jan
Date: 2008-09-01 00:04:34 +0200 (Mon, 01 Sep 2008)
New Revision: 1254

Modified:
   trunk/openvas-server/ChangeLog
   trunk/openvas-server/openvasd/ntp_11.c
   trunk/openvas-server/openvasd/otp_1_0.c
   trunk/openvas-server/openvasd/otp_1_0.h
Log:
Remove NEW_ATTACK command.

* openvasd/ntp_11.c (ntp_11_new_attack): Removed.

* openvasd/otp_1_0.c (otp_1_0_get_client_request): Removed
NEW_ATTACK handling.

* openvasd/otp_1_0.h: Removed CREQ_NEW_ATTACK.



Modified: trunk/openvas-server/ChangeLog
===================================================================
--- trunk/openvas-server/ChangeLog	2008-08-31 21:43:10 UTC (rev 1253)
+++ trunk/openvas-server/ChangeLog	2008-08-31 22:04:34 UTC (rev 1254)
@@ -1,5 +1,16 @@
 2008-08-31  Jan-Oliver Wagner <jan-oliver.wagner at intevation.de>
 
+	Remove NEW_ATTACK command.
+
+	* openvasd/ntp_11.c (ntp_11_new_attack): Removed.
+
+	* openvasd/otp_1_0.c (otp_1_0_get_client_request): Removed
+	NEW_ATTACK handling.
+
+	* openvasd/otp_1_0.h: Removed CREQ_NEW_ATTACK.
+
+2008-08-31  Jan-Oliver Wagner <jan-oliver.wagner at intevation.de>
+
 	* openvasd/otp_1_0.c (otp_1_0_get_client_request): New method.
 
 	* openvasd/otp_1_0.h: Added proto for

Modified: trunk/openvas-server/openvasd/ntp_11.c
===================================================================
--- trunk/openvas-server/openvasd/ntp_11.c	2008-08-31 21:43:10 UTC (rev 1253)
+++ trunk/openvas-server/openvasd/ntp_11.c	2008-08-31 22:04:34 UTC (rev 1254)
@@ -59,7 +59,6 @@
 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_new_attack(struct arglist *, char *);
 static int ntp_11_long_attack(struct arglist *, char *);
 static int ntp_11_recv_file(struct arglist*);
 
@@ -110,10 +109,6 @@
       result = ntp_11_long_attack(globals, orig);
       break;
 
-    case CREQ_NEW_ATTACK:
-      result = ntp_11_new_attack(globals, orig);
-      break;
-
     case CREQ_OPENVAS_VERSION:
       otp_1_0_server_openvas_version(globals);
       break;
@@ -397,50 +392,6 @@
  return(0);
 }
 
-
-
-static int ntp_11_new_attack(globals, input)
-        struct arglist * globals;
-	char * input;
-	
-{
- char * target = emalloc(strlen(input)+1);
- char * clean_target;
- char * plugin_set;
- struct arglist * preferences = arg_get_value(globals, "preferences");
- int len;
- 
- sscanf(input, "CLIENT <|> NEW_ATTACK <|> %s <|> CLIENT\n", target);
- if(target[0] == '\0'){
-  efree(&target);
-  return(1);
- }
- len = strlen(target);
- clean_target = emalloc(len+1);
- strncpy(clean_target, target, len);
- plugin_set = arg_get_value(preferences, "plugin_set");
- if(!plugin_set || plugin_set[0] == '\0')
- {
-  if(plugin_set != NULL)
-   efree(&plugin_set);
-  
-  plugin_set = emalloc(3);
-  sprintf(plugin_set, "-1");
-  if( arg_get_value(preferences, "plugin_set") == NULL ) 
-   arg_add_value(preferences, "plugin_set", ARG_STRING, strlen(plugin_set), plugin_set);
-  else
-   arg_set_value(preferences, "plugin_set", strlen(plugin_set), plugin_set);
- }
- comm_setup_plugins(globals, plugin_set);
- if(arg_get_value(preferences, "TARGET"))
-  arg_set_value(preferences, "TARGET", strlen(clean_target), clean_target);
- else
-  arg_add_value(preferences, "TARGET", ARG_STRING, strlen(clean_target), clean_target);
- efree(&target);
- return(0);
-}
-
-
 void 
 ntp_11_show_end(globals, name, internal)
  struct arglist*  globals;

Modified: trunk/openvas-server/openvasd/otp_1_0.c
===================================================================
--- trunk/openvas-server/openvasd/otp_1_0.c	2008-08-31 21:43:10 UTC (rev 1253)
+++ trunk/openvas-server/openvasd/otp_1_0.c	2008-08-31 22:04:34 UTC (rev 1254)
@@ -38,7 +38,6 @@
 {
   if (!strcmp(str, "ATTACHED_FILE")) return(CREQ_ATTACHED_FILE);
   if (!strcmp(str, "LONG_ATTACK")) return(CREQ_LONG_ATTACK);
-  if (!strcmp(str, "NEW_ATTACK")) return(CREQ_NEW_ATTACK);
   if (!strcmp(str, "OPENVAS_VERSION")) return(CREQ_OPENVAS_VERSION);
   if (!strcmp(str, "PLUGIN_INFO")) return(CREQ_PLUGIN_INFO);
   if (!strcmp(str, "PREFERENCES")) return(CREQ_PREFERENCES);

Modified: trunk/openvas-server/openvasd/otp_1_0.h
===================================================================
--- trunk/openvas-server/openvasd/otp_1_0.h	2008-08-31 21:43:10 UTC (rev 1253)
+++ trunk/openvas-server/openvasd/otp_1_0.h	2008-08-31 22:04:34 UTC (rev 1254)
@@ -30,7 +30,6 @@
   CREQ_UNKNOWN,
   CREQ_ATTACHED_FILE,
   CREQ_LONG_ATTACK,
-  CREQ_NEW_ATTACK,
   CREQ_OPENVAS_VERSION,
   CREQ_PLUGIN_INFO,
   CREQ_PREFERENCES,



More information about the Openvas-commits mailing list