[Openvas-commits] r2855 - in trunk/openvas-client: . nessus src/util
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Mar 20 08:59:57 CET 2009
Author: felix
Date: 2009-03-20 08:59:54 +0100 (Fri, 20 Mar 2009)
New Revision: 2855
Modified:
trunk/openvas-client/ChangeLog
trunk/openvas-client/nessus/nessus.c
trunk/openvas-client/src/util/openvas_ssh_key_create.c
trunk/openvas-client/src/util/openvas_ssh_key_create.h
Log:
* nessus/nessus.c (main): Fixed bug that caused global filter never to
be created if the xml file did not exist.
* src/util/openvas_ssh_key_create.c, src/util/openvas_ssh_key_create.c:
(ensure_dir) Made convenient function non-static until a file utility
module is created and this function is moved into it.
Modified: trunk/openvas-client/ChangeLog
===================================================================
--- trunk/openvas-client/ChangeLog 2009-03-20 06:57:42 UTC (rev 2854)
+++ trunk/openvas-client/ChangeLog 2009-03-20 07:59:54 UTC (rev 2855)
@@ -1,3 +1,12 @@
+2009-03-20 Felix Wolfsteller <felix.wolfsteller at intevation.de>
+
+ * nessus/nessus.c (main): Fixed bug that caused global filter never to
+ be created if the xml file did not exist.
+
+ * src/util/openvas_ssh_key_create.c, src/util/openvas_ssh_key_create.c:
+ (ensure_dir) Made convenient function non-static until a file utility
+ module is created and this function is moved into it.
+
2009-03-20 Jan-Oliver Wagner <jan-oliver.wagner at intevation.de>
Further patches by Marcus Brinkmann towards a crosscompiling
Modified: trunk/openvas-client/nessus/nessus.c
===================================================================
--- trunk/openvas-client/nessus/nessus.c 2009-03-20 06:57:42 UTC (rev 2854)
+++ trunk/openvas-client/nessus/nessus.c 2009-03-20 07:59:54 UTC (rev 2855)
@@ -63,6 +63,7 @@
#include "latex_output.h"
#include "text_output.h"
#include "xml_output_ng.h"
+#include "openvas_ssh_key_create.h" /* for ensure_dir, until we have a file_util module */
#include "plugin_cache.h"
#include "severity_filter.h"
@@ -1178,6 +1179,13 @@
// Initialize global severity_filter
gchar * filter_file = g_build_filename (prefs_get_nessushome(), ".openvas", "severity_overrides.xml", NULL);
global_filter = severity_filter_from_xml (filter_file);
+ if (global_filter == NULL)
+ {
+ gchar * filter_file_dir = g_build_filename (prefs_get_nessushome(), ".openvas", NULL);
+ if (ensure_dir (filter_file_dir) == TRUE)
+ global_filter = severity_filter_new (_("Global Severity Overrides"), filter_file);
+ g_free (filter_file_dir);
+ }
g_free (filter_file);
signal(SIGINT, sighand_exit);
Modified: trunk/openvas-client/src/util/openvas_ssh_key_create.c
===================================================================
--- trunk/openvas-client/src/util/openvas_ssh_key_create.c 2009-03-20 06:57:42 UTC (rev 2854)
+++ trunk/openvas-client/src/util/openvas_ssh_key_create.c 2009-03-20 07:59:54 UTC (rev 2855)
@@ -75,7 +75,7 @@
* @return TRUE if the director(y|ies) exists or was sucessfully created, FALSE
* otherwise.
*/
-static gboolean
+gboolean
ensure_dir (char* dir)
{
char* parentdir = estrdup (dir);
Modified: trunk/openvas-client/src/util/openvas_ssh_key_create.h
===================================================================
--- trunk/openvas-client/src/util/openvas_ssh_key_create.h 2009-03-20 06:57:42 UTC (rev 2854)
+++ trunk/openvas-client/src/util/openvas_ssh_key_create.h 2009-03-20 07:59:54 UTC (rev 2855)
@@ -43,5 +43,6 @@
void openvas_ssh_key_create_undo (openvas_ssh_login* loginfo);
void openvas_ssh_key_create_unlink_files (openvas_ssh_login* loginfo);
char* openvas_ssh_key_create_rpm (openvas_ssh_login* loginfo);
+gboolean ensure_dir (char* dir);
#endif
More information about the Openvas-commits
mailing list