From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by passt.top (Postfix, from userid 1000) id CD4535A061B; Fri, 02 Oct 2026 09:00:50 +0200 (CEST) From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH] util: Make setting uidmap and gidmap errors non-fatal Date: Fri, 2 Oct 2026 09:00:50 +0200 Message-ID: <20261002070050.2065232-1-sbrivio@redhat.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: 7SWRRGARZZHZJQT7LSMEWI2Y4TQIRM3N X-Message-ID-Hash: 7SWRRGARZZHZJQT7LSMEWI2Y4TQIRM3N X-MailFrom: sbrivio@passt.top X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 Signed-off-by: Stefano Brivio --- 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