Skip to content

Commit

Permalink
Print error message when UID or GID mapping failed
Browse files Browse the repository at this point in the history
  • Loading branch information
Fak3 committed Jan 29, 2025
1 parent 053429c commit 7bc738a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/idtools/idtools.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ func GetRootUIDGID(uidMap, gidMap []IDMap) (int, int, error) {
} else {
uid, err = RawToHost(0, uidMap)
if err != nil {
logrus.Errorf("Container uses userid mappings, but does not map UID 0 (root)")
return -1, -1, err
}
}
Expand All @@ -97,6 +98,7 @@ func GetRootUIDGID(uidMap, gidMap []IDMap) (int, int, error) {
} else {
gid, err = RawToHost(0, gidMap)
if err != nil {
logrus.Errorf("Container uses groupid mappings, but does not map GID 0 (root)")
return -1, -1, err
}
}
Expand Down

0 comments on commit 7bc738a

Please sign in to comment.