[Openvas-commits] r2856 - in trunk/openvas-server: . openvasd
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Mar 20 09:00:50 CET 2009
Author: mwiegand
Date: 2009-03-20 09:00:48 +0100 (Fri, 20 Mar 2009)
New Revision: 2856
Modified:
trunk/openvas-server/ChangeLog
trunk/openvas-server/openvasd/pluginscheduler.c
Log:
* openvasd/pluginscheduler.c (hash_fill_deps): Improved searching for
dependencies: If plugin some_path/x.nasl has a dependency on y.nasl
which can not be found, hash_fill_deps will now make attempt to find the
dependency in some_path/y.nasl.
Modified: trunk/openvas-server/ChangeLog
===================================================================
--- trunk/openvas-server/ChangeLog 2009-03-20 07:59:54 UTC (rev 2855)
+++ trunk/openvas-server/ChangeLog 2009-03-20 08:00:48 UTC (rev 2856)
@@ -1,3 +1,10 @@
+2009-03-20 Michael Wiegand <michael.wiegand at intevation.de>
+
+ * openvasd/pluginscheduler.c (hash_fill_deps): Improved searching for
+ dependencies: If plugin some_path/x.nasl has a dependency on y.nasl
+ which can not be found, hash_fill_deps will now make attempt to find the
+ dependency in some_path/y.nasl.
+
2009-03-18 Michael Wiegand <michael.wiegand at intevation.de>
* openvasd/oval_plugins.c (ovaldi_launch): Added initial support for
Modified: trunk/openvas-server/openvasd/pluginscheduler.c
===================================================================
--- trunk/openvas-server/openvasd/pluginscheduler.c 2009-03-20 07:59:54 UTC (rev 2855)
+++ trunk/openvas-server/openvasd/pluginscheduler.c 2009-03-20 08:00:48 UTC (rev 2856)
@@ -355,10 +355,29 @@
if ( d != NULL )
l->dependencies_ptr[j++] = d;
else
- log_write("scheduler: %s depends on %s which could not be found, thus this dependency is not considered for execution sequence\n", l->plugin->arglist->name, l->dependencies[i]);
- }
- l->dependencies_ptr[j] = NULL;
+ {
+ gchar *path = g_path_get_dirname (l->plugin->arglist->name);
+ if (g_ascii_strcasecmp (path, ".") != 0)
+ {
+ gchar *dep_with_path = g_build_filename (path, l->dependencies[i], NULL);
+ log_write ("scheduler: dependency %s not found, trying %s",
+ l->dependencies[i], dep_with_path);
+ d = _hash_get (h, dep_with_path);
+ g_free (dep_with_path);
+ }
+ g_free (path);
+ if (d != NULL)
+ {
+ l->dependencies_ptr[j++] = d;
+ }
+ else
+ {
+ log_write("scheduler: %s depends on %s which could not be found, thus this dependency is not considered for execution sequence\n", l->plugin->arglist->name, l->dependencies[i]);
+ }
+ }
}
+ l->dependencies_ptr[j] = NULL;
+ }
}
/*----------------------------------------------------------------------*/
More information about the Openvas-commits
mailing list