From 02e7efc2b35da65cb4e27b0d58923d6c7b3a1c6c Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Fri, 27 Jul 2018 07:21:47 -0400 Subject: Update vendored version of runc,buildah,containers/image There is a compiler warning that has been fixed in the upstream, so I figured we should update to fix. Also vendor in latest buildah to get better support for running builds in rootless mode. Vendor in latest containers/image to allow daemon support to be pluggable. Signed-off-by: Daniel J Walsh Closes: #1169 Approved by: mheon --- .../runc/libcontainer/user/lookup_windows.go | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 vendor/github.com/opencontainers/runc/libcontainer/user/lookup_windows.go (limited to 'vendor/github.com/opencontainers/runc/libcontainer/user/lookup_windows.go') diff --git a/vendor/github.com/opencontainers/runc/libcontainer/user/lookup_windows.go b/vendor/github.com/opencontainers/runc/libcontainer/user/lookup_windows.go new file mode 100644 index 000000000..65cd40e92 --- /dev/null +++ b/vendor/github.com/opencontainers/runc/libcontainer/user/lookup_windows.go @@ -0,0 +1,40 @@ +// +build windows + +package user + +import ( + "fmt" + "os/user" +) + +func lookupUser(username string) (User, error) { + u, err := user.Lookup(username) + if err != nil { + return User{}, err + } + return userFromOS(u) +} + +func lookupUid(uid int) (User, error) { + u, err := user.LookupId(fmt.Sprintf("%d", uid)) + if err != nil { + return User{}, err + } + return userFromOS(u) +} + +func lookupGroup(groupname string) (Group, error) { + g, err := user.LookupGroup(groupname) + if err != nil { + return Group{}, err + } + return groupFromOS(g) +} + +func lookupGid(gid int) (Group, error) { + g, err := user.LookupGroupId(fmt.Sprintf("%d", gid)) + if err != nil { + return Group{}, err + } + return groupFromOS(g) +} -- cgit v1.2.3-54-g00ecf