selinux_hook.chroot

This commit is contained in:
manuel 2024-07-12 12:39:19 +00:00
parent 1277b5dc97
commit 0269734d8d
2 changed files with 6 additions and 6 deletions

View File

@ -7,8 +7,8 @@
set -e set -e
# Install required SELinux packages # Install required SELinux packages
chroot $1 apt-get update chroot $1 apt update
chroot $1 apt-get -y install selinux-basics selinux-policy-default auditd chroot $1 apt -y install selinux-basics selinux-policy-default auditd
# Initialize SELinux # Initialize SELinux
chroot $1 selinux-activate chroot $1 selinux-activate
@ -22,7 +22,7 @@ chroot $1 systemctl enable selinux-policy-activate
# Disable AppArmor # Disable AppArmor
chroot $1 systemctl disable apparmor chroot $1 systemctl disable apparmor
chroot $1 systemctl stop apparmor chroot $1 systemctl stop apparmor
chroot $1 apt-get -y purge apparmor chroot $1 apt -y purge apparmor
# Additional configuration (optional) # Additional configuration (optional)
# Here you can add commands to adjust policies or configure additional rules # Here you can add commands to adjust policies or configure additional rules

View File

@ -7,8 +7,8 @@
set -e set -e
# Install required SELinux packages # Install required SELinux packages
chroot $1 apt-get update chroot $1 apt update
chroot $1 apt-get -y install selinux-basics selinux-policy-default auditd chroot $1 apt -y install selinux-basics selinux-policy-default auditd
# Initialize SELinux # Initialize SELinux
chroot $1 selinux-activate chroot $1 selinux-activate
@ -22,7 +22,7 @@ chroot $1 systemctl enable selinux-policy-activate
# Disable AppArmor # Disable AppArmor
chroot $1 systemctl disable apparmor chroot $1 systemctl disable apparmor
chroot $1 systemctl stop apparmor chroot $1 systemctl stop apparmor
chroot $1 apt-get -y purge apparmor chroot $1 apt -y purge apparmor
# Additional configuration (optional) # Additional configuration (optional)
# Here you can add commands to adjust policies or configure additional rules # Here you can add commands to adjust policies or configure additional rules