# Functions
AddNamespaceRangesUser takes a username and uses the standard system utility to create a system user/group pair used to hold the /etc/sub{uid,gid} ranges which will be used for user namespace mapping ranges in containers.
CanAccess takes a valid (existing) directory and a uid, gid pair and determines if that uid, gid pair has access (execute bit) to the directory.
CreateIDMappings takes a requested user and group name and using the data from /etc/sub{uid,gid} ranges, creates the proper uid and gid remapping ranges for that user/group pair.
GetRootUIDGID retrieves the remapped root uid/gid pair from the set of maps.
LookupGID uses traditional local system files lookup (from libcontainer/user) on a group ID, followed by a call to `getent` for supporting host configured non-files passwd and group dbs.
LookupGroup uses traditional local system files lookup (from libcontainer/user) on a group name, followed by a call to `getent` for supporting host configured non-files passwd and group dbs.
LookupUID uses traditional local system files lookup (from libcontainer/user) on a uid, followed by a call to `getent` for supporting host configured non-files passwd and group dbs.
LookupUser uses traditional local system files lookup (from libcontainer/user) on a username, followed by a call to `getent` for supporting host configured non-files passwd and group dbs.
MkdirAllAs creates a directory (include any along the path) and then modifies ownership to the requested uid/gid.
MkdirAllNewAs creates a directory (include any along the path) and then modifies ownership ONLY of newly created directories to the requested uid/gid.
MkdirAs creates a directory and then modifies ownership to the requested uid/gid.
ToContainer takes an id mapping, and uses it to translate a host ID to the remapped ID.
ToHost takes an id mapping and a remapped ID, and translates the ID to the mapped host ID.