[Openvas-commits] r3539 - in trunk/openvas-config-manager: . src

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri May 29 15:27:51 CEST 2009


Author: mwiegand
Date: 2009-05-29 15:27:50 +0200 (Fri, 29 May 2009)
New Revision: 3539

Modified:
   trunk/openvas-config-manager/ChangeLog
   trunk/openvas-config-manager/src/openvascd.c
Log:
* src/openvascd.c: Small bugfix.
(openvas_config_add_user): Create empty rules file if there are no rules
defined since openvasd expects a rules file for every user.


Modified: trunk/openvas-config-manager/ChangeLog
===================================================================
--- trunk/openvas-config-manager/ChangeLog	2009-05-29 10:49:52 UTC (rev 3538)
+++ trunk/openvas-config-manager/ChangeLog	2009-05-29 13:27:50 UTC (rev 3539)
@@ -1,3 +1,9 @@
+2009-05-29  Michael Wiegand <michael.wiegand at intevation.de>
+
+	* src/openvascd.c: Small bugfix.
+	(openvas_config_add_user): Create empty rules file if there are no rules
+	defined since openvasd expects a rules file for every user.
+
 2009-05-19  Matthew Mundell <mmundell at intevation.de>
 
 	Move authentication facilities to libopenvas.

Modified: trunk/openvas-config-manager/src/openvascd.c
===================================================================
--- trunk/openvas-config-manager/src/openvascd.c	2009-05-29 10:49:52 UTC (rev 3538)
+++ trunk/openvas-config-manager/src/openvascd.c	2009-05-29 13:27:50 UTC (rev 3539)
@@ -732,6 +732,10 @@
             }
           g_chmod (user_hash_file_name, 0600);
 
+          if (rules == NULL)
+            {
+              rules = g_strdup("");
+            }
           if (!g_file_set_contents (user_rules_file_name, rules, -1, &error))
             {
               g_warning ("%s", error->message);
@@ -744,6 +748,7 @@
               return FALSE;
             }
           g_chmod (user_rules_file_name, 0600);
+          g_free (rules);
 
           g_free (hashes_out);
           g_free (user_dir_name);



More information about the Openvas-commits mailing list