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

Method CheckPermissions

pkg/sentry/fsimpl/kernfs/inode_impl_util.go:371–379  ·  view source on GitHub ↗

CheckPermissions implements Inode.CheckPermissions.

(_ context.Context, creds *auth.Credentials, ats vfs.AccessTypes)

Source from the content-addressed store, hash-verified

369
370// CheckPermissions implements Inode.CheckPermissions.
371func (a *InodeAttrs) CheckPermissions(_ context.Context, creds *auth.Credentials, ats vfs.AccessTypes) error {
372 return vfs.GenericCheckPermissions(
373 creds,
374 ats,
375 a.Mode(),
376 auth.KUID(a.uid.Load()),
377 auth.KGID(a.gid.Load()),
378 )
379}
380
381// IncLinks implements Inode.IncLinks.
382func (a *InodeAttrs) IncLinks(n uint32) {

Callers

nothing calls this directly

Calls 5

ModeMethod · 0.95
GenericCheckPermissionsFunction · 0.92
KUIDTypeAlias · 0.92
KGIDTypeAlias · 0.92
LoadMethod · 0.65

Tested by

no test coverage detected