Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apparmor restrict unpriv editor (5.0-edge) #248

Conversation

simondeziel
Copy link
Member

Ubuntu Mantic 23.10 kernels before 6.5.0-14 (and maybe earlier) have /proc/sys/kernel/apparmor_restrict_unprivileged_userns and /proc/sys/kernel/apparmor_restrict_unprivileged_unconfined only root accessible.

While LXD can disable those restrictions to make unpriv containers work, the builtin editors used as fallback through unshare might trip into those files and cause noisy errors. Since the updated kernels have the restriction disabled by default and LXD disable them anyway, let's avoid the noisy errors and stop trying to read them in the fallback editor.

This is a cherry-pick from latest-edge:

$ git cherry-pick be91e3426d120430ab7d42ba4c579c2784362787
[apparmor-restrict-unpriv-editor-5.0-edge 0f91f91] wrappers/editor: don't try to read Apparmor unpriv userns/unconfined files
 Date: Tue Oct 10 17:07:01 2023 -0400
 1 file changed, 2 deletions(-)

…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]>
@simondeziel
Copy link
Member Author

Closing in favor of #251.

@simondeziel simondeziel deleted the apparmor-restrict-unpriv-editor-5.0-edge branch January 2, 2024 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant