Have lgetxattr return ENODATA.

It is a workaround to lgetxattr/lsetxattr working with security.capacity when running docker in gvisor.

PiperOrigin-RevId: 563194162
This commit is contained in:
Jing Chen
2023-09-06 13:13:19 -07:00
committed by gVisor bot
parent f22d854395
commit e550bfbd05
4 changed files with 24 additions and 2 deletions
+2
View File
@@ -195,6 +195,8 @@ func (fstype FilesystemType) GetFilesystem(ctx context.Context, vfsObj *vfs.Virt
allowXattrPrefix := map[string]struct{}{
linux.XATTR_TRUSTED_PREFIX: struct{}{},
linux.XATTR_USER_PREFIX: struct{}{},
// The "security" namespace is allowed, but it always returns an error.
linux.XATTR_SECURITY_PREFIX: struct{}{},
}
tmpfsOpts, tmpfsOptsOk := opts.InternalData.(FilesystemOpts)