Author: mattm
Date: 2016-09-21 17:13:08 +0200 (Wed, 21 Sep 2016)
New Revision: 26253

Modified:
   trunk/openvas-manager/ChangeLog
   trunk/openvas-manager/src/openvasmd.c
Log:
        * src/openvasmd.c (main): Default to a socket in OPENVAS_RUN_DIR if
        none of the listen options are given.

Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog     2016-09-21 14:09:17 UTC (rev 26252)
+++ trunk/openvas-manager/ChangeLog     2016-09-21 15:13:08 UTC (rev 26253)
@@ -1,5 +1,10 @@
 2016-09-21  Matthew Mundell <matthew.mund...@greenbone.net>
 
+       * src/openvasmd.c (main): Default to a socket in OPENVAS_RUN_DIR if
+       none of the listen options are given.
+
+2016-09-21  Matthew Mundell <matthew.mund...@greenbone.net>
+
        * src/openvasmd.c (manager_listen): Add socket permission args.
        (main): Add --listen-owner, --listen-group and --listen-mode.
 

Modified: trunk/openvas-manager/src/openvasmd.c
===================================================================
--- trunk/openvas-manager/src/openvasmd.c       2016-09-21 14:09:17 UTC (rev 
26252)
+++ trunk/openvas-manager/src/openvasmd.c       2016-09-21 15:13:08 UTC (rev 
26253)
@@ -1708,7 +1708,17 @@
   /* Check which type of socket to use. */
 
   if (manager_address_string_unix == NULL)
-    use_tls = 1;
+    {
+      if (manager_address_string || manager_address_string_2)
+        use_tls = 1;
+      else
+        {
+          use_tls = 0;
+          manager_address_string_unix = g_build_filename (OPENVAS_RUN_DIR,
+                                                          "openvasmd.sock",
+                                                          NULL);
+        }
+    }
   else
     {
       use_tls = 0;
@@ -2238,7 +2248,6 @@
   if (disable_encrypted_credentials)
     g_message ("Encryption of credentials has been disabled.");
 
-  // FIX default socket
   if (manager_listen (use_tls
                        ? NULL
                        : manager_address_string_unix,

_______________________________________________
Openvas-commits mailing list
Openvas-commits@wald.intevation.org
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-commits

Reply via email to