2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-08-03 16:07:00 +00:00

Some fixup of SELinux contexts for EL10 diskless boot

Unfortunately, the problem of urlmount's selinux context is left open.

urlmount starts before policy load, preventing transition.

However the policy blocks access urlmount needs when loaded.
This commit is contained in:
Jarrod Johnson
2026-07-23 15:58:07 -04:00
parent 57418696f1
commit 61e0524a56
@@ -4,6 +4,7 @@ if [[ "$confluent_whost" == *:* ]] && [[ "$confluent_whost" != "["* ]]; then
confluent_whost="[$confluent_mgr]"
fi
mkdir -p /mnt/remoteimg /mnt/remote /mnt/overlay /sysroot
set_selinux_context system_u:object_r:bin_t:s0 /opt/confluent/bin/urlmount
if [ "untethered" = "$(getarg confluent_imagemethod)" -o "uncompressed" = "$(getarg confluent_imagemethod)" ]; then
mount -t tmpfs untethered /mnt/remoteimg
curl https://$confluent_whost/confluent-public/os/$confluent_profile/rootimg.sfs -o /mnt/remoteimg/rootimg.sfs
@@ -181,6 +182,7 @@ if [ $TETHERED -eq 1 ]; then
else
rm -rf /lib/modules/$(uname -r) /lib/modules/$(uname -r)-ramfs /lib/firmware-ramfs /usr/lib64/libcrypto.so* /usr/lib64/systemd/ /kernel/ /usr/bin/ /usr/sbin/ /usr/libexec/
fi
set_selinux_context system_u:object_r:root_t:s0 /sysroot
if grep debugssh /proc/cmdline >& /dev/null; then
exec /opt/confluent/bin/start_root
else