Documentation ¶
Index ¶
- Variables
- func GetAdditionalGroupsForUser(rootdir string, userid uint64) ([]uint32, error)
- func GetGroup(rootdir, groupspec string) (uint32, error)
- func GetUser(rootdir, userspec string) (uint32, uint32, error)
- func LookupUIDInContainer(rootdir string, uid uint64) (user string, gid uint64, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoSuchUser indicates that the user provided by the caller does not // exist in /etc/passws ErrNoSuchUser = errors.New("user does not exist in /etc/passwd") )
Functions ¶
func GetAdditionalGroupsForUser ¶ added in v0.4.2
GetAdditionalGroupsForUser returns a list of gids that userid is associated with
func GetGroup ¶ added in v0.4.4
GetGroup returns the gid by looking it up in the /etc/group file groupspec format [ group | gid ]
func GetUser ¶
GetUser will return the uid, gid of the user specified in the userspec it will use the /etc/passwd and /etc/group files inside of the rootdir to return this information. userspec format [user | user:group | uid | uid:gid | user:gid | uid:group ]
func LookupUIDInContainer ¶ added in v0.11.1
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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.