From 09ae4b2c18a18ed5ab34b7697006aa18697c4cec Mon Sep 17 00:00:00 2001 From: "S. Ota" <1632335+susumuota@users.noreply.github.com> Date: Fri, 21 Jun 2024 17:53:02 +0900 Subject: [PATCH] Fix uint32 uid issue #195 (#197) Signed-off-by: Susumu OTA <1632335+susumuota@users.noreply.github.com> --- bin/common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/common.h b/bin/common.h index 5f92253..8928137 100644 --- a/bin/common.h +++ b/bin/common.h @@ -95,11 +95,11 @@ unshare_userns(bool remap_root) char *uidmap = NULL, *gidmap = NULL; int rv = -1; - if (asprintf(&gidmap, "%d %d 1", remap_root ? 0 : getegid(), getegid()) < 0) { + if (asprintf(&gidmap, "%u %u 1", remap_root ? 0 : getegid(), getegid()) < 0) { gidmap = NULL; goto err; } - if (asprintf(&uidmap, "%d %d 1", remap_root ? 0 : geteuid(), geteuid()) < 0) { + if (asprintf(&uidmap, "%u %u 1", remap_root ? 0 : geteuid(), geteuid()) < 0) { uidmap = NULL; goto err; }