MCPcopy Index your code
hub / github.com/google/gvisor / HasCapability

Method HasCapability

pkg/sentry/socket/netstack/netstack.go:3881–3883  ·  view source on GitHub ↗

HasCapability checks if the task has the given capability in the socket owner's user namespace.

(cap linux.Capability, t *kernel.Task)

Source from the content-addressed store, hash-verified

3879// HasCapability checks if the task has the given capability in the
3880// socket owner's user namespace.
3881func (s *sock) HasCapability(cap linux.Capability, t *kernel.Task) bool {
3882 return t.HasCapabilityIn(cap, s.namespace.UserNamespace())
3883}

Callers 7

getSockOptIPv6Method · 0.95
getSockOptIPMethod · 0.95
setSockOptIPv6Method · 0.95
setSockOptIPMethod · 0.95
sendMsgMethod · 0.45
ProcessMessageMethod · 0.45
ReceiveMethod · 0.45

Calls 2

UserNamespaceMethod · 0.65
HasCapabilityInMethod · 0.45

Tested by

no test coverage detected