ensure_labeled

Function ensure_labeled 

Source
pub(crate) fn ensure_labeled(
    root: &Dir,
    path: &Utf8Path,
    metadata: &Metadata,
    policy: &SePolicy,
) -> Result<SELinuxLabelState>
Expand description

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.