MCPcopy
hub / github.com/containerd/containerd / RootPair

Method RootPair

internal/userns/idmap.go:53–63  ·  view source on GitHub ↗

RootPair returns the ID pair for the root user

()

Source from the content-addressed store, hash-verified

51
52// RootPair returns the ID pair for the root user
53func (i *IDMap) RootPair() (User, error) {
54 uid, err := toHost(0, i.UidMap)
55 if err != nil {
56 return invalidUser, err
57 }
58 gid, err := toHost(0, i.GidMap)
59 if err != nil {
60 return invalidUser, err
61 }
62 return User{Uid: uid, Gid: gid}, nil
63}
64
65// ToHost returns the host user ID pair for the container ID pair.
66func (i *IDMap) ToHost(pair User) (User, error) {

Callers 4

createSnapshotMethod · 0.95
createSnapshotMethod · 0.95
resolveSnapshotOptionsFunction · 0.80
TestRootPairFunction · 0.80

Calls 1

toHostFunction · 0.85

Tested by 1

TestRootPairFunction · 0.64