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.
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| apt | Loading commit data... | |
| async_status | Loading commit data... | |
| async_wrapper | Loading commit data... | |
| command | Loading commit data... | |
| copy | Loading commit data... | |
| facter | Loading commit data... | |
| failtest | Loading commit data... | |
| fetch | Loading commit data... | |
| file | Loading commit data... | |
| git | Loading commit data... | |
| group | Loading commit data... | |
| ohai | Loading commit data... | |
| ping | Loading commit data... | |
| service | Loading commit data... | |
| setup | Loading commit data... | |
| shell | Loading commit data... | |
| slurp | Loading commit data... | |
| template | Loading commit data... | |
| user | Loading commit data... | |
| virt | Loading commit data... | |
| yum | Loading commit data... |