selinux

package
v3.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SelinuxTargetedContextFile = selinuxTargetedPath + "/contexts/files/file_contexts"
)

Variables

This section is empty.

Functions

func ChrootedSystemRelabel

func ChrootedSystemRelabel(ctx context.Context, s *sys.System, rootDir string, snapshotted []string, shared []string) error

ChrootedSystemRelabel applies the SE Linux labels based on the targeted policy found within the given root path. Runs the same logic as RelabelSystem method but running inside a chroot environment.

func SystemRelabel

func SystemRelabel(ctx context.Context, s *sys.System, rootDir string, snapshotted []string, shared []string) error

SystemRelabel applies the SE Linux labels based on the targeted policy found within the given root path. It force applies the labels under the given root except for the given shared RW paths. This is to prevent runtime changes during the upgrades as RW paths are potentially in use for current processes. For snapshotted RW paths it applies SE Linux labels without force flag as it might include customized content merged with stock OS content. If at least one shared RW path is provided it also sets the .autorelabel file to trigger relabelling at boot and relabel the excluded paths.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL