Author: kroosec
Date: 2016-09-20 05:40:20 +0200 (Tue, 20 Sep 2016)
New Revision: 26236

Modified:
   trunk/openvas-scanner/ChangeLog
   trunk/openvas-scanner/src/openvassd.c
Log:
* src/openvassd.c (main): Don't flush the kb when --cfg-specs is
provided.

Modified: trunk/openvas-scanner/ChangeLog
===================================================================
--- trunk/openvas-scanner/ChangeLog     2016-09-16 14:48:22 UTC (rev 26235)
+++ trunk/openvas-scanner/ChangeLog     2016-09-20 03:40:20 UTC (rev 26236)
@@ -1,3 +1,8 @@
+2016-09-20  Hani Benhabiles  <hani.benhabi...@greenbone.net>
+
+       * src/openvassd.c (main): Don't flush the kb when --cfg-specs is
+       provided.
+
 2016-09-16  Hani Benhabiles  <hani.benhabi...@greenbone.net>
 
        Remove support for OTP over TCP sockets.

Modified: trunk/openvas-scanner/src/openvassd.c
===================================================================
--- trunk/openvas-scanner/src/openvassd.c       2016-09-16 14:48:22 UTC (rev 
26235)
+++ trunk/openvas-scanner/src/openvassd.c       2016-09-20 03:40:20 UTC (rev 
26236)
@@ -685,7 +685,7 @@
 int
 main (int argc, char *argv[])
 {
-  int exit_early = 0, ret;
+  int ret;
   pid_t handler_pid;
 
   proctitle_init (argc, argv);
@@ -750,9 +750,6 @@
     }
   tzset ();
 
-  if (print_specs)
-    exit_early = 2;           /* no cipher initialization */
-
   if (!unix_socket_path)
     unix_socket_path = g_build_filename (OPENVAS_RUN_DIR, "openvassd.sock", 
NULL);
 
@@ -786,19 +783,20 @@
 
   if (init_openvassd (dont_fork, config_file))
     return 1;
-  if (!exit_early)
+  if (!print_specs)
     {
       if (init_unix_network (&global_iana_socket, listen_owner, listen_group,
                              listen_mode))
         return 1;
     }
-  flush_all_kbs ();
 
   /* special treatment */
   if (print_specs)
-    prefs_dump ();
-  if (exit_early)
-    exit (0);
+    {
+      prefs_dump ();
+      exit (0);
+    }
+  flush_all_kbs ();
 
   // Daemon mode:
   if (dont_fork == FALSE)

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

Reply via email to