Skip to content

Commit 1bbeb12

Browse files
committed
Print error message when UID or GID mapping failed
Refs containers/crun#1648 Signed-off-by: Evstifeev Roman <[email protected]>
1 parent 053429c commit 1bbeb12

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/idtools/idtools.go

+2
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ func GetRootUIDGID(uidMap, gidMap []IDMap) (int, int, error) {
8989
} else {
9090
uid, err = RawToHost(0, uidMap)
9191
if err != nil {
92+
logrus.Errorf("Container uses userid mappings, but does not map UID 0 (root)")
9293
return -1, -1, err
9394
}
9495
}
@@ -97,6 +98,7 @@ func GetRootUIDGID(uidMap, gidMap []IDMap) (int, int, error) {
9798
} else {
9899
gid, err = RawToHost(0, gidMap)
99100
if err != nil {
101+
logrus.Errorf("Container uses groupid mappings, but does not map GID 0 (root)")
100102
return -1, -1, err
101103
}
102104
}

0 commit comments

Comments
 (0)