[Openvas-commits] r5362 - in trunk/openvas-scanner: cnvts/ssl_ciphers openvassd

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Oct 5 10:45:04 CEST 2009


Author: felix
Date: 2009-10-05 10:45:01 +0200 (Mon, 05 Oct 2009)
New Revision: 5362

Modified:
   trunk/openvas-scanner/cnvts/ssl_ciphers/ssl_ciphers.c
   trunk/openvas-scanner/openvassd/comm.c
   trunk/openvas-scanner/openvassd/comm.h
   trunk/openvas-scanner/openvassd/hosts.c
   trunk/openvas-scanner/openvassd/locks.c
   trunk/openvas-scanner/openvassd/nasl_plugins.c
   trunk/openvas-scanner/openvassd/nes_plugins.c
   trunk/openvas-scanner/openvassd/ntp_11.c
   trunk/openvas-scanner/openvassd/ntp_11.h
   trunk/openvas-scanner/openvassd/parser.c
   trunk/openvas-scanner/openvassd/pluginlaunch.c
   trunk/openvas-scanner/openvassd/pluginload.c
   trunk/openvas-scanner/openvassd/pluginload.h
   trunk/openvas-scanner/openvassd/pluginscheduler.h
   trunk/openvas-scanner/openvassd/plugs_hash.c
   trunk/openvas-scanner/openvassd/plugs_req.h
   trunk/openvas-scanner/openvassd/preferences.c
   trunk/openvas-scanner/openvassd/rules.c
   trunk/openvas-scanner/openvassd/save_kb.h
   trunk/openvas-scanner/openvassd/shared_socket.c
   trunk/openvas-scanner/openvassd/users.c
   trunk/openvas-scanner/openvassd/users.h
   trunk/openvas-scanner/openvassd/utils.h
Log:
Towards removal of libopenvas.h.

* openvassd/utils.h, openvassd/users.c, openvassd/users.h,
openvassd/shared_socket.c, openvassd/save_kb.h, openvassd/rules.c,
openvassd/preferences.c, openvassd/plugs_req.h,, openvassd/plugs_hash.c,
openvassd/pluginscheduler.h, openvassd/pluginload.h,
openvassd/pluginload.c, openvassd/pluginlaunch.c, openvassd/parser.c,
openvassd/ntp_11.h, openvassd/ntp_11.c, openvassd/nes_plugins.c,
openvassd/nasl_plugins.c, openvassd/locks.c, openvassd/hosts.c,
openvassd/comm.h, openvassd/comm.c, cnvts/ssl_ciphers/ssl_ciphers.c:
Added/cleaned up includes.


Modified: trunk/openvas-scanner/cnvts/ssl_ciphers/ssl_ciphers.c
===================================================================
--- trunk/openvas-scanner/cnvts/ssl_ciphers/ssl_ciphers.c	2009-10-05 06:51:33 UTC (rev 5361)
+++ trunk/openvas-scanner/cnvts/ssl_ciphers/ssl_ciphers.c	2009-10-05 08:45:01 UTC (rev 5362)
@@ -6,9 +6,11 @@
  *
  * This plugin was written by Michel Arboi <arboi at alussinan.org>
  */
- 
+
 #include "includes.h"
 
+#include <openvas/system.h> /* for emalloc */
+
 #ifndef ssl_get_cipher_by_char
 #define ssl_get_cipher_by_char(ssl,ptr) \
 	((ssl)->method->get_cipher_by_char((unsigned char*)ptr))

Modified: trunk/openvas-scanner/openvassd/comm.c
===================================================================
--- trunk/openvas-scanner/openvassd/comm.c	2009-10-05 06:51:33 UTC (rev 5361)
+++ trunk/openvas-scanner/openvassd/comm.c	2009-10-05 08:45:01 UTC (rev 5362)
@@ -33,17 +33,25 @@
 
 #include <glib.h>
 
+#include <openvas/nasl/nasl.h>
+#include <openvas/nvt_categories.h> /* for ACT_FIRST */
+
 #include "auth.h"
-#include "rules.h"
-#include "comm.h" 
-#include "sighand.h"
+
+#include "comm.h"
+#include "network.h" /* for recv_line */
 #include "ntp.h"
 #include "ntp_11.h"
 #include "log.h"
 #include "plugs_hash.h"
+#include "pluginscheduler.h" /* for define LAUNCH_DISABLED */
+#include "plugutils.h" /* for plug_get_oid */
+#include "rules.h"
+#include "sighand.h"
+#include "system.h" /* for emalloc */
 #include "utils.h"
-#include <openvas/nasl/nasl.h>
 
+
 #ifndef FALSE
 #define FALSE 0
 #endif

Modified: trunk/openvas-scanner/openvassd/comm.h
===================================================================
--- trunk/openvas-scanner/openvassd/comm.h	2009-10-05 06:51:33 UTC (rev 5361)
+++ trunk/openvas-scanner/openvassd/comm.h	2009-10-05 08:45:01 UTC (rev 5362)
@@ -30,6 +30,9 @@
 #ifndef _OPENVAS_COMM_H
 #define _OPENVAS_COMM_H
 
+#include "ntp.h" /* for struct ntp_caps */
+#include <openvas/arglists.h> /* for struct arglist */
+
 ntp_caps* comm_init(int);
 void comm_terminate(struct arglist *);
 void comm_send_pluginlist(struct arglist *);

Modified: trunk/openvas-scanner/openvassd/hosts.c
===================================================================
--- trunk/openvas-scanner/openvassd/hosts.c	2009-10-05 06:51:33 UTC (rev 5361)
+++ trunk/openvas-scanner/openvassd/hosts.c	2009-10-05 08:45:01 UTC (rev 5362)
@@ -28,6 +28,11 @@
 */
 
 #include <includes.h>
+
+#include <openvas/network.h> /* for internal_recv */
+#include <openvas/plugutils.h> /* for INTERNAL_COMM_MSG_TYPE_CTRL */
+#include <openvas/system.h> /* for estrdup */
+
 #include "utils.h"
 #include "log.h"
 #include "preferences.h"

Modified: trunk/openvas-scanner/openvassd/locks.c
===================================================================
--- trunk/openvas-scanner/openvassd/locks.c	2009-10-05 06:51:33 UTC (rev 5361)
+++ trunk/openvas-scanner/openvassd/locks.c	2009-10-05 08:45:01 UTC (rev 5362)
@@ -28,6 +28,9 @@
 */
 
 #include <includes.h>
+
+#include <openvas/system.h> /* for efree */
+
 #include "utils.h"
 #include "log.h"
 

Modified: trunk/openvas-scanner/openvassd/nasl_plugins.c
===================================================================
--- trunk/openvas-scanner/openvassd/nasl_plugins.c	2009-10-05 06:51:33 UTC (rev 5361)
+++ trunk/openvas-scanner/openvassd/nasl_plugins.c	2009-10-05 08:45:01 UTC (rev 5362)
@@ -34,8 +34,14 @@
 #include <glib.h>
 
 #include <openvas/nasl/nasl.h>
+#include <openvas/network.h> /* for internal_send */
+#include <openvas/nvt_categories.h> /* for ACT_SCANNER */
+#include <openvas/plugutils.h> /* for INTERNAL_COMM_CTRL_FINISHED */
+#include <openvas/store.h> /* for store_plugin */
+#include <openvas/system.h> /* for emalloc */
 
 #include "pluginload.h"
+#include "pluginscheduler.h" /* for LAUNCH_DISABLED */
 #include "plugs_hash.h"
 #include "preferences.h"
 #include "processes.h"

Modified: trunk/openvas-scanner/openvassd/nes_plugins.c
===================================================================
--- trunk/openvas-scanner/openvassd/nes_plugins.c	2009-10-05 06:51:33 UTC (rev 5361)
+++ trunk/openvas-scanner/openvassd/nes_plugins.c	2009-10-05 08:45:01 UTC (rev 5362)
@@ -29,9 +29,12 @@
 
 #include <includes.h>
 
+#include "libopenvas.h"
+
 #include <glib.h>
 
 #include "pluginload.h"
+#include "pluginscheduler.h" /* for LAUNCH_DISABLED */
 #include "plugs_hash.h"
 #include "processes.h"
 #include "log.h"

Modified: trunk/openvas-scanner/openvassd/ntp_11.c
===================================================================
--- trunk/openvas-scanner/openvassd/ntp_11.c	2009-10-05 06:51:33 UTC (rev 5361)
+++ trunk/openvas-scanner/openvassd/ntp_11.c	2009-10-05 08:45:01 UTC (rev 5362)
@@ -31,6 +31,10 @@
 
 #include <glib.h>
 
+#include <openvas/network.h> /* for recv_line */
+#include <openvas/plugutils.h> /* for plug_get_name */
+#include <openvas/system.h> /* for emalloc */
+
 #include "ntp.h"
 #include "ntp_11.h"
 #include "otp_1_0.h"

Modified: trunk/openvas-scanner/openvassd/ntp_11.h
===================================================================
--- trunk/openvas-scanner/openvassd/ntp_11.h	2009-10-05 06:51:33 UTC (rev 5361)
+++ trunk/openvas-scanner/openvassd/ntp_11.h	2009-10-05 08:45:01 UTC (rev 5362)
@@ -30,6 +30,9 @@
 
 #ifndef _OPENVAS_NTP_11_H
 #define _OPENVAS_NTP_11_H
+
+#include <openvas/arglists.h> /* for struct arglist */
+
 #define NTP_STOP_WHOLE_TEST 2
 
 int ntp_11_parse_input(struct arglist *, char *);

Modified: trunk/openvas-scanner/openvassd/parser.c
===================================================================
--- trunk/openvas-scanner/openvassd/parser.c	2009-10-05 06:51:33 UTC (rev 5361)
+++ trunk/openvas-scanner/openvassd/parser.c	2009-10-05 08:45:01 UTC (rev 5362)
@@ -29,6 +29,8 @@
 
 #include <includes.h>
 
+#include <openvas/system.h> /* for emalloc */
+
 /** @TODO Contents of this file is duplicate in openvas-scanner/openvassd/parser.c
  *        and openvas-client/openvas/parser.c . Move to libraries and merge, once
  *        openvas-client depends on libraries. */

Modified: trunk/openvas-scanner/openvassd/pluginlaunch.c
===================================================================
--- trunk/openvas-scanner/openvassd/pluginlaunch.c	2009-10-05 06:51:33 UTC (rev 5361)
+++ trunk/openvas-scanner/openvassd/pluginlaunch.c	2009-10-05 08:45:01 UTC (rev 5362)
@@ -28,6 +28,12 @@
 */
 
 #include <includes.h>
+
+#include <openvas/network.h> /* for internal_send */
+#include <openvas/nvt_categories.h> /* for ACT_SCANNER */
+#include <openvas/plugutils.h> /* for INTERNAL_COMM_MSG_SHARED_SOCKET */
+#include <openvas/system.h> /* for efree */
+
 #include "pluginload.h"
 #include "piic.h"
 #include "utils.h"

Modified: trunk/openvas-scanner/openvassd/pluginload.c
===================================================================
--- trunk/openvas-scanner/openvassd/pluginload.c	2009-10-05 06:51:33 UTC (rev 5361)
+++ trunk/openvas-scanner/openvassd/pluginload.c	2009-10-05 08:45:01 UTC (rev 5362)
@@ -30,6 +30,7 @@
 #include <includes.h>
 
 #include <openvas/nasl/nasl.h>
+#include <openvas/system.h> /* for emalloc */
 
 #include <glib.h>
 

Modified: trunk/openvas-scanner/openvassd/pluginload.h
===================================================================
--- trunk/openvas-scanner/openvassd/pluginload.h	2009-10-05 06:51:33 UTC (rev 5361)
+++ trunk/openvas-scanner/openvassd/pluginload.h	2009-10-05 08:45:01 UTC (rev 5362)
@@ -31,6 +31,9 @@
 #ifndef _OPENVAS_PLUGINLOAD_H
 #define _OPENVAS_PLUGINLOAD_H
 
+#include <openvas/arglists.h> /* for struct arglist */
+#include <openvas/kb.h> /* for struct kb_item */
+
 struct arglist * plugins_init(struct arglist *, int);
 struct arglist * plugins_reload(struct arglist *, struct arglist *, int);
 void plugin_set_socket(struct arglist *, int);

Modified: trunk/openvas-scanner/openvassd/pluginscheduler.h
===================================================================
--- trunk/openvas-scanner/openvassd/pluginscheduler.h	2009-10-05 06:51:33 UTC (rev 5361)
+++ trunk/openvas-scanner/openvassd/pluginscheduler.h	2009-10-05 08:45:01 UTC (rev 5362)
@@ -31,6 +31,15 @@
 #ifndef PLUGINSCHEDULER_H
 #define PLUGINSCHEDULER_H
 
+/**
+ * @brief States of scheduler_plugin.
+ *
+ * @todo Consider creating an enumeration.
+ */
+#define LAUNCH_DISABLED 0
+#define LAUNCH_RUN      1
+#define LAUNCH_SILENT   2
+
 struct scheduler_plugin {
 	int running_state;
 	int category;

Modified: trunk/openvas-scanner/openvassd/plugs_hash.c
===================================================================
--- trunk/openvas-scanner/openvassd/plugs_hash.c	2009-10-05 06:51:33 UTC (rev 5361)
+++ trunk/openvas-scanner/openvassd/plugs_hash.c	2009-10-05 08:45:01 UTC (rev 5362)
@@ -29,6 +29,11 @@
 
 
 #include <includes.h>
+
+#include <openvas/network.h> /* for auth_printf */
+#include <openvas/share_fd.h> /* for send_fd */
+#include <openvas/system.h> /* for efree */
+
 #include <gcrypt.h>
 #include "users.h"
 #include "log.h"

Modified: trunk/openvas-scanner/openvassd/plugs_req.h
===================================================================
--- trunk/openvas-scanner/openvassd/plugs_req.h	2009-10-05 06:51:33 UTC (rev 5361)
+++ trunk/openvas-scanner/openvassd/plugs_req.h	2009-10-05 08:45:01 UTC (rev 5362)
@@ -31,6 +31,9 @@
 #ifndef PLUGINS_REQUIREMENTS_H__
 #define PLUGINS_REQUIREMENTS_H__
 
+#include <openvas/kb.h> /* for struct kb_item */
+#include <openvas/arglists.h> /* for struct arglist */
+
 char * requirements_plugin(struct kb_item **, 
                            struct scheduler_plugin *, 
 			   struct arglist *);

Modified: trunk/openvas-scanner/openvassd/preferences.c
===================================================================
--- trunk/openvas-scanner/openvassd/preferences.c	2009-10-05 06:51:33 UTC (rev 5361)
+++ trunk/openvas-scanner/openvassd/preferences.c	2009-10-05 08:45:01 UTC (rev 5362)
@@ -45,7 +45,9 @@
  */
 
 #include <includes.h>
+
 #include <openvas/hg/hosts_gatherer.h>
+#include <openvas/system.h> /* for efree */
 
 #include "glib.h"
 #include "comm.h"

Modified: trunk/openvas-scanner/openvassd/rules.c
===================================================================
--- trunk/openvas-scanner/openvassd/rules.c	2009-10-05 06:51:33 UTC (rev 5361)
+++ trunk/openvas-scanner/openvassd/rules.c	2009-10-05 08:45:01 UTC (rev 5362)
@@ -29,6 +29,9 @@
 
 
 #include <includes.h>
+
+#include <openvas/system.h> /* for efree */
+
 #include <pwd.h>
 #include "comm.h"
 #include "utils.h"

Modified: trunk/openvas-scanner/openvassd/save_kb.h
===================================================================
--- trunk/openvas-scanner/openvassd/save_kb.h	2009-10-05 06:51:33 UTC (rev 5361)
+++ trunk/openvas-scanner/openvassd/save_kb.h	2009-10-05 08:45:01 UTC (rev 5362)
@@ -31,6 +31,8 @@
 #ifndef SAVE_KB_H__
 #define SAVE_KB_H__
 
+#include <openvas/arglists.h> /* for struct arglist */
+
 int save_kb_new(struct arglist*, char *);
 void save_kb_close(struct arglist*, char*);
 

Modified: trunk/openvas-scanner/openvassd/shared_socket.c
===================================================================
--- trunk/openvas-scanner/openvassd/shared_socket.c	2009-10-05 06:51:33 UTC (rev 5361)
+++ trunk/openvas-scanner/openvassd/shared_socket.c	2009-10-05 08:45:01 UTC (rev 5362)
@@ -35,6 +35,12 @@
  */
 
 #include <includes.h>
+
+#include <openvas/network.h> /* internal_recv */
+#include <openvas/plugutils.h> /* for INTERNAL_COMM_MSG_SHARED_SOCKET */
+#include <openvas/share_fd.h> /* for recv_fd */
+#include <openvas/system.h> /* for efree */
+
 #include "utils.h"
 #include "log.h"
 

Modified: trunk/openvas-scanner/openvassd/users.c
===================================================================
--- trunk/openvas-scanner/openvassd/users.c	2009-10-05 06:51:33 UTC (rev 5361)
+++ trunk/openvas-scanner/openvassd/users.c	2009-10-05 08:45:01 UTC (rev 5362)
@@ -29,6 +29,9 @@
 
 
 #include <includes.h>
+
+#include <openvas/system.h> /* for emalloc */
+
 #include <gcrypt.h>
 #include "log.h"
 #include "users.h"

Modified: trunk/openvas-scanner/openvassd/users.h
===================================================================
--- trunk/openvas-scanner/openvassd/users.h	2009-10-05 06:51:33 UTC (rev 5361)
+++ trunk/openvas-scanner/openvassd/users.h	2009-10-05 08:45:01 UTC (rev 5362)
@@ -30,6 +30,9 @@
 
 #ifndef _OPENVAS_USERS_H
 #define _OPENVAS_USERS_H
+
+#include <openvas/arglists.h> /* for struct arglist */
+
 #define BAD_LOGIN_ATTEMPT (struct openvas_rules*)(-1)
 #define OPENVAS_MAX_USERNAME_LEN	32 /* Including the ending nul byte! */
 

Modified: trunk/openvas-scanner/openvassd/utils.h
===================================================================
--- trunk/openvas-scanner/openvassd/utils.h	2009-10-05 06:51:33 UTC (rev 5361)
+++ trunk/openvas-scanner/openvassd/utils.h	2009-10-05 08:45:01 UTC (rev 5362)
@@ -31,6 +31,9 @@
 #ifndef _OPENVAS_UTILS_H
 #define _OPENVAS_UTILS_H
 
+#include "ntp.h" /* for struct ntp_caps */
+#include <openvas/arglists.h> /* for struct arglist */
+
 struct attack_atom
 {
  char * name;



More information about the Openvas-commits mailing list