public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Simon Chopin <simon.chopin@canonical.com>
To: Xi Ruoyao <xry111@xry111.site>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] test-container: gracefully handle AppArmor containment
Date: Tue, 6 Feb 2024 12:01:38 +0100	[thread overview]
Message-ID: <CAOOWow3mPRU9DpSJbLMg-hY2jAAbHjA1opXN_LkjU+P+yUqdKg@mail.gmail.com> (raw)
In-Reply-To: <b8321a7ab801899a5d92ac645f5dee063e5a40d7.camel@xry111.site>

Hi,

On jeu. 01 févr. 2024 20:20:09, Xi Ruoyao wrote:
> On Thu, 2024-02-01 at 13:01 +0100, Simon Chopin wrote:
> > Recent AppArmor containment allows restricting unprivileged user
> > namespaces, which is enabled by default on recent Ubuntu systems.
> >
> > When that happens, the affected tests will now be considered unsupported
> > rather than simply failing.
> >
> > Further information:
> >
> > * https://gitlab.com/apparmor/apparmor/-/wikis/unprivileged_userns_restriction
> > * https://ubuntu.com/blog/ubuntu-23-10-restricted-unprivileged-user-namespaces
> >
> > Signed-off-by: Simon Chopin <simon.chopin@canonical.com>
> > ---
> >  support/test-container.c | 8 ++++++--
> >  1 file changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/support/test-container.c b/support/test-container.c
> > index adf2b30215..a04ae07807 100644
> > --- a/support/test-container.c
> > +++ b/support/test-container.c
> > @@ -682,6 +682,9 @@ check_for_unshare_hints (int require_pidns)
> >      { "/proc/sys/kernel/unprivileged_userns_clone", 0, 1, 0 },
> >      /* ALT Linux has an alternate way of doing the same.  */
> >      { "/proc/sys/kernel/userns_restrict", 1, 0, 0 },
> > +    /* AppArmor can also disable unprivileged user namespaces */
> > +    { "/proc/sys/kernel/apparmor_restrict_unprivileged_userns", 1, 0, 0 },
> > +    { "/proc/sys/user/max_pid_namespaces", 0, 1024, 1 },
>
> Why are you duplicating this entry?

My mistake. This is fixed in the second revision of the patch.

Thanks!

  reply	other threads:[~2024-02-06 11:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-01 12:01 Simon Chopin
2024-02-01 12:20 ` Xi Ruoyao
2024-02-06 11:01   ` Simon Chopin [this message]
2024-02-06 10:59 ` [PATCH v2] tests: gracefully handle AppArmor userns containment Simon Chopin
2024-02-13  7:36   ` Maxim Kuvyrkov
2024-02-14  7:53     ` Florian Weimer
2024-02-16 15:57     ` Simon Chopin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOOWow3mPRU9DpSJbLMg-hY2jAAbHjA1opXN_LkjU+P+yUqdKg@mail.gmail.com \
    --to=simon.chopin@canonical.com \
    --cc=libc-alpha@sourceware.org \
    --cc=xry111@xry111.site \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).