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 regex automata for efficient pattern matching against file paths and types.

Structsยง

Policy ๐Ÿ”’

Constantsยง

XATTR_SECURITY_SELINUX
The SELinux security context extended attribute name.

Functionsยง

openat
Open a file in the composefs store, handling inline vs external files.
parse_config ๐Ÿ”’
process_spec_file ๐Ÿ”’
process_subs_file ๐Ÿ”’
relabel ๐Ÿ”’
relabel_dir ๐Ÿ”’
relabel_inode ๐Ÿ”’
relabel_leaf ๐Ÿ”’
selabel
Applies SELinux security contexts to all files in a filesystem tree.
strip_selinux_labels ๐Ÿ”’