Author: jan
Date: 2007-07-31 12:07:09 +0200 (Tue, 31 Jul 2007)
New Revision: 337
Added:
trunk/openvas-client/src/gui/slad_install.c
trunk/openvas-client/src/gui/slad_install.h
Modified:
trunk/openvas-client/CHANGES
trunk/openvas-client/ChangeLog
trunk/openvas-client/MANIFEST
trunk/openvas-client/nessus/Makefile
trunk/openvas-client/nessus/prefs_dialog/prefs_dialog.c
trunk/openvas-client/src/gui/Makefile
Log:
Adding a menu entry with a startup routine for the sladinstaller
GUI. SLAD is the Security Local Auditing Daemon which
comes with some NASL scripts and thus can now be fully managed
through OpenVAS-Client.
* src/gui/slad_install.h, src/gui/slad_install.c: New. A
sladinstaller startup routine.
* src/gui/Makefile, nessus/Makefile: Adding module slad_install.
* nessus/prefs_dialog/prefis_dialog.c (prefs_dialog_setup): Add menu
item to run sladintaller startup.
* MANIFEST: updated.
* CHANGES: updated.
Modified: trunk/openvas-client/CHANGES
===================================================================
--- trunk/openvas-client/CHANGES 2007-07-31 09:38:58 UTC (rev 336)
+++ trunk/openvas-client/CHANGES 2007-07-31 10:07:09 UTC (rev 337)
@@ -10,6 +10,10 @@
* Decreased memory consumption considerably for
the case when looking into many different reports
with more or less the same plugins.
+* Added menu entry to execute "sladinstaller" GUI.
+ SLAD is the Security Local Auditing Daemon which
+ comes with some NASL scripts and thus can now be fully managed
+ through OpenVAS-Client.
Release 0.9.0 (2007-07-19):
---------------------------
Modified: trunk/openvas-client/ChangeLog
===================================================================
--- trunk/openvas-client/ChangeLog 2007-07-31 09:38:58 UTC (rev 336)
+++ trunk/openvas-client/ChangeLog 2007-07-31 10:07:09 UTC (rev 337)
@@ -1,5 +1,24 @@
2007-07-31 Jan-Oliver Wagner <[EMAIL PROTECTED]>
+ Adding a menu entry with a startup routine for the sladinstaller
+ GUI. SLAD is the Security Local Auditing Daemon which
+ comes with some NASL scripts and thus can now be fully managed
+ through OpenVAS-Client.
+
+ * src/gui/slad_install.h, src/gui/slad_install.c: New. A
+ sladinstaller startup routine.
+
+ * src/gui/Makefile, nessus/Makefile: Adding module slad_install.
+
+ * nessus/prefs_dialog/prefis_dialog.c (prefs_dialog_setup): Add menu
+ item to run sladintaller startup.
+
+ * MANIFEST: updated.
+
+ * CHANGES: updated.
+
+2007-07-31 Jan-Oliver Wagner <[EMAIL PROTECTED]>
+
Removing the whole manual directory which now forms
the new stand-alone module "openvas-manual".
@@ -21,7 +40,7 @@
* CHANGES: Added info for 0.9.1
- * nessus.tmpl.in, prefs_dialog/prefs_dialog.c (show_users_manual): New
doc-dir is OpenVAS,
+ * nessus.tmpl.in, nessus/prefs_dialog/prefs_dialog.c
(show_users_manual): New doc-dir is OpenVAS,
not OpenVAS-Client.
2007-07-24 Bernhard Herzog <[EMAIL PROTECTED]>
Modified: trunk/openvas-client/MANIFEST
===================================================================
--- trunk/openvas-client/MANIFEST 2007-07-31 09:38:58 UTC (rev 336)
+++ trunk/openvas-client/MANIFEST 2007-07-31 10:07:09 UTC (rev 337)
@@ -255,6 +255,8 @@
README_SSL
src/gui/about_dlg.c
src/gui/about_dlg.h
+src/gui/slad_install.h
+src/gui/slad_install.c
src/gui/Makefile
src/README
src/xpm/logo_bsi_de.xpm
Modified: trunk/openvas-client/nessus/Makefile
===================================================================
--- trunk/openvas-client/nessus/Makefile 2007-07-31 09:38:58 UTC (rev
336)
+++ trunk/openvas-client/nessus/Makefile 2007-07-31 10:07:09 UTC (rev
337)
@@ -72,7 +72,7 @@
GTK_OBJS = prefs_comment.o prefs_context.o prefs_options.o prefs_report.o \
prefs_dialog_prefs.o prefs_scan_assistant.o pdf_output.o readonly.o
-GUI_OBJS = ../src/gui/about_dlg.o
+GUI_OBJS = ../src/gui/about_dlg.o ../src/gui/slad_install.o
all : cflags ${make_bindir}/$(NESSUSCLIENT)
Modified: trunk/openvas-client/nessus/prefs_dialog/prefs_dialog.c
===================================================================
--- trunk/openvas-client/nessus/prefs_dialog/prefs_dialog.c 2007-07-31
09:38:58 UTC (rev 336)
+++ trunk/openvas-client/nessus/prefs_dialog/prefs_dialog.c 2007-07-31
10:07:09 UTC (rev 337)
@@ -44,6 +44,7 @@
#include "prefs_context.h"
#include "prefs_scope_tree.h"
#include "about_dlg.h"
+#include "slad_install.h"
#include "prefs_comment.h"
#include "prefs_options.h"
#include "prefs_report.h"
@@ -396,6 +397,10 @@
menuitem_separator(submenu);
+ menuitem = gtk_image_menu_item_new_with_mnemonic(_("SLAD _Install"));
+ menuitem_add(menuitem, submenu, NULL, "slad-install",
+ GTK_SIGNAL_FUNC(slad_install));
+
menuitem = gtk_image_menu_item_new_with_mnemonic(_("_Scan Assistant"));
menuitem_add(menuitem, submenu, NULL, "gtk-help",
GTK_SIGNAL_FUNC(prefs_scan_assistant));
Modified: trunk/openvas-client/src/gui/Makefile
===================================================================
--- trunk/openvas-client/src/gui/Makefile 2007-07-31 09:38:58 UTC (rev
336)
+++ trunk/openvas-client/src/gui/Makefile 2007-07-31 10:07:09 UTC (rev
337)
@@ -48,7 +48,7 @@
LDFLAGS+=-mwindows
endif
-OBJS=about_dlg.o
+OBJS=about_dlg.o slad_install.o
all : cflags $(OBJS)
@@ -63,5 +63,8 @@
../xpm/logo_bsi_de.xpm
$(CC) $(CFLAGS) $(NESSUS_INCLUDE) -c about_dlg.c
+slad_install.o : cflags slad_install.c
+ $(CC) $(CFLAGS) $(NESSUS_INCLUDE) -c slad_install.c
+
clean :
rm -f *.o cflags
Added: trunk/openvas-client/src/gui/slad_install.c
===================================================================
--- trunk/openvas-client/src/gui/slad_install.c 2007-07-31 09:38:58 UTC (rev
336)
+++ trunk/openvas-client/src/gui/slad_install.c 2007-07-31 10:07:09 UTC (rev
337)
@@ -0,0 +1,87 @@
+/* OpenVAS-Client
+ * $Id$
+ * Description: sladinstaller startup routine.
+ *
+ * Authors:
+ * Dirk Jagdmann <[EMAIL PROTECTED]>
+ *
+ * Copyright:
+ * Copyright (C) 2005 by DN-Systems GmbH
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2,
+ * or, at your option, any later version as published by the Free
+ * Software Foundation
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * In addition, as a special exception, you have
+ * permission to link the code of this program with the OpenSSL
+ * library (or with modified versions of OpenSSL that use the same
+ * license as OpenSSL), and distribute linked combinations including
+ * the two. You must obey the GNU General Public License in all
+ * respects for all of the code used other than OpenSSL. If you
+ * modify this file, you may extend this exception to your version
+ * of the file, but you are not obligated to do so. If you do not
+ * wish to do so, delete this exception statement from your version.
+ */
+
+#include <unistd.h>
+#include <gtk/gtk.h>
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "nessus_i18n.h"
+
+static void ERROR(gchar *str)
+{
+ GtkWidget*m=gtk_message_dialog_new(GTK_WINDOW(NULL),
GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK, str);
+ gtk_dialog_run(GTK_DIALOG(m));
+ gtk_object_destroy(GTK_OBJECT(m));
+}
+
+#define SLADINSTALLER "sladinstaller"
+
+void slad_install(GtkWidget *w, gpointer data)
+{
+ char buf[1024];
+ pid_t p;
+ FILE *f;
+
+ // check if sladinstall is a working executable
+ f=popen(SLADINSTALLER " --ping", "r");
+ if(!f)
+ {
+ ERROR(_("Could not check SLAD installer."));
+ return;
+ }
+ fgets(buf, sizeof(buf), f);
+ pclose(f);
+
+ if(strcmp(buf, "pong\n"))
+ {
+ ERROR(_("Could not execute SLAD installer."));
+ return;
+ }
+
+ // start sladinstall
+ p=fork();
+ if(p<0)
+ {
+ ERROR(_("fork error. could not start SLAD install. This is a serious
operating system error. Maybe a reboot will fix this."));
+ }
+ else if(p==0)
+ {
+ execlp(SLADINSTALLER, SLADINSTALLER, NULL);
+ perror("could not run sladinstaller");
+ exit(0);
+ }
+}
Added: trunk/openvas-client/src/gui/slad_install.h
===================================================================
--- trunk/openvas-client/src/gui/slad_install.h 2007-07-31 09:38:58 UTC (rev
336)
+++ trunk/openvas-client/src/gui/slad_install.h 2007-07-31 10:07:09 UTC (rev
337)
@@ -0,0 +1,41 @@
+/* OpenVAS-Client
+ * $Id$
+ * Description: Header file for the sladinstaller startup routine.
+ *
+ * Authors:
+ * Dirk Jagdmann <[EMAIL PROTECTED]>
+ *
+ * Copyright:
+ * Copyright (C) 2005 by DN-Systems GmbH
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2,
+ * or, at your option, any later version as published by the Free
+ * Software Foundation
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * In addition, as a special exception, you have
+ * permission to link the code of this program with the OpenSSL
+ * library (or with modified versions of OpenSSL that use the same
+ * license as OpenSSL), and distribute linked combinations including
+ * the two. You must obey the GNU General Public License in all
+ * respects for all of the code used other than OpenSSL. If you
+ * modify this file, you may extend this exception to your version
+ * of the file, but you are not obligated to do so. If you do not
+ * wish to do so, delete this exception statement from your version.
+ */
+
+#ifndef SLAD_INSTALL_H__
+#define SLAD_INSTALL_H__
+
+void slad_install(GtkWidget *, gpointer);
+
+#endif
_______________________________________________
Openvas-commits mailing list
[email protected]
http://lists.wald.intevation.org/mailman/listinfo/openvas-commits