Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
snapcraft/commands/lxc: escape Apparmor as late as possible
Most of the `lxc` command uses don't require escaping the Apparmor profile. However, executing an editor (`lxc config edit`) or interacting with the VGA console (`lxc console --type=vga`) among other things requires the escaping. Rather than escaping at the begining and re-exec'ing the `lxc` wrapper script, let's escape just when calling the actual command. The aim is to avoid the overhead of calling `/bin/sh` again and rechecking the Apparmor label. Signed-off-by: Simon Deziel <[email protected]> (cherry picked from commit 323ae72)
- Loading branch information