mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Copy creds in access
PiperOrigin-RevId: 207181631 Change-Id: Ic6205278715a9260fb970efb414fc758ea72c4c6
This commit is contained in:
@@ -453,7 +453,7 @@ func accessAt(t *kernel.Task, dirFD kdefs.FD, addr usermem.Addr, resolve bool, m
|
||||
// uid/gid. We do this by temporarily clearing all FS-related
|
||||
// capabilities and switching the fsuid/fsgid around to the
|
||||
// real ones." -fs/open.c:faccessat
|
||||
creds := t.Credentials()
|
||||
creds := t.Credentials().Fork()
|
||||
creds.EffectiveKUID = creds.RealKUID
|
||||
creds.EffectiveKGID = creds.RealKGID
|
||||
if creds.EffectiveKUID.In(creds.UserNamespace) == auth.RootUID {
|
||||
|
||||
Reference in New Issue
Block a user