A type which will reset SELinux back to enforcing mode when dropped.
This is a workaround for the deep difficulties in trying to reliably
gain the mac_admin permission (install_t).
A wrapper for creating a directory, also optionally setting a SELinux label.
The provided skip parameter is a device/inode that we will ignore (and not traverse).
Given a policy, ensure the target file path has a security.selinux label.
If the path already is labeled, this function is a no-op, even if
the policy would default to a different label.
Given the policy, relabel the target file or directory.
Optionally, an override for the path can be provided
to set the label as if the target has that filename.
Check if the current process has the capability to write SELinux security
contexts unknown to the current policy. In SELinux terms this capability is
gated under mac_admin (admin control over SELinux state), and in the Fedora
policy at least itβs part of install_t.