[Openvas-commits] r2654 - in trunk/openvas-client: . nessus src/util
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Mar 4 11:18:05 CET 2009
Author: felix
Date: 2009-03-04 11:18:03 +0100 (Wed, 04 Mar 2009)
New Revision: 2654
Added:
trunk/openvas-client/nessus/parseutils.c
trunk/openvas-client/nessus/parseutils.h
Removed:
trunk/openvas-client/src/util/parseutils.c
trunk/openvas-client/src/util/parseutils.h
Modified:
trunk/openvas-client/ChangeLog
trunk/openvas-client/MANIFEST
trunk/openvas-client/nessus/Makefile
trunk/openvas-client/src/util/Makefile
Log:
Moved parseutils module (extracted from parser module in rev 2610)
back into nessus dir, due to unclear copyright and licensing.
* src/util/parseutils.c, src/util/parseutils.h: Moved to nessus/,
reverted GPL and copyright header.
* nessus/parseutils.h, nessus/parseutils.c: Moved from src/util,
reverted GPL and copyright header.
* src/util/Makefile: Removed parseutils target.
* nessus/Makefile: Included parseutils target.
* MANIFEST: updated.
Modified: trunk/openvas-client/ChangeLog
===================================================================
--- trunk/openvas-client/ChangeLog 2009-03-04 10:08:01 UTC (rev 2653)
+++ trunk/openvas-client/ChangeLog 2009-03-04 10:18:03 UTC (rev 2654)
@@ -1,5 +1,22 @@
2009-03-04 Felix Wolfsteller <felix.wolfsteller at intevation.de>
+ Moved parseutils module (extracted from parser module in rev 2610)
+ back into nessus dir, due to unclear copyright and licensing.
+
+ * src/util/parseutils.c, src/util/parseutils.h: Moved to nessus/,
+ reverted GPL and copyright header.
+
+ * nessus/parseutils.h, nessus/parseutils.c: Moved from src/util,
+ reverted GPL and copyright header.
+
+ * src/util/Makefile: Removed parseutils target.
+
+ * nessus/Makefile: Included parseutils target.
+
+ * MANIFEST: updated.
+
+2009-03-04 Felix Wolfsteller <felix.wolfsteller at intevation.de>
+
* src/gui/ssh_key_info_form.c (ssh_key_info_form_create): Modified
label text to indicate that password is optional (and may indeed be
ignored by current ssh_authorization.nasl).
Modified: trunk/openvas-client/MANIFEST
===================================================================
--- trunk/openvas-client/MANIFEST 2009-03-04 10:08:01 UTC (rev 2653)
+++ trunk/openvas-client/MANIFEST 2009-03-04 10:18:03 UTC (rev 2654)
@@ -82,6 +82,8 @@
nessus/OpenVAS-Client.desktop
nessus/parser.c
nessus/parser.h
+nessus/parseutils.c
+nessus/parseutils.h
nessus/pdf_output.c
nessus/pdf_output.h
nessus/plugin_cache.c
Modified: trunk/openvas-client/nessus/Makefile
===================================================================
--- trunk/openvas-client/nessus/Makefile 2009-03-04 10:08:01 UTC (rev 2653)
+++ trunk/openvas-client/nessus/Makefile 2009-03-04 10:18:03 UTC (rev 2654)
@@ -43,6 +43,7 @@
error_dlg.o \
backend.o \
data_mining.o \
+ parseutils.o \
prefs_dialog.o \
prefs_scope_tree.o \
prefs_dialog_scan_opt.o \
@@ -73,7 +74,7 @@
../src/gui/ssh_key_info_form.o ../src/gui/nvt_pref_sshlogin.o \
../src/openvas-lib/hash_table_file.o ../src/gui/priorities_dialog.o \
-UTIL_OBJS = ../src/util/parseutils.o ../src/util/priority.o
+UTIL_OBJS = ../src/util/priority.o
all : cflags ${make_bindir}/$(NESSUSCLIENT)
@@ -170,6 +171,9 @@
ssh_key_info_form.o : cflags ../src/gui/ssh_key_info_form.c ../src/gui/ssh_key_info_form.h globals.h
$(CC) $(CFLAGS) $(NESSUS_INCLUDE) -c ../src/gui/ssh_key_info_form.c
+parseutils.o: cflags parseutils.c parseutils.h
+ $(CC) $(CFLAGS) $(NESSUS_INCLUDE) -c parseutils.c
+
prefs_dialog_plugins_prefs.o : cflags prefs_dialog/prefs_dialog_plugins_prefs.c context.h \
prefs_dialog/listnotebook.h prefs_dialog/readonly.h
$(CC) $(CFLAGS) $(NESSUS_INCLUDE) -c prefs_dialog/prefs_dialog_plugins_prefs.c
Copied: trunk/openvas-client/nessus/parseutils.c (from rev 2652, trunk/openvas-client/src/util/parseutils.c)
===================================================================
--- trunk/openvas-client/src/util/parseutils.c 2009-03-04 09:56:02 UTC (rev 2652)
+++ trunk/openvas-client/nessus/parseutils.c 2009-03-04 10:18:03 UTC (rev 2654)
@@ -0,0 +1,155 @@
+/* Nessus
+ * Copyright (C) 1998 - 2001 Renaud Deraison
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2,
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * In addition, as a special exception, Renaud Deraison
+ * gives permission to link the code of this program with any
+ * version of the OpenSSL library which is distributed under a
+ * license identical to that listed in the included COPYING.OpenSSL
+ * file, 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 <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "parseutils.h"
+
+/**
+ * @brief Convert internal message type into integer value
+ *
+ * Return value is one of MSG_HOLE, MSG_INFO, MSG_NOTE, MSG_FALSE, MSG_TIME,
+ * MSG_STAT, MSG_PORT, MSG_ERROR, MSG_FINISHED, MSG_BYE, MSG_LOG, MSG_DEBUG
+ * and -1 for unknown message type.
+ *
+ * @param name Internal message type name
+ * @return Message type code or -1 if unknown.
+ */
+int
+priority_name_to_type(char *name)
+{
+#ifdef DEBUG
+ fprintf(stderr, "%s:%d type : %s\n", __FILE__, __LINE__, name);
+#endif
+ if(!strcmp(MSG_HOLE_STR, name))return(MSG_HOLE);
+ if(!strcmp(MSG_INFO_STR, name))return(MSG_INFO);
+ if(!strcmp(MSG_NOTE_STR, name))return(MSG_NOTE);
+ if(!strcmp(MSG_FALSE_STR, name))return(MSG_FALSE);
+ if(!strcmp(MSG_TIME_STR, name))return(MSG_TIME);
+ if(!strcmp(MSG_STAT_STR, name))return(MSG_STAT);
+ if(!strcmp(MSG_PORT_STR, name))return(MSG_PORT);
+ if(!strcmp(MSG_ERROR_STR, name))return(MSG_ERROR);
+ if(!strcmp(MSG_FINISHED_STR, name))return(MSG_FINISHED);
+ if(!strcmp(MSG_BYE_STR, name))return(MSG_BYE);
+ if(!strcmp(MSG_LOG_STR, name))return(MSG_LOG);
+ if(!strcmp(MSG_DEBUG_STR, name))return(MSG_DEBUG);
+ return(-1);
+}
+
+/**
+ * @brief Convert message type into integer value
+ *
+ * Return value is one of MSG_HOLE, MSG_INFO, MSG_NOTE, MSG_FALSE, MSG_LOG,
+ * MSG_DEBUG and -1 for unknown message type.
+ *
+ * @param str Message type name
+ * @return Message type code or -1 if unknown.
+ */
+int
+priority_str_to_type(char *str)
+{
+ if (!strcmp("Security Hole", str)) return MSG_HOLE;
+ if (!strcmp("Security Warning", str)) return MSG_INFO;
+ if (!strcmp("Security Note", str)) return MSG_NOTE;
+ if (!strcmp("False Positive", str)) return MSG_FALSE;
+ if (!strcmp("Log Message", str)) return MSG_LOG;
+ if (!strcmp("Debug Message", str)) return MSG_DEBUG;
+
+ return -1;
+}
+
+/**
+ * @brief Convert message type into internal message type name
+ *
+ * Return value is one of MSG_HOLE_STR, MSG_INFO_STR, MSG_NOTE_STR,
+ * MSG_FALSE_STR and exists for unknown message type.
+ *
+ * @param type Message type
+ * @return Message type name
+ */
+char *
+priority_type_to_name(int type)
+{
+ switch (type) {
+ case MSG_HOLE:
+ return MSG_HOLE_STR;
+ break;
+ case MSG_NOTE:
+ return MSG_NOTE_STR;
+ break;
+ case MSG_INFO:
+ return MSG_INFO_STR;
+ break;
+ case MSG_FALSE:
+ return MSG_FALSE_STR;
+ break;
+ default:
+ fprintf(stderr, "priority_type_to_name: Unknown message type %d\n", type);
+ exit(1);
+ break;
+ }
+}
+
+
+/**
+ * @brief Convert message type into a human readable string
+ *
+ * Return value is the English name for the message type.
+ *
+ * @param name Message type
+ * @return Message type string
+ */
+char *
+priority_type_to_str(int type)
+{
+ switch(type)
+ {
+ case MSG_HOLE :
+ return "Security Hole";
+ break;
+ case MSG_INFO :
+ return "Security Warning";
+ break;
+ case MSG_NOTE :
+ return "Security Note";
+ break;
+ case MSG_FALSE :
+ return "False Positive";
+ break;
+ case MSG_LOG :
+ return "Log Message";
+ break;
+ case MSG_DEBUG :
+ return "Debug Message";
+ break;
+ default :
+ fprintf(stderr, "received unknown message type (%d)\n", type);
+ return NULL;
+ }
+}
Copied: trunk/openvas-client/nessus/parseutils.h (from rev 2635, trunk/openvas-client/src/util/parseutils.h)
===================================================================
--- trunk/openvas-client/src/util/parseutils.h 2009-03-02 12:32:47 UTC (rev 2635)
+++ trunk/openvas-client/nessus/parseutils.h 2009-03-04 10:18:03 UTC (rev 2654)
@@ -0,0 +1,64 @@
+/* Nessus
+ * Copyright (C) 1998 - 2001 Renaud Deraison
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2,
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * In addition, as a special exception, Renaud Deraison
+ * gives permission to link the code of this program with any
+ * version of the OpenSSL library which is distributed under a
+ * license identical to that listed in the included COPYING.OpenSSL
+ * file, 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 _UTIL_PARSEUTILS_H
+#define _UTIL_PARSEUTILS_H
+
+#define MSG_ERROR 1
+#define MSG_PORT 2
+#define MSG_HOLE 3
+#define MSG_BYE 4
+#define MSG_INFO 5
+#define MSG_STAT 6
+#define MSG_FINISHED 9
+#define MSG_STAT2 10
+#define MSG_NOTE 11
+#define MSG_TIME 12
+#define MSG_LOG 13
+#define MSG_DEBUG 14
+#define MSG_FALSE 15
+
+#define MSG_ERROR_STR "ERROR"
+#define MSG_PORT_STR "PORT"
+#define MSG_HOLE_STR "HOLE"
+#define MSG_INFO_STR "INFO"
+#define MSG_NOTE_STR "NOTE"
+#define MSG_STAT_STR "STATUS"
+#define MSG_BYE_STR "BYE"
+#define MSG_FINISHED_STR "FINISHED"
+#define MSG_TIME_STR "TIME"
+#define MSG_LOG_STR "LOG"
+#define MSG_DEBUG_STR "DEBUG"
+#define MSG_FALSE_STR "FALSE"
+
+int priority_name_to_type(char *name);
+int priority_str_to_type(char *str);
+char *priority_type_to_name(int type);
+char * priority_type_to_str(int type);
+
+#endif /* _UTIL_PARSEUTILS_H */
Modified: trunk/openvas-client/src/util/Makefile
===================================================================
--- trunk/openvas-client/src/util/Makefile 2009-03-04 10:08:01 UTC (rev 2653)
+++ trunk/openvas-client/src/util/Makefile 2009-03-04 10:18:03 UTC (rev 2654)
@@ -6,7 +6,7 @@
# Felix Wolfsteller <felix.wolfsteller at intevation.de>
#
# Copyright:
-# Copyright (C) 2008 Intevation GmbH
+# Copyright (C) 2008, 2009 Intevation 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,
@@ -48,7 +48,7 @@
LDFLAGS+=-mwindows
endif
-OBJS=openvas_ssh_key_create.o priority.o parseutils.o
+OBJS=openvas_ssh_key_create.o priority.o
all : cflags $(OBJS)
@@ -64,8 +64,5 @@
priority.o: priority.c priority.h
$(CC) $(CFLAGS) $(NESSUS_INCLUDE) -c priority.c
-parseutils.o: parseutils.c parseutils.h
- $(CC) $(CFLAGS) $(NESSUS_INCLUDE) -c parseutils.c
-
clean :
rm -f *.o cflags
Deleted: trunk/openvas-client/src/util/parseutils.c
===================================================================
--- trunk/openvas-client/src/util/parseutils.c 2009-03-04 10:08:01 UTC (rev 2653)
+++ trunk/openvas-client/src/util/parseutils.c 2009-03-04 10:18:03 UTC (rev 2654)
@@ -1,162 +0,0 @@
-/* OpenVAS-Client
- *
- * Description: Utilities for parsing
- *
- * Authors:
- * Joey Schulze <joey at infodrom.org>
- *
- * Copyright:
- * Copyright (C) 2009 Intevation 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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "parseutils.h"
-
-/**
- * @brief Convert internal message type into integer value
- *
- * Return value is one of MSG_HOLE, MSG_INFO, MSG_NOTE, MSG_FALSE, MSG_TIME,
- * MSG_STAT, MSG_PORT, MSG_ERROR, MSG_FINISHED, MSG_BYE, MSG_LOG, MSG_DEBUG
- * and -1 for unknown message type.
- *
- * @param name Internal message type name
- * @return Message type code or -1 if unknown.
- */
-int
-priority_name_to_type(char *name)
-{
-#ifdef DEBUG
- fprintf(stderr, "%s:%d type : %s\n", __FILE__, __LINE__, name);
-#endif
- if(!strcmp(MSG_HOLE_STR, name))return(MSG_HOLE);
- if(!strcmp(MSG_INFO_STR, name))return(MSG_INFO);
- if(!strcmp(MSG_NOTE_STR, name))return(MSG_NOTE);
- if(!strcmp(MSG_FALSE_STR, name))return(MSG_FALSE);
- if(!strcmp(MSG_TIME_STR, name))return(MSG_TIME);
- if(!strcmp(MSG_STAT_STR, name))return(MSG_STAT);
- if(!strcmp(MSG_PORT_STR, name))return(MSG_PORT);
- if(!strcmp(MSG_ERROR_STR, name))return(MSG_ERROR);
- if(!strcmp(MSG_FINISHED_STR, name))return(MSG_FINISHED);
- if(!strcmp(MSG_BYE_STR, name))return(MSG_BYE);
- if(!strcmp(MSG_LOG_STR, name))return(MSG_LOG);
- if(!strcmp(MSG_DEBUG_STR, name))return(MSG_DEBUG);
- return(-1);
-}
-
-/**
- * @brief Convert message type into integer value
- *
- * Return value is one of MSG_HOLE, MSG_INFO, MSG_NOTE, MSG_FALSE, MSG_LOG,
- * MSG_DEBUG and -1 for unknown message type.
- *
- * @param str Message type name
- * @return Message type code or -1 if unknown.
- */
-int
-priority_str_to_type(char *str)
-{
- if (!strcmp("Security Hole", str)) return MSG_HOLE;
- if (!strcmp("Security Warning", str)) return MSG_INFO;
- if (!strcmp("Security Note", str)) return MSG_NOTE;
- if (!strcmp("False Positive", str)) return MSG_FALSE;
- if (!strcmp("Log Message", str)) return MSG_LOG;
- if (!strcmp("Debug Message", str)) return MSG_DEBUG;
-
- return -1;
-}
-
-/**
- * @brief Convert message type into internal message type name
- *
- * Return value is one of MSG_HOLE_STR, MSG_INFO_STR, MSG_NOTE_STR,
- * MSG_FALSE_STR and exists for unknown message type.
- *
- * @param type Message type
- * @return Message type name
- */
-char *
-priority_type_to_name(int type)
-{
- switch (type) {
- case MSG_HOLE:
- return MSG_HOLE_STR;
- break;
- case MSG_NOTE:
- return MSG_NOTE_STR;
- break;
- case MSG_INFO:
- return MSG_INFO_STR;
- break;
- case MSG_FALSE:
- return MSG_FALSE_STR;
- break;
- default:
- fprintf(stderr, "priority_type_to_name: Unknown message type %d\n", type);
- exit(1);
- break;
- }
-}
-
-
-/**
- * @brief Convert message type into a human readable string
- *
- * Return value is the English name for the message type.
- *
- * @param name Message type
- * @return Message type string
- */
-char *
-priority_type_to_str(int type)
-{
- switch(type)
- {
- case MSG_HOLE :
- return "Security Hole";
- break;
- case MSG_INFO :
- return "Security Warning";
- break;
- case MSG_NOTE :
- return "Security Note";
- break;
- case MSG_FALSE :
- return "False Positive";
- break;
- case MSG_LOG :
- return "Log Message";
- break;
- case MSG_DEBUG :
- return "Debug Message";
- break;
- default :
- fprintf(stderr, "received unknown message type (%d)\n", type);
- return NULL;
- }
-}
Deleted: trunk/openvas-client/src/util/parseutils.h
===================================================================
--- trunk/openvas-client/src/util/parseutils.h 2009-03-04 10:08:01 UTC (rev 2653)
+++ trunk/openvas-client/src/util/parseutils.h 2009-03-04 10:18:03 UTC (rev 2654)
@@ -1,71 +0,0 @@
-/* OpenVAS-Client
- *
- * Description: Utilities for parsing
- *
- * Authors:
- * Joey Schulze <joey at infodrom.org>
- *
- * Copyright:
- * Copyright (C) 2009 Intevation 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 _UTIL_PARSEUTILS_H
-#define _UTIL_PARSEUTILS_H
-
-#define MSG_ERROR 1
-#define MSG_PORT 2
-#define MSG_HOLE 3
-#define MSG_BYE 4
-#define MSG_INFO 5
-#define MSG_STAT 6
-#define MSG_FINISHED 9
-#define MSG_STAT2 10
-#define MSG_NOTE 11
-#define MSG_TIME 12
-#define MSG_LOG 13
-#define MSG_DEBUG 14
-#define MSG_FALSE 15
-
-#define MSG_ERROR_STR "ERROR"
-#define MSG_PORT_STR "PORT"
-#define MSG_HOLE_STR "HOLE"
-#define MSG_INFO_STR "INFO"
-#define MSG_NOTE_STR "NOTE"
-#define MSG_STAT_STR "STATUS"
-#define MSG_BYE_STR "BYE"
-#define MSG_FINISHED_STR "FINISHED"
-#define MSG_TIME_STR "TIME"
-#define MSG_LOG_STR "LOG"
-#define MSG_DEBUG_STR "DEBUG"
-#define MSG_FALSE_STR "FALSE"
-
-int priority_name_to_type(char *name);
-int priority_str_to_type(char *str);
-char *priority_type_to_name(int type);
-char * priority_type_to_str(int type);
-
-#endif /* _UTIL_PARSEUTILS_H */
More information about the Openvas-commits
mailing list