[Open-scap] Problem with openscap_api bindings

Maros Barabas mbarabas at redhat.com
Fri Aug 13 09:06:10 UTC 2010


Hi Josh,

     thanks for bug report. Try to patch openscap_api.py file with the patch 
from attachment. It's all about "smart" looking for what parameters calling 
function required, but it is not smart at all. I need to rewrite this section 
of binding API completely. For now try the patch as a quick fix, I'm going to 
rewrite it.

Maros Barabas

On Thursday, August 12, 2010 07:20:44 pm Joshua Adams wrote:
> I seem to have run into an issue with the Python API bindings.  I don't
> know what causes it, but I consistently have segfaults when trying to get
> the results model from an oval agent session.  However, this works fine
> with the old python bindings.
> 
> For example:
> >>> from openscap import *
> >>> def_model = oval_definition_model_import('scap-rhel5-oval.xml')
> >>> sess = oval_agent_new_session(def_model, 'scap-rhel5-oval.xml')
> >>> res_model = oval_agent_get_results_model(sess)
> >>> print res_model
> 
> <Swig Object of type 'struct oval_results_model *' at 0x7f8700266660>
> 
> >>> from openscap_api import *
> >>> def_model = oval.definition_model_import('scap-rhel5-oval.xml')
> >>> sess = oval.agent.new_session(def_model, 'scap-rhel5-oval.xml')
> >>> res_model = oval.agent.get_results_model(sess)
> 
> Segmentation fault
> 
> Hope someone can help,
> 
> Josh Adams
> 
> _______________________________________________
> Open-scap-list mailing list
> Open-scap-list at redhat.com
> https://www.redhat.com/mailman/listinfo/open-scap-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openscap-instance-fix.patch
Type: text/x-patch
Size: 1590 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/open-scap-list/attachments/20100813/ef478a28/attachment.bin>


More information about the Open-scap-list mailing list