mirror of
https://github.com/rancher/os.git
synced 2025-08-31 14:23:11 +00:00
Enable SELinux
This commit is contained in:
@@ -20,6 +20,7 @@ INITRD_DIR=${BUILD}/initrd
|
||||
rm -rf ${INITRD_DIR}/{usr,init}
|
||||
mkdir -p ${INITRD_DIR}/usr/{bin,share/ros}
|
||||
mkdir -p ${INITRD_DIR}/var/lib/system-docker
|
||||
mkdir -p ${INITRD_DIR}/usr/etc/selinux/ros/{policy,contexts}
|
||||
|
||||
if [ "$IS_ROOTFS" == "0" ]; then
|
||||
cp -rf ${BUILD}/kernel/lib ${INITRD_DIR}/usr/
|
||||
@@ -34,6 +35,12 @@ ln -s usr/bin/ros ${INITRD_DIR}/init
|
||||
ln -s bin ${INITRD_DIR}/usr/sbin
|
||||
ln -s usr/sbin ${INITRD_DIR}/sbin
|
||||
|
||||
cp assets/selinux/config ${INITRD_DIR}/usr/etc/selinux/
|
||||
cp assets/selinux/policy.29 ${INITRD_DIR}/usr/etc/selinux/ros/policy/
|
||||
cp assets/selinux/seusers ${INITRD_DIR}/usr/etc/selinux/ros/
|
||||
cp assets/selinux/lxc_contexts ${INITRD_DIR}/usr/etc/selinux/ros/contexts/
|
||||
cp assets/selinux/failsafe_context ${INITRD_DIR}/usr/etc/selinux/ros/contexts/
|
||||
|
||||
DFS_ARCH=$(docker create ${DFS_ARCH_IMAGE})
|
||||
trap "docker rm -fv ${DFS_ARCH}" EXIT
|
||||
|
||||
|
Reference in New Issue
Block a user