MCPcopy
hub / github.com/google/gvisor / MapFromKUID

Method MapFromKUID

pkg/sentry/kernel/auth/id_map.go:24–29  ·  view source on GitHub ↗

MapFromKUID translates kuid, a UID in the root namespace, to a UID in ns.

(kuid KUID)

Source from the content-addressed store, hash-verified

22
23// MapFromKUID translates kuid, a UID in the root namespace, to a UID in ns.
24func (ns *UserNamespace) MapFromKUID(kuid KUID) UID {
25 if ns.parent == nil {
26 return UID(kuid)
27 }
28 return UID(ns.mapID(&ns.uidMapFromParent, uint32(ns.parent.MapFromKUID(kuid))))
29}
30
31// MapFromKGID translates kgid, a GID in the root namespace, to a GID in ns.
32func (ns *UserNamespace) MapFromKGID(kgid KGID) GID {

Callers 9

keyctlDescribeFunction · 0.80
CanActAsOwnerFunction · 0.80
IPCStatMethod · 0.80
semStatMethod · 0.80
FixupVfsCapDataOnGetFunction · 0.80
rootIDOwnsCurrentUsernsFunction · 0.80
InMethod · 0.80
HasCapabilityOnFileMethod · 0.80
statMethod · 0.80

Calls 2

mapIDMethod · 0.95
UIDTypeAlias · 0.70

Tested by

no test coverage detected