mirror of
https://git.launchpad.net/livecd-rootfs
synced 2026-04-16 22:11:03 +00:00
Disable AppArmor user namespace restrictions on the live ISOs for Kubuntu and Ubuntu Unity
This commit is contained in:
parent
1975bbd52b
commit
edec1f4a3f
@ -1567,7 +1567,8 @@ case $PROJECT:${SUBPROJECT:-} in
|
|||||||
ubuntu-cpc:*|ubuntu-server:live|ubuntu:desktop-preinstalled| \
|
ubuntu-cpc:*|ubuntu-server:live|ubuntu:desktop-preinstalled| \
|
||||||
ubuntu-wsl:*|ubuntu-mini-iso:*|ubuntu-test-iso:*|ubuntu:|ubuntu:dangerous|ubuntu-oem:*| \
|
ubuntu-wsl:*|ubuntu-mini-iso:*|ubuntu-test-iso:*|ubuntu:|ubuntu:dangerous|ubuntu-oem:*| \
|
||||||
ubuntustudio:*|edubuntu:*|ubuntu-budgie:*|ubuntucinnamon:*|xubuntu:*| \
|
ubuntustudio:*|edubuntu:*|ubuntu-budgie:*|ubuntucinnamon:*|xubuntu:*| \
|
||||||
ubuntukylin:*|ubuntu-mate:*|ubuntu-core-installer:*|lubuntu:*)
|
ubuntukylin:*|ubuntu-mate:*|ubuntu-core-installer:*|lubuntu:*|kubuntu:*| \
|
||||||
|
ubuntu-unity:*)
|
||||||
# Ensure that most things e.g. includes.chroot are copied as is
|
# Ensure that most things e.g. includes.chroot are copied as is
|
||||||
for entry in ${LIVECD_ROOTFS_ROOT}/live-build/${PROJECT}/*; do
|
for entry in ${LIVECD_ROOTFS_ROOT}/live-build/${PROJECT}/*; do
|
||||||
case $entry in
|
case $entry in
|
||||||
|
|||||||
11
live-build/kubuntu/hooks/020-kubuntu-live.chroot_early
Normal file
11
live-build/kubuntu/hooks/020-kubuntu-live.chroot_early
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
cat <<EOF > /etc/sysctl.d/20-apparmor.conf
|
||||||
|
# AppArmor restrictions of unprivileged user namespaces
|
||||||
|
|
||||||
|
# Disables AppArmor user namespace restrictions on the live ISO.
|
||||||
|
kernel.apparmor_restrict_unprivileged_userns = 0
|
||||||
|
kernel.apparmor_restrict_unprivileged_unconfined = 1
|
||||||
|
EOF
|
||||||
@ -1,16 +1,5 @@
|
|||||||
# AppArmor restrictions of unprivileged user namespaces
|
# AppArmor restrictions of unprivileged user namespaces
|
||||||
|
|
||||||
# Allows to restrict the use of unprivileged user namespaces to applications
|
# Disables AppArmor user namespace restrictions on the live ISO.
|
||||||
# which have an AppArmor profile loaded which specifies the userns
|
|
||||||
# permission. All other applications (whether confined by AppArmor or not) will
|
|
||||||
# be denied the use of unprivileged user namespaces.
|
|
||||||
#
|
|
||||||
# See
|
|
||||||
# https://gitlab.com/apparmor/apparmor/-/wikis/unprivileged_userns_restriction
|
|
||||||
# https://gitlab.com/apparmor/apparmor/-/wikis/unprivileged_unconfined
|
|
||||||
#
|
|
||||||
# If it is desired to disable this restriction, it is preferable to create an
|
|
||||||
# additional file named /etc/sysctl.d/20-apparmor.conf which will override this
|
|
||||||
# current file and sets this value to 0 rather than editing this current file
|
|
||||||
kernel.apparmor_restrict_unprivileged_userns = 0
|
kernel.apparmor_restrict_unprivileged_userns = 0
|
||||||
kernel.apparmor_restrict_unprivileged_unconfined = 1
|
kernel.apparmor_restrict_unprivileged_unconfined = 1
|
||||||
|
|||||||
@ -0,0 +1,11 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
cat <<EOF > /etc/sysctl.d/20-apparmor.conf
|
||||||
|
# AppArmor restrictions of unprivileged user namespaces
|
||||||
|
|
||||||
|
# Disables AppArmor user namespace restrictions on the live ISO.
|
||||||
|
kernel.apparmor_restrict_unprivileged_userns = 0
|
||||||
|
kernel.apparmor_restrict_unprivileged_unconfined = 1
|
||||||
|
EOF
|
||||||
@ -18,18 +18,7 @@ EOF
|
|||||||
cat <<EOF > /etc/sysctl.d/20-apparmor.conf
|
cat <<EOF > /etc/sysctl.d/20-apparmor.conf
|
||||||
# AppArmor restrictions of unprivileged user namespaces
|
# AppArmor restrictions of unprivileged user namespaces
|
||||||
|
|
||||||
# Allows to restrict the use of unprivileged user namespaces to applications
|
# Disables AppArmor user namespace restrictions on the live ISO.
|
||||||
# which have an AppArmor profile loaded which specifies the userns
|
|
||||||
# permission. All other applications (whether confined by AppArmor or not) will
|
|
||||||
# be denied the use of unprivileged user namespaces.
|
|
||||||
#
|
|
||||||
# See
|
|
||||||
# https://gitlab.com/apparmor/apparmor/-/wikis/unprivileged_userns_restriction
|
|
||||||
# https://gitlab.com/apparmor/apparmor/-/wikis/unprivileged_unconfined
|
|
||||||
#
|
|
||||||
# If it is desired to disable this restriction, it is preferable to create an
|
|
||||||
# additional file named /etc/sysctl.d/20-apparmor.conf which will override this
|
|
||||||
# current file and sets this value to 0 rather than editing this current file
|
|
||||||
kernel.apparmor_restrict_unprivileged_userns = 0
|
kernel.apparmor_restrict_unprivileged_userns = 0
|
||||||
kernel.apparmor_restrict_unprivileged_unconfined = 1
|
kernel.apparmor_restrict_unprivileged_unconfined = 1
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user