forked from openshift/os
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a systemd unit to load custom SELinux rules in SCOS
This commit implements a systemd unit to apply custom SELinux modules in SCOS shipped as CILs in the read-only /usr/lib/okd/selinux/ folder. Refers openshift#1555
- Loading branch information
1 parent
0ef712a
commit a19f1b3
Showing
4 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
enable okd-selinux.service |
12 changes: 12 additions & 0 deletions
12
overlay.d/50scos/usr/lib/systemd/system/okd-selinux.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Unit] | ||
Description=Apply custom SELinux policies in /usr/lib/okd/selinux/*.cil | ||
Documentation= | ||
Before=network-pre.target | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/usr/bin/find /usr/lib/okd/selinux -type f -name '*.cil' -exec /usr/sbin/semodule -i {} \; | ||
RemainAfterExit=yes | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,6 @@ | |
# - c9s-appstream-mirror | ||
|
||
#packages: | ||
|
||
ostree-layers: | ||
- overlay/50scos |