public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: passt-dev@passt.top
Cc: David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH] util: Make setting uidmap and gidmap errors non-fatal
Date: Fri,  2 Oct 2026 09:00:50 +0200	[thread overview]
Message-ID: <20261002070050.2065232-1-sbrivio@redhat.com> (raw)

Starting from commit 7bf1595c9242 ("isolation: Don't create our userns
as nobody"), we unconditionally set uidmap and gidmap in the detached
user namespace.

If passt is started from a detached PID namespace, but /proc hasn't
been remounted to reflect this, we'll fail to write those entries.

That's actually fine as uidmap and gidmap are something that, strictly
speaking, we only need to write in pasta mode when a command is
detached (it's now done in all cases for simplicity).

Warn, because it's not the expected behaviour (/proc should probably
be remounted first), but don't fail on that.

Link: https://github.com/containers/crun/issues/2283
Suggested-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
 util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util.c b/util.c
index c02aea9..ff1f19f 100644
--- a/util.c
+++ b/util.c
@@ -1147,5 +1147,5 @@ void make_ugid_map(pid_t pid, uid_t uid, gid_t gid)
 	if (write_file(uidmap_path, uidmap) ||
 	    write_file(setgroups_path, "deny") ||
 	    write_file(gidmap_path, gidmap))
-		die("Couldn't configure user mappings");
+		warn("Couldn't configure user mappings");
 }
-- 
2.43.0


                 reply	other threads:[~2026-10-02  7:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261002070050.2065232-1-sbrivio@redhat.com \
    --to=sbrivio@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    /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.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

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 IMAP folder(s).