file
11.4 KB
-
Update file module selinux-awareness · 5be20f87
This adds selinux_mls_enabled() and selinux_enabled() to detect a) whether selinux is MLS aware (ie supports selevel) and b) whether selinux is enabled. If selinux is not enabled, all selinux operations are punted on -- same as if python's selinux module were not available. In set_context_if_different(), I now iterate over the current context instead of the context argument. Even if the system supports MLS, it may not return the selevel from selinux.lgetfilecon(). Lastly, this drops selinux_has_selevel() in lieu of the current approach.
Stephen Fromm committed