Skip to content

Commit

Permalink
Fix uint32 uid issue #195 (#197)
Browse files Browse the repository at this point in the history
Signed-off-by: Susumu OTA <[email protected]>
  • Loading branch information
susumuota authored Jun 21, 2024
1 parent c7dc4a6 commit 09ae4b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 09ae4b2

Please sign in to comment.