Skip to content

Commit

Permalink
wrappers/editor: don't try to read Apparmor unpriv userns/unconfined …
Browse files Browse the repository at this point in the history
…files

Those files are not world-readable and LXD should already have done the proper
changes to have `unshare` work anyway.

Signed-off-by: Simon Deziel <[email protected]>
  • Loading branch information
simondeziel committed Dec 12, 2023
1 parent 73fe48b commit 0f91f91
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions snapcraft/wrappers/editor
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ run_cmd() {

USERNS=1
[ -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
[ -e /proc/sys/kernel/apparmor_restrict_unprivileged_unconfined ] && grep -qxF 1 /proc/sys/kernel/apparmor_restrict_unprivileged_unconfined && USERNS=0

find_and_spawn() {
for path in / /usr/ /usr/local/; do
Expand Down

0 comments on commit 0f91f91

Please sign in to comment.