[Openvas-commits] r6037 - in trunk/openvas-scanner: . openvassd

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Dec 2 14:56:55 CET 2009


Author: mwiegand
Date: 2009-12-02 14:56:52 +0100 (Wed, 02 Dec 2009)
New Revision: 6037

Modified:
   trunk/openvas-scanner/ChangeLog
   trunk/openvas-scanner/openvassd/auth.c
   trunk/openvas-scanner/openvassd/comm.c
   trunk/openvas-scanner/openvassd/openvassd.c
Log:
Made logging less verbose by wrapping a number of debugging messages in
an #ifdef DEBUG.

* openvassd/auth.c (auth_check_user): Only log successful logins when
DEBUG is defined.

* openvassd/comm.c (comm_init): Only log the protocol version requested
by the client when DEBUG is defined.

* openvassd/openvassd.c (main_loop): Only log debug messages about the
connection when DEBUG is defined.


Modified: trunk/openvas-scanner/ChangeLog
===================================================================
--- trunk/openvas-scanner/ChangeLog	2009-12-02 12:54:57 UTC (rev 6036)
+++ trunk/openvas-scanner/ChangeLog	2009-12-02 13:56:52 UTC (rev 6037)
@@ -1,3 +1,17 @@
+2009-12-02  Michael Wiegand <michael.wiegand at intevation.de>
+
+	Made logging less verbose by wrapping a number of debugging messages in
+	an #ifdef DEBUG.
+
+	* openvassd/auth.c (auth_check_user): Only log successful logins when
+	DEBUG is defined.
+
+	* openvassd/comm.c (comm_init): Only log the protocol version requested
+	by the client when DEBUG is defined.
+
+	* openvassd/openvassd.c (main_loop): Only log debug messages about the
+	connection when DEBUG is defined.
+
 2009-11-30  Chandrashekhar B <bchandra at secpod.com>
 
 	* cnvts/synscan/synscan.c (rawsocket): IPv6 enabling.

Modified: trunk/openvas-scanner/openvassd/auth.c
===================================================================
--- trunk/openvas-scanner/openvassd/auth.c	2009-12-02 12:54:57 UTC (rev 6036)
+++ trunk/openvas-scanner/openvassd/auth.c	2009-12-02 13:56:52 UTC (rev 6037)
@@ -92,7 +92,9 @@
 	char* user = emalloc(strlen(buf_user)+1);
 	strncpy(user, buf_user, strlen(buf_user));
 
+#ifdef DEBUG
 	log_write("successful login of %s from %s\n", buf_user, from);
+#endif
 	if(arg_get_value(globals, "user"))
 	 arg_set_value(globals, "user", strlen(user), user);
 	else

Modified: trunk/openvas-scanner/openvassd/comm.c
===================================================================
--- trunk/openvas-scanner/openvassd/comm.c	2009-12-02 12:54:57 UTC (rev 6036)
+++ trunk/openvas-scanner/openvassd/comm.c	2009-12-02 13:56:52 UTC (rev 6037)
@@ -86,7 +86,9 @@
     {
       EXIT(0);
     }
+#ifdef DEBUG
   log_write ("Client requested protocol %s.\n", buf);
+#endif
   return(version);
 }
 

Modified: trunk/openvas-scanner/openvassd/openvassd.c
===================================================================
--- trunk/openvas-scanner/openvassd/openvassd.c	2009-12-02 12:54:57 UTC (rev 6036)
+++ trunk/openvas-scanner/openvassd/openvassd.c	2009-12-02 13:56:52 UTC (rev 6037)
@@ -708,7 +708,9 @@
         saddr = (struct sockaddr_in *)&address;
         if(inet_ntop(AF_INET, &saddr->sin_addr, asciiaddr, INET6_ADDRSTRLEN) != NULL)
         {
+#ifdef DEBUG
           log_write("Family is %d ascii address is %s\n",address.sin_family,asciiaddr);
+#endif
         }
         else
         {
@@ -719,7 +721,9 @@
       {
         if(inet_ntop(AF_INET6, &address6.sin6_addr, asciiaddr, INET6_ADDRSTRLEN) != NULL)
         {
+#ifdef DEBUG
           log_write("Family is %d ascii address is %s\n",address6.sin6_family,asciiaddr);
+#endif
         }
         else
         {
@@ -755,7 +759,9 @@
         }
       }
 #endif
+#ifdef DEBUG
       log_write ("connection from %s\n", (char *)asciiaddr);
+#endif
 
       /* efree(&asciiaddr); */
 



More information about the Openvas-commits mailing list