diff options
| author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-10-12 08:31:56 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-12 08:31:56 -0700 |
| commit | b0b6dc40bd916698f87bc68f7b4b603582e93ef2 (patch) | |
| tree | 44c98351368924013f8a27e3f7c1f66c0953b08c /pkg/chrootuser/user.go | |
| parent | 9a933c70b1cf60c48211bc700d726074aa4536a0 (diff) | |
| parent | 04a537756d9b7b526759c02b5b5d68c135b210ea (diff) | |
| download | podman-b0b6dc40bd916698f87bc68f7b4b603582e93ef2.tar.gz podman-b0b6dc40bd916698f87bc68f7b4b603582e93ef2.tar.bz2 podman-b0b6dc40bd916698f87bc68f7b4b603582e93ef2.zip | |
Merge pull request #1558 from rhatdan/user
Generate a passwd file for users not in container
Diffstat (limited to 'pkg/chrootuser/user.go')
| -rw-r--r-- | pkg/chrootuser/user.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/chrootuser/user.go b/pkg/chrootuser/user.go index 3de138b86..c83dcc230 100644 --- a/pkg/chrootuser/user.go +++ b/pkg/chrootuser/user.go @@ -99,3 +99,10 @@ func GetAdditionalGroupsForUser(rootdir string, userid uint64) ([]uint32, error) } return gids, nil } + +// LookupUIDInContainer returns username and gid associated with a UID in a container +// it will use the /etc/passwd files inside of the rootdir +// to return this information. +func LookupUIDInContainer(rootdir string, uid uint64) (user string, gid uint64, err error) { + return lookupUIDInContainer(rootdir, uid) +} |
