package userns
import "github.com/opencontainers/runc/libcontainer/internal/userns"
Index ¶
- func GetUserNamespaceMappings(nsPath string) (uidMap, gidMap []configs.IDMap, err error)
- func IsSameMapping(a, b []configs.IDMap) bool
- type Handles
- type Mapping
Functions ¶
func GetUserNamespaceMappings ¶
func IsSameMapping ¶
IsSameMapping returns whether or not the two id mappings are the same. Note that if the order of the mappings is different, or a mapping has been split, the mappings will be considered different.
Types ¶
type Handles ¶
type Handles struct {
// contains filtered or unexported fields
}
func (*Handles) Get ¶
Get returns a handle to a /proc/$pid/ns/user nsfs file with the requested mapping. The processes spawned to produce userns nsfds are cached, so if equivalent user namespace mappings are requested, the same user namespace will be returned. The caller is responsible for closing the returned file descriptor.
func (*Handles) Release ¶
func (hs *Handles) Release()
Release all resources associated with this Handle. All existing files returned from Get() will continue to work even after calling Release(). The same Handles can be re-used after calling Release().
type Mapping ¶
Source Files ¶
userns_maps_linux.go usernsfd_linux.go
- Version
- v1.2.6 (latest)
- Published
- Mar 14, 2025
- Platform
- linux/amd64
- Imports
- 14 packages
- Last checked
- 5 minutes ago –
Tools for package owners.