chrootuser

package
v1.8.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2019 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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

func GetAdditionalGroupsForUser(rootdir string, userid uint64) ([]uint32, error)

GetAdditionalGroupsForUser returns a list of gids that userid is associated with

func GetGroup

func GetGroup(rootdir, groupspec string) (uint32, error)

GetGroup returns the gid by looking it up in the /etc/group file groupspec format [ group | gid ]

func GetUser

func GetUser(rootdir, userspec string) (uint32, uint32, string, error)

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

func LookupUIDInContainer(rootdir string, uid uint64) (user string, gid uint64, err error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL