RootPair returns the ID pair for the root user
()
| 51 | |
| 52 | // RootPair returns the ID pair for the root user |
| 53 | func (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. |
| 66 | func (i *IDMap) ToHost(pair User) (User, error) { |