mirror of
https://github.com/containers/skopeo.git
synced 2026-02-03 15:58:52 +00:00
When we have cgo, use fgetpwent() to try to look up user IDs and primary GIDs in containers. If that fails for any reason (or if we don't have cgo), fall back to doing what we were doing before (i.e., trying to look up the information on the host). Signed-off-by: Nalin Dahyabhai <nalin@redhat.com> Closes: #63 Approved by: rhatdan
20 lines
487 B
Go
20 lines
487 B
Go
// +build !cgo !linux
|
|
|
|
package buildah
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
func lookupUserInContainer(rootdir, username string) (uint64, uint64, error) {
|
|
return 0, 0, fmt.Errorf("user lookup not supported")
|
|
}
|
|
|
|
func lookupGroupInContainer(rootdir, groupname string) (uint64, error) {
|
|
return 0, fmt.Errorf("group lookup not supported")
|
|
}
|
|
|
|
func lookupGroupForUIDInContainer(rootdir string, userid uint64) (string, uint64, error) {
|
|
return "", 0, fmt.Errorf("primary group lookup by uid not supported")
|
|
}
|