Author: mwiegand
Date: 2008-10-23 14:38:18 +0200 (Thu, 23 Oct 2008)
New Revision: 1603
Modified:
trunk/sladinstaller/ChangeLog
trunk/sladinstaller/gtk.cpp
Log:
Fixed handling of pregenerated keys that were in some cases not properly
transfered to the target host.
* gtk.cpp (install, loadsladkey): Store public key correctly to make
it available to install function.
Modified: trunk/sladinstaller/ChangeLog
===================================================================
--- trunk/sladinstaller/ChangeLog 2008-10-23 12:16:10 UTC (rev 1602)
+++ trunk/sladinstaller/ChangeLog 2008-10-23 12:38:18 UTC (rev 1603)
@@ -1,3 +1,11 @@
+2008-10-23 Michael Wiegand <[EMAIL PROTECTED]>
+
+ Fixed handling of pregenerated keys that were in some cases not properly
+ transfered to the target host.
+
+ * gtk.cpp (install, loadsladkey): Store public key correctly to make
+ it available to install function.
+
2008-10-21 Michael Wiegand <[EMAIL PROTECTED]>
Improved 64bit compatibility.
Modified: trunk/sladinstaller/gtk.cpp
===================================================================
--- trunk/sladinstaller/gtk.cpp 2008-10-23 12:16:10 UTC (rev 1602)
+++ trunk/sladinstaller/gtk.cpp 2008-10-23 12:38:18 UTC (rev 1603)
@@ -67,7 +67,7 @@
static GtkWidget *package, *hostname, *ip, *rootpassword, *sshpassphrase,
*twsitepassphrase, *twlocalpassphrase, *progress, *installbutton, *mainwindow,
*sladpubkey, *sladradiobutton, *scroll;
static GtkTextBuffer *log;
static std::string log_, filename_sladconf, filename_sshkey;
-static gchar * filecontent_sladpubkey;
+static gchar filecontent_sladpubkey[16000];
static GThread *installthread;
static volatile bool installthreadrun;
@@ -513,7 +513,7 @@
switch(SladRadioButton)
{
case SLAD_PUBKEY:
- td->sladpubkey=filecontent_sladpubkey;
+ td->sladpubkey=(std::string)filecontent_sladpubkey;
if(td->sladpubkey.empty())
{
ERROR(_("No public key was provided"));
@@ -623,7 +623,7 @@
while(len && isspace(buf[len-1]))
buf[--len]=0;
- filecontent_sladpubkey = buf;
+ strncpy(filecontent_sladpubkey, buf, len);
}
fclose(f);
}
_______________________________________________
Openvas-commits mailing list
[email protected]
http://lists.wald.intevation.org/mailman/listinfo/openvas-commits