containerd/vendor/github.com/opencontainers/runc/libcontainer/user/lookup_unix.go
Lantao Liu 8d1b737480 Update containerd to a6ce1ef2a1
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-08-24 21:47:52 +00:00

31 lines
529 B
Go

// +build darwin dragonfly freebsd linux netbsd openbsd solaris
package user
import (
"io"
"os"
)
// Unix-specific path to the passwd and group formatted files.
const (
unixPasswdPath = "/etc/passwd"
unixGroupPath = "/etc/group"
)
func GetPasswdPath() (string, error) {
return unixPasswdPath, nil
}
func GetPasswd() (io.ReadCloser, error) {
return os.Open(unixPasswdPath)
}
func GetGroupPath() (string, error) {
return unixGroupPath, nil
}
func GetGroup() (io.ReadCloser, error) {
return os.Open(unixGroupPath)
}