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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri May 15 18:12:46 CEST 2009


Author: mattm
Date: 2009-05-15 18:12:45 +0200 (Fri, 15 May 2009)
New Revision: 3392

Modified:
   trunk/openvas-manager/ChangeLog
   trunk/openvas-manager/src/CMakeLists.txt
   trunk/openvas-manager/src/logf.h
   trunk/openvas-manager/src/openvasmd.c
Log:
	* src/logf.h (LOG_FILE): Change extension to comm, as this file is only
	a log of communication.

	* src/openvasmd.c (main): Create log directory if required.

	* src/CMakeLists.txt: Remove making of log directory from install.

Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog	2009-05-15 15:38:58 UTC (rev 3391)
+++ trunk/openvas-manager/ChangeLog	2009-05-15 16:12:45 UTC (rev 3392)
@@ -1,5 +1,14 @@
 2009-05-15  Matthew Mundell <mmundell at intevation.de>
 
+	* src/logf.h (LOG_FILE): Change extension to comm, as this file is only
+	a log of communication.
+
+	* src/openvasmd.c (main): Create log directory if required.
+
+	* src/CMakeLists.txt: Remove making of log directory from install.
+
+2009-05-15  Matthew Mundell <mmundell at intevation.de>
+
 	* src/tasks_fs.h, src/tasks_sql.h: Update doc params.
 
 	* src/manage.c (task_run_status_name): Add missing doc.

Modified: trunk/openvas-manager/src/CMakeLists.txt
===================================================================
--- trunk/openvas-manager/src/CMakeLists.txt	2009-05-15 15:38:58 UTC (rev 3391)
+++ trunk/openvas-manager/src/CMakeLists.txt	2009-05-15 16:12:45 UTC (rev 3392)
@@ -134,8 +134,6 @@
          LIBRARY DESTINATION ${LIBDIR}
          ARCHIVE DESTINATION ${LIBDIR}/static)
 
-#install (CODE "FILE (MAKE_DIRECTORY \"${CMAKE_INSTALL_PREFIX}/var/lib/openvas/mgr/\")")
-
 ## Tests
 
 ENABLE_TESTING ()

Modified: trunk/openvas-manager/src/logf.h
===================================================================
--- trunk/openvas-manager/src/logf.h	2009-05-15 15:38:58 UTC (rev 3391)
+++ trunk/openvas-manager/src/logf.h	2009-05-15 16:12:45 UTC (rev 3392)
@@ -47,7 +47,7 @@
 /**
  * @brief Name of log file.
  */
-#define LOG_FILE OPENVAS_LOG_DIR "/openvasmd.log"
+#define LOG_FILE OPENVAS_LOG_DIR "/openvasmd.comm"
 
 #if LOG
 extern FILE* log_stream;

Modified: trunk/openvas-manager/src/openvasmd.c
===================================================================
--- trunk/openvas-manager/src/openvasmd.c	2009-05-15 15:38:58 UTC (rev 3391)
+++ trunk/openvas-manager/src/openvasmd.c	2009-05-15 16:12:45 UTC (rev 3392)
@@ -711,6 +711,14 @@
 #if LOG
   /* Open the log file. */
 
+  if (g_mkdir_with_parents (OPENVAS_LOG_DIR,
+                            0755) /* "rwxr-xr-x" */
+      == -1)
+    {
+      perror ("Failed to create log directory");
+      exit (EXIT_FAILURE);
+    }
+
   log_stream = fopen (LOG_FILE, "w");
   if (log_stream == NULL)
     {



More information about the Openvas-commits mailing list