Documentation
¶
Index ¶
Constants ¶
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.