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).
Recursively ensure all files under a directory have SELinux labels.
Uses the walk API with noxdev and skip_mountpoints to avoid crossing
mount point boundaries
(e.g. into sysfs, procfs, etc.).
The provided skip parameter is a device/inode pair that we will ignore
(and not traverse into).
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.