summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/vfs/options.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-04-11 02:06:50 +0000
committergVisor bot <gvisor-bot@google.com>2020-04-11 02:06:50 +0000
commitdd8a9b5e9354c117f21daadc640e680235144cc2 (patch)
tree0f2f0b4bceb760996024a9bea029354b42486084 /pkg/sentry/vfs/options.go
parent43c49fc5896f022b207b07da85f904cedd14d57e (diff)
parent09ddb5a4262c39744643b612109dd12dcce176a8 (diff)
Merge release-20200323.0-129-g09ddb5a (automated)
Diffstat (limited to 'pkg/sentry/vfs/options.go')
-rwxr-xr-xpkg/sentry/vfs/options.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/pkg/sentry/vfs/options.go b/pkg/sentry/vfs/options.go
index 2f04bf882..534528ce6 100755
--- a/pkg/sentry/vfs/options.go
+++ b/pkg/sentry/vfs/options.go
@@ -132,6 +132,20 @@ type SetStatOptions struct {
Stat linux.Statx
}
+// GetxattrOptions contains options to VirtualFilesystem.GetxattrAt(),
+// FilesystemImpl.GetxattrAt(), FileDescription.Getxattr(), and
+// FileDescriptionImpl.Getxattr().
+type GetxattrOptions struct {
+ // Name is the name of the extended attribute to retrieve.
+ Name string
+
+ // Size is the maximum value size that the caller will tolerate. If the value
+ // is larger than size, getxattr methods may return ERANGE, but they are also
+ // free to ignore the hint entirely (i.e. the value returned may be larger
+ // than size). All size checking is done independently at the syscall layer.
+ Size uint64
+}
+
// SetxattrOptions contains options to VirtualFilesystem.SetxattrAt(),
// FilesystemImpl.SetxattrAt(), FileDescription.Setxattr(), and
// FileDescriptionImpl.Setxattr().