[Openvas-commits] r1409 - in trunk/openvas-server: . openvasd
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Sep 23 21:02:45 CEST 2008
Author: jan
Date: 2008-09-23 21:02:43 +0200 (Tue, 23 Sep 2008)
New Revision: 1409
Removed:
trunk/openvas-server/openvasd/ntp_10.c
trunk/openvas-server/openvasd/ntp_10.h
Modified:
trunk/openvas-server/ChangeLog
trunk/openvas-server/openvasd/Makefile
trunk/openvas-server/openvasd/comm.c
trunk/openvas-server/openvasd/openvasd.c
Log:
* openvasd/openvasd.c (server_thread): Removed
conditional for ntp_11, because this is standard for otp.
* openvasd/comm.c (comm_init): Removed setting of ntp_11.
(comm_wait_order): Removed conditional for ntp_11, because
this is standard for otp.
* openvasd/Makefile: Removed module ntp_10.
* openvasd/ntp_10.h, openvasd/ntp_10.c: Removed. The only
method defined there is not needed anymore since no ntp_10
fallback does make sense with otp.
Modified: trunk/openvas-server/ChangeLog
===================================================================
--- trunk/openvas-server/ChangeLog 2008-09-23 17:59:01 UTC (rev 1408)
+++ trunk/openvas-server/ChangeLog 2008-09-23 19:02:43 UTC (rev 1409)
@@ -1,3 +1,18 @@
+2008-09-23 Jan-Oliver Wagner <jan-oliver.wagner at intevation.de>
+
+ * openvasd/openvasd.c (server_thread): Removed
+ conditional for ntp_11, because this is standard for otp.
+
+ * openvasd/comm.c (comm_init): Removed setting of ntp_11.
+ (comm_wait_order): Removed conditional for ntp_11, because
+ this is standard for otp.
+
+ * openvasd/Makefile: Removed module ntp_10.
+
+ * openvasd/ntp_10.h, openvasd/ntp_10.c: Removed. The only
+ method defined there is not needed anymore since no ntp_10
+ fallback does make sense with otp.
+
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()
Modified: trunk/openvas-server/openvasd/Makefile
===================================================================
--- trunk/openvas-server/openvasd/Makefile 2008-09-23 17:59:01 UTC (rev 1408)
+++ trunk/openvas-server/openvasd/Makefile 2008-09-23 19:02:43 UTC (rev 1409)
@@ -15,7 +15,6 @@
processes.o \
users.o \
utils.o \
- ntp_10.o \
ntp_11.o \
otp_1_0.o \
parser.o \
@@ -84,9 +83,6 @@
sighand.o : sighand.c sighand.h
$(CC) $(OPENVAS_CFLAGS) $(OPENVAS_INCLUDE) -c sighand.c
-ntp_10.o : ntp_10.c ntp_10.h
- $(CC) $(OPENVAS_CFLAGS) $(OPENVAS_INCLUDE) -c ntp_10.c
-
ntp_11.o : ntp_11.c ntp_11.h
$(CC) $(OPENVAS_CFLAGS) $(OPENVAS_INCLUDE) -c ntp_11.c
Modified: trunk/openvas-server/openvasd/comm.c
===================================================================
--- trunk/openvas-server/openvasd/comm.c 2008-09-23 17:59:01 UTC (rev 1408)
+++ trunk/openvas-server/openvasd/comm.c 2008-09-23 19:02:43 UTC (rev 1409)
@@ -36,7 +36,6 @@
#include "comm.h"
#include "sighand.h"
#include "ntp.h"
-#include "ntp_10.h"
#include "ntp_11.h"
#include "log.h"
#include "plugs_hash.h"
@@ -73,7 +72,6 @@
if(!strncmp(buf, "< OTP/1.0 >", 11))
{
caps->ntp_version = OTP_10;
- caps->ntp_11 = TRUE;
caps->scan_ids = TRUE;
caps->pubkey_auth = FALSE;
nsend(soc, "< OTP/1.0 >\n", 12, 0);
@@ -349,7 +347,6 @@
comm_wait_order(globals)
struct arglist * globals;
{
- ntp_caps* caps = arg_get_value(globals, "ntp_caps");
int soc = (int)arg_get_value(globals, "global_socket");
for (;;) {
@@ -364,15 +361,9 @@
if (str [0] == '\0') {
if(!is_client_present(soc)) EXIT(0);
}
-
- if(caps->ntp_11) {
- if (ntp_11_parse_input (globals, str) == 0) break ;
- continue ;
- }
- if (ntp_10_parse_input (globals, str) == 0) break ;
-
- }
+ if (ntp_11_parse_input (globals, str) == 0) break ;
+ }
}
Deleted: trunk/openvas-server/openvasd/ntp_10.c
===================================================================
--- trunk/openvas-server/openvasd/ntp_10.c 2008-09-23 17:59:01 UTC (rev 1408)
+++ trunk/openvas-server/openvasd/ntp_10.c 2008-09-23 19:02:43 UTC (rev 1409)
@@ -1,98 +0,0 @@
-/* OpenVAS
-* $Id$
-* Description: OpenVAS Communication Manager; it manages the OpenVAS Transfer Protocol version 1.0.
-*
-* Authors: - Renaud Deraison <deraison at nessus.org> (Original pre-fork develoment)
-* - Tim Brown <mailto:timb at openvas.org> (Initial fork)
-* - Laban Mwangi <mailto:labanm at openvas.org> (Renaming work)
-* - Tarik El-Yassem <mailto:tarik at openvas.org> (Headers section)
-*
-* Copyright:
-* Portions Copyright (C) 2006 Software in the Public Interest, Inc.
-* Based on work Copyright (C) 1998 - 2006 Tenable Network Security, Inc.
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License version 2,
-* as published by the Free Software Foundation
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-*
-*
-*/
-
-#include <includes.h>
-#include "ntp.h"
-#include "comm.h"
-
-int ntp_10_parse_input(globals, input)
- struct arglist * globals;
- char * input;
-{
- char * strs[8];
- int good = 0;
- int i;
- int global_socket = (int)arg_get_value(globals, "global_socket");
- struct arglist * preferences = arg_get_value(globals, "preferences");
-
- for(i=0;i<8;i++)strs[i] = emalloc(strlen(input)+1);
- sscanf(input, "%s <|> %s <|> %s <|> %s <|> %s <|> %s <|> %s <|> %s",
- strs[0],strs[1],strs[2],strs[3],strs[4],strs[5],strs[6],strs[7]);
-
-
- if(!strncmp(strs[1], "QUIT", 4))
- {
-#if 1
- fprintf(stderr, "ntp_10_parse_input: QUIT received\n");
-#endif
- for(i=0;i<8;i++)efree(&strs[i]);
- shutdown(global_socket,2);
- EXIT(0);
- }
-
- if(!strcmp(strs[0], "CLIENT") && !strcmp(strs[1],"NEW_ATTACK") &&
- !strcmp(strs[7], "CLIENT"))good = 1;
- if(good)
- {
- char * hostname;
- char * port_range;
- char * max_hosts;
-
- max_hosts = emalloc(strlen(strs[3])+1);
- strncpy(max_hosts, strs[3], strlen(strs[3]));
-
-
- if(arg_get_value(preferences, "max_hosts"))
- arg_set_value(preferences, "max_hosts", strlen(max_hosts), max_hosts);
- else
- arg_add_value(preferences, "max_hosts", ARG_STRING, strlen(max_hosts), max_hosts);
-
-
- comm_setup_plugins(globals, strs[2]);
- hostname = emalloc(strlen(strs[6])+1);
- strncpy(hostname, strs[6], strlen(strs[6]));
-
- if(arg_get_value(preferences, "TARGET"))
- arg_set_value(preferences, "TARGET", strlen(hostname), hostname);
- else
- arg_add_value(preferences, "TARGET", ARG_STRING, strlen(hostname), hostname);
-
- port_range = emalloc(strlen(strs[5])+1);
- strncpy(port_range, strs[5], strlen(strs[5]));
- if(arg_get_value(preferences, "port_range"))
- arg_set_value(preferences, "port_range", strlen(port_range), port_range);
- else
- arg_add_value(preferences, "port_range", ARG_STRING, strlen(port_range), port_range);
- }
- for(i=0;i<8;i++)efree(&strs[i]);
- return(!good);
-}
-
-
-
Deleted: trunk/openvas-server/openvasd/ntp_10.h
===================================================================
--- trunk/openvas-server/openvasd/ntp_10.h 2008-09-23 17:59:01 UTC (rev 1408)
+++ trunk/openvas-server/openvasd/ntp_10.h 2008-09-23 19:02:43 UTC (rev 1409)
@@ -1,36 +0,0 @@
-/* OpenVAS
-* $Id $
-* Description: ntp_10.c header.
-*
-* Authors: - Renaud Deraison <deraison at nessus.org> (Original pre-fork develoment)
-* - Tim Brown <mailto:timb at openvas.org> (Initial fork)
-* - Laban Mwangi <mailto:labanm at openvas.org> (Renaming work)
-* - Tarik El-Yassem <mailto:tarik at openvas.org> (Headers section)
-*
-* Copyright:
-* Portions Copyright (C) 2006 Software in the Public Interest, Inc.
-* Based on work Copyright (C) 1998 - 2006 Tenable Network Security, Inc.
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License version 2,
-* as published by the Free Software Foundation
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-*
-*
-*/
-
-
-#ifndef _NESSUSD_NTP_10_H
-#define _NESSUSD_NTP_10_H
-
-int ntp_10_parse_input(struct arglist *, char *);
-
-#endif
Modified: trunk/openvas-server/openvasd/openvasd.c
===================================================================
--- trunk/openvas-server/openvasd/openvasd.c 2008-09-23 17:59:01 UTC (rev 1408)
+++ trunk/openvas-server/openvasd/openvasd.c 2008-09-23 19:02:43 UTC (rev 1409)
@@ -432,12 +432,9 @@
arg_set_value(globals, "plugins", -1, plugins);
comm_send_md5_plugins(globals);
- if(caps->ntp_11)
- {
- comm_send_preferences(globals);
- comm_send_rules(globals);
- ntp_1x_send_dependencies(globals);
- }
+ comm_send_preferences(globals);
+ comm_send_rules(globals);
+ ntp_1x_send_dependencies(globals);
/* become process group leader and the like ... */
start_daemon_mode();
More information about the Openvas-commits
mailing list