Skip to main content

Module selabel

Module selabel 

Source
Expand description

SELinux security context labeling for filesystem trees.

This module implements SELinux policy parsing and file labeling functionality. It reads SELinux policy files (file_contexts, file_contexts.subs, etc.) and applies appropriate security.selinux extended attributes to filesystem nodes. The implementation uses pcre2 for compatibility with selinux regex (same library selinux uses)

Constants§

XATTR_SECURITY_SELINUX
The SELinux security context extended attribute name.

Functions§

open_file
Open a file in the composefs store, handling inline vs external files.
selabel
Applies SELinux security contexts to all files in a filesystem tree.
selabel_from_dir
Applies SELinux security contexts by reading policy files from an on-disk directory.