selinux_hook.chroot
This commit is contained in:
parent
1277b5dc97
commit
0269734d8d
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue