Files
skopeo/user_basic.go
Nalin Dahyabhai b1bb73e01c Teach "Run" to dig user IDs out of containers
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
2017-04-11 18:41:54 +00:00

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")
}