[Openvas-commits] r2600 - in trunk/openvas-client: . src/util

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Feb 27 11:28:47 CET 2009


Author: felix
Date: 2009-02-27 11:28:45 +0100 (Fri, 27 Feb 2009)
New Revision: 2600

Modified:
   trunk/openvas-client/ChangeLog
   trunk/openvas-client/src/util/openvas_ssh_key_create.c
Log:
* src/util/openvas_ssh_key_create.c
(openvas_ssh_key_create_unlink_files): When information in .logins is
corrupted and as a result the computed length of file name for identity
file is <= 0, skip memory allocation for the string holding it.


Modified: trunk/openvas-client/ChangeLog
===================================================================
--- trunk/openvas-client/ChangeLog	2009-02-27 08:17:13 UTC (rev 2599)
+++ trunk/openvas-client/ChangeLog	2009-02-27 10:28:45 UTC (rev 2600)
@@ -1,9 +1,20 @@
 2009-02-27  Felix Wolfsteller <felix.wolfsteller at intevation.de>
 
+	* src/util/openvas_ssh_key_create.c
+	(openvas_ssh_key_create_unlink_files): When information in .logins is
+	corrupted and as a result the computed length of file name for identity
+	file is <= 0, skip memory allocation for the string holding it.
+
+2009-02-27  Felix Wolfsteller <felix.wolfsteller at intevation.de>
+
+	* src/gui/ssh_keys_dialog.c: Documentation.
+
+2009-02-27  Felix Wolfsteller <felix.wolfsteller at intevation.de>
+
 	Added client-side support for username/password authentification using
 	the OpenVAS SSH Key Manager. GUI is extended by a password text entry,
 	value is saved in .ssh/.logins. The current server will ignore these
-	values.
+	values (per-host user/password logins will not work yet).
 	
 	* src/openvas-lib/openvas_ssh_login.h: Added new member userpassword,
 	adjusted the prototype to create a new login.

Modified: trunk/openvas-client/src/util/openvas_ssh_key_create.c
===================================================================
--- trunk/openvas-client/src/util/openvas_ssh_key_create.c	2009-02-27 08:17:13 UTC (rev 2599)
+++ trunk/openvas-client/src/util/openvas_ssh_key_create.c	2009-02-27 10:28:45 UTC (rev 2600)
@@ -306,8 +306,11 @@
   if (loginfo->public_key_path != NULL)
     {
       int len = strlen(loginfo->public_key_path) - strlen (".pub") + 1;
-      identity_file = emalloc (len);
-      g_strlcpy (identity_file, loginfo->public_key_path, len);
+      if (len > 0)
+        {
+          identity_file = emalloc (len);
+          g_strlcpy (identity_file, loginfo->public_key_path, len);
+        }
 
       // Delete all the files
       unlink (identity_file);



More information about the Openvas-commits mailing list