Skip to content

Commit

Permalink
wrappers/editor: workaround Apparmor unpriv userns mediation
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Deziel <[email protected]>
  • Loading branch information
simondeziel authored and tomponline committed Oct 6, 2023
1 parent f283052 commit e17a59a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion snapcraft/wrappers/editor
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,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
Expand Down

0 comments on commit e17a59a

Please sign in to comment.