summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Sivak <msivak@redhat.com>2010-08-26 09:43:52 +0200
committerMartin Sivak <msivak@redhat.com>2010-08-26 09:43:52 +0200
commit022ed805446a6cb534bb2ebb36143a59d419d8ce (patch)
tree166c2ccc0fa82cbc8352e4faa3243dff3ba39ac5
parent49d1764a44326c6708be65d21f3e41e6452eeaec (diff)
downloadfirstaidkit-022ed805446a6cb534bb2ebb36143a59d419d8ce.zip
firstaidkit-022ed805446a6cb534bb2ebb36143a59d419d8ce.tar.gz
firstaidkit-022ed805446a6cb534bb2ebb36143a59d419d8ce.tar.xz
Update the OpenSCAP plugin to keep up with library development..
-rw-r--r--plugins/openscap_plugin.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/openscap_plugin.py b/plugins/openscap_plugin.py
index c5f23f5..412c31b 100644
--- a/plugins/openscap_plugin.py
+++ b/plugins/openscap_plugin.py
@@ -47,6 +47,10 @@ class OpenSCAPPlugin(Plugin):
self._policy = None
self._xccdf_policy_model.register_output_callback(self.oscap_callback, self)
+ # XXX Workaround..
+ for s in self._objs["sessions"]:
+ self._xccdf_policy_model.register_engine_oval(s)
+
# Select the last available policy
self._policy = self._xccdf_policy_model.policies[-1]
@@ -118,8 +122,10 @@ class OpenSCAPPlugin(Plugin):
Issue.set(reporting = Plugin._reporting, origin = Plugin, level = PLUGIN)
Plugin._issues[Id] = Issue
- Issue.set(checked = (result in (openscap.OSCAP.OVAL_RESULT_FALSE, openscap.OSCAP.OVAL_RESULT_TRUE)),
- happened = (result == openscap.OSCAP.OVAL_RESULT_FALSE),
+ Issue.set(checked = (result in
+ (openscap.OSCAP.XCCDF_RESULT_FAIL,
+ openscap.OSCAP.XCCDF_RESULT_PASS)),
+ happened = (result == openscap.OSCAP.XCCDF_RESULT_FAIL),
fixed = False,
reporting = Plugin._reporting,
origin = Plugin,