selinux/python
Christian Göttsche 4613038d8e sepolgen-ifgen: refactor default policy path retrieval
On a SELinux disabled system the python call
`selinux.security_policyvers()` will fail.

Move the logic to find a binary policy from the python script
`sepolgen-ifgen` to the C-helper `sepolgen-ifgen-attr-helper`.
Change the helper command line interface to accept an optional policy
path as second argument.  If not given try the current loaded policy
(`selinux_current_policy_path`) and if running on a SELinux disabled
system iterate over the default store path appending policy versions
starting at the maximum supported policy version
(`sepol_policy_kern_vers_max`).

This changes the helper command line interface from:
    sepolgen-ifgen-attr-helper policy_file out_file
to
    sepolgen-ifgen-attr-helper out_file [policy_file]
and adds a linkage to libselinux.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
2020-06-18 19:32:07 +02:00
..
audit2allow sepolgen-ifgen: refactor default policy path retrieval 2020-06-18 19:32:07 +02:00
chcat python/chcat: remove unnecessary assignment 2019-09-17 10:38:49 -04:00
semanage semanage-node.8: describe netmask 2020-06-09 15:44:14 -04:00
sepolgen refparser: add missing newline after error message 2020-06-18 19:31:51 +02:00
sepolicy python/sepolicy: Use xml.etree.ElementTree.Element.iter() 2020-06-18 19:29:21 +02:00
COPYING Add COPYING files for new subdirs. 2016-11-16 11:19:51 -05:00
Makefile python: run all the tests with "make test" 2019-01-08 10:15:46 +01:00
VERSION Update VERSIONs to 3.1-rc1 for release. 2020-05-15 15:54:08 +02:00