[Open-scap] Sets and unions...

Peter Vrabec pvrabec at redhat.com
Fri May 27 12:25:41 UTC 2011


Hi David,

thnx.  you for pointing this out.

Before we get to implementation it would be worth to clarify desired 
functionality. I'm not sure about it. 

What is the key for Set Operations
* Items and values of an object?
* Object ID?

If I look at ovaldi(AbsObjectCollector.cpp), I see it use Objects ID. We also 
use Object ID (worker.c). Maybe I don't know how IDs  should be assigned, but 
this doesn't make much sense to me. Real use case might clear up the issue.

What is your use case? Can you provide sample of the OVAL content?

thnx.
Peter.



On Thursday, May 26, 2011 06:09:09 PM David Jaccard wrote:
> Hello!
> 
> I need to use a set and it looks like the union operator is not removing
> duplicate entries from the final list of values.
> 
> http://oval.mitre.org/language/version5.6/ovaldefinition/documentation/oval
> -definitions-schema.html#SetOperatorEnumeration
> 
> and
> 
> openscap/src/OVAL/probes/probe/worker.c:593 ... ish.   :)
> 
> I would like to make a patch for you!  I did some digging and I don't see a
> SEXP_list_* function for determining whether a particular value is already
> in a set.  If you had one, it would be really easy to wrap the call that
> adds the new value.  (Though I'm not sure about falling through into the
> COMPLEMENT operation...  I've asked the OVAL list if INTERSECTION and
> COMPLEMENT were to remove duplicates as well.)
> 
> What do you think?
> 
> - Dave Jaccard
> DoD DREN/HPCMP
> [contractor]
> 
> 
> _______________________________________________
> Open-scap-list mailing list
> Open-scap-list at redhat.com
> https://www.redhat.com/mailman/listinfo/open-scap-list




More information about the Open-scap-list mailing list