Running 'sysctl -w kernel.apparmor_restrict_unprivileged_userns=0' early
in the livecd boot makes the most sense to me, but I could see us easily
creating a race condition against systemd-sysctl.service that might work
only in certain situations. If it's too hard to address that risk, would
it be feasible to load a profile specifically for the bwrap in the
livecd environment? Something like: 'echo "profile bwrap /usr/bin/bwrap
flags=(unconfined) { } " | apparmor_parser --replace --skip-cache'?This just needs to run after the filesystems are mounted and the parser is available (if it is available?) and before bwrap is run, right? -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to apparmor in Ubuntu. https://bugs.launchpad.net/bugs/2122675 Title: Cannot unshare userns in livecd Status in apparmor package in Ubuntu: Confirmed Bug description: Multiple components of Ubuntu Desktop daily-live are failing when trying to create a sandboxed user namespace: apparmor="DENIED" operation="userns_create" class="namespace" info="Userns create restricted - failed to find unprivileged_userns profile" error=-13 profile="unconfined" pid=9281 comm="bwrap" requested="userns_create" denied="userns_create" target="unprivileged_userns" execpath="/usr/bin/bwrap" This is seen affecting the loading of the wallpaper image (sandboxed through glycin -> bwrap) and the ubuntu-insights-collect.service (sandboxed through PrivateUsers=true in the unit file) Minimal reproducer: $ python3 >>> import os >>> os.unshare(os.CLONE_NEWUSER) Traceback (most recent call last): File "<python-input-1>", line 1, in <module> os.unshare(os.CLONE_NEWUSER) ~~~~~~~~~~^^^^^^^^^^^^^^^^^^ PermissionError: [Errno 13] Permission denied To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/2122675/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : [email protected] Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp

