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).
The type of the kernelβs unlabeled initial context. Files with it (e.g.
created while SELinux was disabled) need relabeling just like files without
any label.
A wrapper for atomically writing a file, also optionally setting a SELinux label.
The label is looked up for destname as if root were /, so pass the
directory that stands for the targetβs root, never a subdirectory of it.
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 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.