Setting context in early boot

"Frederick Grose" <[email protected]> Mon, 05 Sep 2022 18:52:39 -0000
Newsgroups gmane.linux.redhat.fedora.selinux
Message-ID <[email protected]>
I have a general scoping question on setting SELinux context on files/directories during early boot.
I'm working on a feature in dracut to implement general stacking of filesystem hierarchies via OverlayFS for the root filesystem within the dmsquash-live-root module.
How should I address the setting of context for new files, directories, or links needed to assemble the components for the OverlayFS mount?

For example, when I 
  mkdir -m 0755 -p --context=system_u:object_r:root_t:s0 /run/somemountpoint
I get this warning in the journal:
  mkdir: warning: ignoring --context; it requires an SELinux/SMACK-enabled kernel

If the SELinux code is not active at this early stage, what is to be done?
_______________________________________________
selinux mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue