[Openvas-commits] r5364 - in trunk/openvas-scanner: . cnvts/find_service cnvts/openvas_tcp_scanner cnvts/synscan include openvassd

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Oct 5 11:19:23 CEST 2009


Author: felix
Date: 2009-10-05 11:19:22 +0200 (Mon, 05 Oct 2009)
New Revision: 5364

Modified:
   trunk/openvas-scanner/ChangeLog
   trunk/openvas-scanner/cnvts/find_service/find_service.c
   trunk/openvas-scanner/cnvts/openvas_tcp_scanner/openvas_tcp_scanner.c
   trunk/openvas-scanner/cnvts/synscan/synscan.c
   trunk/openvas-scanner/include/includes.h
   trunk/openvas-scanner/openvassd/attack.c
   trunk/openvas-scanner/openvassd/openvassd.c
   trunk/openvas-scanner/openvassd/oval_plugins.c
   trunk/openvas-scanner/openvassd/piic.c
   trunk/openvas-scanner/openvassd/pluginlaunch.h
   trunk/openvas-scanner/openvassd/pluginscheduler.c
   trunk/openvas-scanner/openvassd/plugs_req.c
   trunk/openvas-scanner/openvassd/save_kb.c
   trunk/openvas-scanner/openvassd/save_tests.c
   trunk/openvas-scanner/openvassd/utils.c
Log:
Towards removal of libopenvas.h.

* openvassd/attack.c
(attack_network): Removed unused variable.

* cnvts/find_service/find_service.c, cnvts/openvas_tcp_scanner.c,
cnvts/synscan/synscan.c, openvassd/save_kb.c, openvassd/save_tests.c:
Cleaned up/added includes.

* include/includes.h: Removed include of libopenvas.h and ntp.h.

* openvassd/openvassd.c, openvassd/oval_plugins.c, openvassd/utils.c:
Added include of libopenvas.h where not yet resolved.

* openvassd/plugs_req.c: Added include.
(requirements_common_ports): Corrected typo from last commit.


Modified: trunk/openvas-scanner/ChangeLog
===================================================================
--- trunk/openvas-scanner/ChangeLog	2009-10-05 09:09:07 UTC (rev 5363)
+++ trunk/openvas-scanner/ChangeLog	2009-10-05 09:19:22 UTC (rev 5364)
@@ -1,5 +1,23 @@
 2009-10-05  Felix Wolfsteller <felix.wolfsteller at intevation.de>
 
+	Towards removal of libopenvas.h.
+
+	* openvassd/attack.c
+	(attack_network): Removed unused variable.
+
+	* cnvts/find_service/find_service.c, cnvts/openvas_tcp_scanner.c,
+	cnvts/synscan/synscan.c: Cleaned up/added includes.
+
+	* include/includes.h: Removed include of libopenvas.h and ntp.h.
+
+	* openvassd/openvassd.c, openvassd/oval_plugins.c, openvassd/utils.c:
+	Added include of libopenvas.h where not yet resolved.
+
+	* openvassd/plugs_req.c: Added include.
+	(requirements_common_ports): Corrected typo from last commit.
+
+2009-10-05  Felix Wolfsteller <felix.wolfsteller at intevation.de>
+
 	* openvassd/pluginscheduler.c, openvassd/plugs_req.c,
 	openvassd/save_kb.c, openvassd/save_tests.c, openvassd/utils.c,
 	openvassd/piic.c: Cosmetics, doc, todos added.

Modified: trunk/openvas-scanner/cnvts/find_service/find_service.c
===================================================================
--- trunk/openvas-scanner/cnvts/find_service/find_service.c	2009-10-05 09:09:07 UTC (rev 5363)
+++ trunk/openvas-scanner/cnvts/find_service/find_service.c	2009-10-05 09:19:22 UTC (rev 5364)
@@ -9,6 +9,12 @@
 
 #include <includes.h>
 
+#include "libopenvas.h"
+
+#include <openvas/arglists.h> /* for struct arglist */
+#include <openvas/nvt_categories.h> /* for ACT_SCANNER */
+#include <openvas/plugutils.h> /* for OPENVAS_ENCAPS_IP */
+
 #include <glib.h>
 
 #define EN_NAME "Services"

Modified: trunk/openvas-scanner/cnvts/openvas_tcp_scanner/openvas_tcp_scanner.c
===================================================================
--- trunk/openvas-scanner/cnvts/openvas_tcp_scanner/openvas_tcp_scanner.c	2009-10-05 09:09:07 UTC (rev 5363)
+++ trunk/openvas-scanner/cnvts/openvas_tcp_scanner/openvas_tcp_scanner.c	2009-10-05 09:19:22 UTC (rev 5364)
@@ -19,6 +19,11 @@
 
 #include <glib.h>
 
+#include <openvas/arglists.h> /* for struct arglist */
+#include <openvas/nvt_categories.h> /* for ACT_SCANNER */
+#include <openvas/plugutils.h> /* for find_in_path */
+#include <openvas/system.h> /* for efree */
+
 #ifdef LINUX
 #include <netinet/tcp.h>
 #include <netinet/ip.h>

Modified: trunk/openvas-scanner/cnvts/synscan/synscan.c
===================================================================
--- trunk/openvas-scanner/cnvts/synscan/synscan.c	2009-10-05 09:09:07 UTC (rev 5363)
+++ trunk/openvas-scanner/cnvts/synscan/synscan.c	2009-10-05 09:19:22 UTC (rev 5364)
@@ -3,9 +3,15 @@
 #include <includes.h>
 #include <openvasraw.h>
 
+#include <openvas/arglists.h> /* for struct arglist */
+#include <openvas/bpf_share.h> /* for bpf_open_live */
+#include <openvas/nvt_categories.h> /* for ACT_SCANNER */
+#include <openvas/pcap_openvas.h> /* for get_datalink_size */
+#include <openvas/plugutils.h> /* for scanner_add_port */
+#include <openvas/system.h> /* for efree */
 
 
-#undef DEBUG 
+#undef DEBUG
 #undef SHOW_RETRIES
 #undef SHOW_RTT_REMOVAL
 

Modified: trunk/openvas-scanner/include/includes.h
===================================================================
--- trunk/openvas-scanner/include/includes.h	2009-10-05 09:09:07 UTC (rev 5363)
+++ trunk/openvas-scanner/include/includes.h	2009-10-05 09:19:22 UTC (rev 5364)
@@ -273,8 +273,6 @@
 
 #include <pcap.h>
 #include <threadcompat.h>
-#include <libopenvas.h>
-#include <ntp.h>
 
 #ifdef HAVE_SHL_LOAD	/* I love HPUX (jh) */
 #undef dlopen

Modified: trunk/openvas-scanner/openvassd/attack.c
===================================================================
--- trunk/openvas-scanner/openvassd/attack.c	2009-10-05 09:09:07 UTC (rev 5363)
+++ trunk/openvas-scanner/openvassd/attack.c	2009-10-05 09:19:22 UTC (rev 5364)
@@ -31,27 +31,34 @@
 
 #include <openvas/hg/hosts_gatherer.h>
 #include <openvas/hg/hg_utils.h>
+#include <openvas/kb.h> /* for kb_new */
+#include <openvas/network.h> /* for auth_printf */
+#include <openvas/nvt_categories.h> /* for ACT_INIT */
+#include <openvas/pcap_openvas.h> /* for is_local_ip */
+#include <openvas/plugutils.h> /* for plug_get_path */
+#include <openvas/proctitle.h> /* for setproctitle */
+#include <openvas/system.h> /* for emalloc */
 
 #include "attack.h"
+#include "auth.h"
+#include "comm.h"
+#include "hosts.h"
 #include "log.h"
-#include "sighand.h"
-#include "rules.h"
-#include "auth.h"
-#include "processes.h"
-#include "comm.h" 
-#include "utils.h"
-#include "preferences.h"
 #include "ntp.h"
 #include "ntp_11.h"
 #include "openvas_ssh_login.h"
+#include "pluginlaunch.h"
 #include "pluginload.h"
+#include "pluginscheduler.h"
+#include "plugs_req.h"
+#include "preferences.h"
+#include "processes.h"
+#include "rules.h"
 #include "save_tests.h"
 #include "save_kb.h"
+#include "sighand.h"
+#include "utils.h"
 
-#include "pluginscheduler.h"
-#include "pluginlaunch.h"
-#include "plugs_req.h"
-#include "hosts.h"
 
 #define ERR_HOST_DEAD -1
 #define ERR_CANT_FORK -2
@@ -729,7 +736,6 @@
   plugins_scheduler_t sched;
   int fork_retries = 0;
   GHashTable* files;
-  char * key;
   struct timeval then, now;
   inaddrs_t addrs;
   char buffer[INET6_ADDRSTRLEN];

Modified: trunk/openvas-scanner/openvassd/openvassd.c
===================================================================
--- trunk/openvas-scanner/openvassd/openvassd.c	2009-10-05 09:09:07 UTC (rev 5363)
+++ trunk/openvas-scanner/openvassd/openvassd.c	2009-10-05 09:19:22 UTC (rev 5364)
@@ -46,6 +46,8 @@
 #include <openvas/nasl/nasl.h>
 #include <openvas/hg/hosts_gatherer.h>
 
+#include "libopenvas.h"
+
 #ifdef USE_LIBWRAP
 #include <tcpd.h>
 #include <syslog.h>

Modified: trunk/openvas-scanner/openvassd/oval_plugins.c
===================================================================
--- trunk/openvas-scanner/openvassd/oval_plugins.c	2009-10-05 09:09:07 UTC (rev 5363)
+++ trunk/openvas-scanner/openvassd/oval_plugins.c	2009-10-05 09:19:22 UTC (rev 5364)
@@ -31,6 +31,8 @@
 
 #include <includes.h>
 
+#include "libopenvas.h"
+
 #include <openvas/nasl/nasl.h>
 
 #include <glib.h>

Modified: trunk/openvas-scanner/openvassd/piic.c
===================================================================
--- trunk/openvas-scanner/openvassd/piic.c	2009-10-05 09:09:07 UTC (rev 5363)
+++ trunk/openvas-scanner/openvassd/piic.c	2009-10-05 09:19:22 UTC (rev 5364)
@@ -30,6 +30,11 @@
 
 #include <includes.h>
 
+#include <openvas/kb.h> /* for kb_item_set_int */
+#include <openvas/network.h> /* for internal_recv */
+#include <openvas/plugutils.h> /* for INTERNAL_COMM_MSG_TYPE_KB */
+#include <openvas/system.h> /* for efree */
+
 #include "log.h"
 #include "save_kb.h"
 #include "utils.h"

Modified: trunk/openvas-scanner/openvassd/pluginlaunch.h
===================================================================
--- trunk/openvas-scanner/openvassd/pluginlaunch.h	2009-10-05 09:09:07 UTC (rev 5363)
+++ trunk/openvas-scanner/openvassd/pluginlaunch.h	2009-10-05 09:19:22 UTC (rev 5364)
@@ -27,10 +27,12 @@
 *
 */
 
-
 #ifndef __PLUGINLAUNCH_H__
 #define __PLUGINLAUNCH_H__
 
+#include "pluginload.h" /* for struct pl_class_t */
+#include "pluginscheduler.h" /* for struct plugins_scheduler_t */
+
 void pluginlaunch_init(struct arglist * );
 void pluginlaunch_wait();
 void pluginlaunch_wait_for_free_process();

Modified: trunk/openvas-scanner/openvassd/pluginscheduler.c
===================================================================
--- trunk/openvas-scanner/openvassd/pluginscheduler.c	2009-10-05 09:09:07 UTC (rev 5363)
+++ trunk/openvas-scanner/openvassd/pluginscheduler.c	2009-10-05 09:19:22 UTC (rev 5364)
@@ -30,6 +30,10 @@
 
 #include <includes.h>
 
+#include <openvas/nvt_categories.h> /* for ACT_SCANNER */
+#include <openvas/plugutils.h> /* for plug_get_required_ports */
+#include <openvas/system.h> /* for emalloc */
+
 #include <glib.h>
 
 #define IN_SCHEDULER_CODE 1

Modified: trunk/openvas-scanner/openvassd/plugs_req.c
===================================================================
--- trunk/openvas-scanner/openvassd/plugs_req.c	2009-10-05 09:09:07 UTC (rev 5363)
+++ trunk/openvas-scanner/openvassd/plugs_req.c	2009-10-05 09:19:22 UTC (rev 5364)
@@ -30,6 +30,8 @@
 
 #include <includes.h>
 
+#include <openvas/system.h> /* for emalloc */
+
 #include "pluginscheduler.h"
 #include "plugs_req.h"
 
@@ -147,7 +149,7 @@
  */
 struct arglist *
 requirements_common_ports (struct scheduler_plugin * plugin1,
-                           struct scheduler_plugin * plugin1)
+                           struct scheduler_plugin * plugin2)
 {
  struct arglist * ret = NULL;
  struct arglist * req1;

Modified: trunk/openvas-scanner/openvassd/save_kb.c
===================================================================
--- trunk/openvas-scanner/openvassd/save_kb.c	2009-10-05 09:09:07 UTC (rev 5363)
+++ trunk/openvas-scanner/openvassd/save_kb.c	2009-10-05 09:19:22 UTC (rev 5364)
@@ -43,6 +43,11 @@
 
 #include <glib.h>
 
+#include <openvas/nvt_categories.h> /* for ACT_SCANNER */
+#include <openvas/kb.h> /* for kb_new */
+#include <openvas/plugutils.h> /* for addslashes.h */
+#include <openvas/system.h> /* for estrdup */
+
 #include "log.h"
 #include "comm.h"
 #include "users.h"

Modified: trunk/openvas-scanner/openvassd/save_tests.c
===================================================================
--- trunk/openvas-scanner/openvassd/save_tests.c	2009-10-05 09:09:07 UTC (rev 5363)
+++ trunk/openvas-scanner/openvassd/save_tests.c	2009-10-05 09:19:22 UTC (rev 5364)
@@ -29,6 +29,8 @@
 
 #include <includes.h>
 
+#include <openvas/system.h> /* for emalloc */
+
 #include <glib.h>
 
 #include "log.h"

Modified: trunk/openvas-scanner/openvassd/utils.c
===================================================================
--- trunk/openvas-scanner/openvassd/utils.c	2009-10-05 09:09:07 UTC (rev 5363)
+++ trunk/openvas-scanner/openvassd/utils.c	2009-10-05 09:19:22 UTC (rev 5364)
@@ -29,6 +29,8 @@
 
 #include <includes.h>
 
+#include "libopenvas.h"
+
 #include "log.h"
 #include "ntp.h"
 #include "auth.h"



More information about the Openvas-commits mailing list