[Openvas-commits] r6061 - in trunk/openvas-libraries: . nasl
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Dec 4 11:05:56 CET 2009
Author: mwiegand
Date: 2009-12-04 11:05:55 +0100 (Fri, 04 Dec 2009)
New Revision: 6061
Modified:
trunk/openvas-libraries/ChangeLog
trunk/openvas-libraries/nasl/nasl.c
Log:
Add support for defining one additional directory on the command line
which will be used to look for includes to openvas-nasl.
* nasl/nasl.c (main): Introduced the --include-dir / -i command line
parameter.
Modified: trunk/openvas-libraries/ChangeLog
===================================================================
--- trunk/openvas-libraries/ChangeLog 2009-12-04 10:03:10 UTC (rev 6060)
+++ trunk/openvas-libraries/ChangeLog 2009-12-04 10:05:55 UTC (rev 6061)
@@ -1,5 +1,13 @@
2009-12-04 Michael Wiegand <michael.wiegand at intevation.de>
+ Add support for defining one additional directory on the command line
+ which will be used to look for includes to openvas-nasl.
+
+ * nasl/nasl.c (main): Introduced the --include-dir / -i command line
+ parameter.
+
+2009-12-04 Michael Wiegand <michael.wiegand at intevation.de>
+
* ChangeLog: Fixed bug # in the last entry.
2009-12-04 Michael Wiegand <michael.wiegand at intevation.de>
Modified: trunk/openvas-libraries/nasl/nasl.c
===================================================================
--- trunk/openvas-libraries/nasl/nasl.c 2009-12-04 10:03:10 UTC (rev 6060)
+++ trunk/openvas-libraries/nasl/nasl.c 2009-12-04 10:05:55 UTC (rev 6061)
@@ -124,6 +124,7 @@
static gchar * trace_file = NULL;
static gboolean with_safe_checks = FALSE;
static gboolean authenticated_mode = FALSE;
+ static gchar * include_dir = NULL;
static gchar ** nasl_filenames = NULL;
GError *error = NULL;
GOptionContext *option_context;
@@ -145,6 +146,8 @@
"Specifies that the script should be run with 'safe checks' enabled", NULL },
{ "authenticated", 'X', 0, G_OPTION_ARG_NONE, &authenticated_mode,
"Run the script in 'authenticated' mode", NULL },
+ { "include-dir", 'i', 0, G_OPTION_ARG_FILENAME, &include_dir,
+ "Search for includes in <directory>", NULL },
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &nasl_filenames, NULL, NULL },
{ NULL }
};
@@ -226,6 +229,10 @@
// for absolute and relative paths
add_nasl_inc_dir ("");
+ if (include_dir != NULL)
+ {
+ add_nasl_inc_dir (include_dir);
+ }
while (hg_next_host(hg_globals, &ip6, hostname, sizeof(hostname)) >= 0)
{
More information about the Openvas-commits
mailing list