diff --git a/snapcraft/wrappers/remote-viewer b/snapcraft/wrappers/remote-viewer index b8f178421..87429d3c7 100755 --- a/snapcraft/wrappers/remote-viewer +++ b/snapcraft/wrappers/remote-viewer @@ -15,7 +15,8 @@ run_cmd() { } USERNS=1 -[ -e /proc/sys/kernel/unprivileged_userns_clone ] && grep -q 0 /proc/sys/kernel/unprivileged_userns_clone && USERNS=0 +[ -e /proc/sys/kernel/unprivileged_userns_clone ] && grep -qxF 0 /proc/sys/kernel/unprivileged_userns_clone && USERNS=0 +[ -e /proc/sys/kernel/apparmor_restrict_unprivileged_userns ] && grep -qxF 1 /proc/sys/kernel/apparmor_restrict_unprivileged_userns && USERNS=0 find_and_spawn() { for path in / /usr/ /usr/local/; do