public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: DJ Delorie via Libc-alpha <libc-alpha@sourceware.org>
Cc: Joseph Myers <joseph@codesourcery.com>,  DJ Delorie <dj@redhat.com>
Subject: Re: [patch v6] Allow for unpriviledged nested containers
Date: Mon, 11 Apr 2022 16:33:10 +0200	[thread overview]
Message-ID: <8735ijlmft.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <xn8rsjv1cu.fsf@greed.delorie.com> (DJ Delorie via Libc-alpha's message of "Tue, 05 Apr 2022 14:20:17 -0400")

* DJ Delorie via Libc-alpha:

> Maybe we need a Hurd trybot?  ;-)
>
> I see two options: #ifdef the variable, or mark it attribute-unused.
> Preferences?
>
> diff --git a/support/test-container.c b/support/test-container.c
> index c837c4d7580..79d0e052d1c 100644
> --- a/support/test-container.c
> +++ b/support/test-container.c
> @@ -756,7 +756,9 @@ main (int argc, char **argv)
>    /* If set, the test runs as root instead of the user running the testsuite.  */
>    int be_su = 0;
>    int require_pidns = 0;
> +#ifdef CLONE_NEWNS
>    const char *pidns_comment = NULL;
> +#endif
>    int do_proc_mounts = 0;
>    int UMAP;
>    int GMAP;
> @@ -1046,8 +1048,10 @@ main (int argc, char **argv)
>  	    else if (nt >= 1 && strcmp (the_words[0], "pidns") == 0)
>  	      {
>  		require_pidns = 1;
> +#ifdef CLONE_NEWNS
>  		if (nt > 1)
>  		  pidns_comment = concat_words (the_words + 1, nt - 1);
> +#endif
>  	      }
>  	    else if (nt == 3 && strcmp (the_words[0], "mkdirp") == 0)
>  	      {

This also needs:

diff --git a/support/test-container.c b/support/test-container.c
index 79d0e052d1..9dde784bf0 100644
--- a/support/test-container.c
+++ b/support/test-container.c
@@ -231,7 +231,7 @@ concat (const char *str, ...)
 }
 
 /* Like the above, but put spaces between words.  Caller frees.  */
-static char *
+static inline char *
 concat_words (char **words, int num_words)
 {
   int len = 0;

Or something like it.

Thanks,
Florian


      reply	other threads:[~2022-04-11 14:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-11  3:38 [patch v5] " DJ Delorie
2022-03-28 20:41 ` Carlos O'Donell
2022-03-29  3:53   ` [patch v6] " DJ Delorie
2022-04-04 14:17     ` Carlos O'Donell
2022-04-04 18:34       ` DJ Delorie
2022-04-05 15:57       ` Joseph Myers
2022-04-05 18:20         ` DJ Delorie
2022-04-11 14:33           ` Florian Weimer [this message]

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=8735ijlmft.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=dj@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    /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).