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

Function GetExecUIDGIDFromUser

pkg/sentry/fsimpl/user/user.go:372–376  ·  view source on GitHub ↗

GetExecUIDGIDFromUser retrieves the UID and GID from /etc/passwd file for the given user.

(ctx context.Context, vmns *vfs.MountNamespace, user string)

Source from the content-addressed store, hash-verified

370// GetExecUIDGIDFromUser retrieves the UID and GID from /etc/passwd file for
371// the given user.
372func GetExecUIDGIDFromUser(ctx context.Context, vmns *vfs.MountNamespace, user string) (auth.KUID, auth.KGID) {
373 // Read /etc/passwd and retrieve the UID/GID based on the user string.
374 uid, gid := getExecUIDGID(ctx, vmns, user)
375 return uid, gid
376}

Callers 2

StartContainerMethod · 0.92

Calls 1

getExecUIDGIDFunction · 0.85

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…