Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LookupGidsByUser ¶
TODO: maybe also read the user's groups and put them into the spec process's AdditionalGroups? (but then read /etc/groups only once!)
... or delete this method with its gidsByUserLookup
Looks up all associated gids by a given username in the given rootfs' /etc/groups
Types ¶
type IdMappings ¶
type IdMappings interface { UidToHost(int) (int, error) GidToHost(int) (int, error) UidToContainer(int) (int, error) GidToContainer(int) (int, error) }
var ( MapIdentity IdMappings = idIdentity("identity") MapRootless = NewIdMappings([]specs.LinuxIDMapping{{uint32(os.Geteuid()), 0, 1}}, []specs.LinuxIDMapping{{uint32(os.Getegid()), 0, 1}}) )
func NewIdMappings ¶
func NewIdMappings(uidMappings, gidMappings []specs.LinuxIDMapping) IdMappings
type UserIds ¶
func LookupUser ¶
Looks up a user by uid or name in the rootfs' /etc/passwd
func (*UserIds) ToContainer ¶
func (u *UserIds) ToContainer(m IdMappings) (r UserIds, err error)
Click to show internal directories.
Click to hide internal directories.