Commit Graph

5 Commits

Author SHA1 Message Date
Chris PeBenito
9939f5241e Implement MLS range tests on several context-based queries. 2015-02-24 15:50:08 -05:00
Chris PeBenito
8ba3cf16f5 Change all unit tests for "unset" query to use full comparison.
Fully compare the lists rather than only counting objects.

Also fix comparison problem in Nodecon and Genfscon. In libqpol, the all
genfscons/nodecons iterators allocate new objects, so the pointer
comparison in PolicySymbol fails.
2014-11-25 13:24:36 -05:00
Chris PeBenito
448305f2ef Add NodeconQuery functions for matching on IP version. 2014-11-12 13:39:36 -05:00
Chris PeBenito
4798e10706 Work around IPv6Network constructor expanded netmask issue.
Python 3.3's IPv6Network constructor does not support an expanded netmask
for specifying the network, only CIDR.  Convert all netmasks to CIDR.

The code does not verify that the orignal expanded netmask from the policy
is correct; it counts all set bits in the netmask.

Also add IPv6 NodeconQuery unit tests.
2014-11-10 20:14:33 -05:00
Chris PeBenito
fc597fed99 Add nodecon query.
It could use IPv6 tests, but those have the same code paths as IPv4.
2014-11-05 13:09:35 -05:00