[Openvas-commits] r5964 - in trunk/openvas-libraries: . nasl

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Nov 25 12:08:38 CET 2009


Author: mwiegand
Date: 2009-11-25 12:08:37 +0100 (Wed, 25 Nov 2009)
New Revision: 5964

Modified:
   trunk/openvas-libraries/ChangeLog
   trunk/openvas-libraries/nasl/nasl_cmd_exec.c
Log:
* nasl/nasl_cmd_exec.c (nasl_get_tmp_dir): Use the glib g_get_tmp_dir
function to identify the system directory for temporary files. This
fixes bug #1170 (http://bugs.openvas.org/1170).


Modified: trunk/openvas-libraries/ChangeLog
===================================================================
--- trunk/openvas-libraries/ChangeLog	2009-11-25 10:49:08 UTC (rev 5963)
+++ trunk/openvas-libraries/ChangeLog	2009-11-25 11:08:37 UTC (rev 5964)
@@ -1,3 +1,9 @@
+2009-11-25  Michael Wiegand <michael.wiegand at intevation.de>
+
+	* nasl/nasl_cmd_exec.c (nasl_get_tmp_dir): Use the glib g_get_tmp_dir
+	function to identify the system directory for temporary files. This
+	fixes bug #1170 (http://bugs.openvas.org/1170).
+
 2009-11-25  Felix Wolfsteller <felix.wolfsteller at intevation.de>
 
 	* hg/hg_add_hosts.c, misc/kb.c, misc/plugutils.c, misc/plugutils.h,

Modified: trunk/openvas-libraries/nasl/nasl_cmd_exec.c
===================================================================
--- trunk/openvas-libraries/nasl/nasl_cmd_exec.c	2009-11-25 10:49:08 UTC (rev 5963)
+++ trunk/openvas-libraries/nasl/nasl_cmd_exec.c	2009-11-25 11:08:37 UTC (rev 5964)
@@ -24,6 +24,7 @@
 
 #include <errno.h> /* for errno */
 #include <fcntl.h> /* for open */
+#include <glib.h> /* for g_get_tmp_dir */
 #include <signal.h> /* for kill */
 #include <string.h> /* for strncpy */
 #include <sys/wait.h> /* for waitpid */
@@ -482,7 +483,7 @@
   if (check_authenticated(lexic) < 0)
     return NULL;
 
-  snprintf (path, sizeof(path), "%s/lib/openvas/tmp/", OPENVAS_STATE_DIR); /* RATS: ignore */
+  snprintf (path, sizeof(path), "%s/", g_get_tmp_dir ());
   if (access (path, R_OK|W_OK|X_OK) < 0)
     {
       nasl_perror(lexic, "get_tmp_dir(): %s not available - check your OpenVAS installation\n", path);



More information about the Openvas-commits mailing list