summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/vfs/options.go
diff options
context:
space:
mode:
authorJamie Liu <jamieliu@google.com>2019-12-18 15:47:24 -0800
committergVisor bot <gvisor-bot@google.com>2019-12-18 15:48:45 -0800
commit744401297a8c93ce5992ba99aa84f3dcdc19ae9e (patch)
tree2d34eac5ba383f7f29b207a125321866567e71f7 /pkg/sentry/vfs/options.go
parent8e6e87f8e8885eeadb8b3d891e24137f11ebdf31 (diff)
Add VFS2 plumbing for extended attributes.
PiperOrigin-RevId: 286281274
Diffstat (limited to 'pkg/sentry/vfs/options.go')
-rw-r--r--pkg/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 3ecbc8fc1..97ee4a446 100644
--- a/pkg/sentry/vfs/options.go
+++ b/pkg/sentry/vfs/options.go
@@ -101,6 +101,20 @@ type SetStatOptions struct {
Stat linux.Statx
}
+// SetxattrOptions contains options to VirtualFilesystem.SetxattrAt(),
+// FilesystemImpl.SetxattrAt(), FileDescription.Setxattr(), and
+// FileDescriptionImpl.Setxattr().
+type SetxattrOptions struct {
+ // Name is the name of the extended attribute being mutated.
+ Name string
+
+ // Value is the extended attribute's new value.
+ Value string
+
+ // Flags contains flags as specified for setxattr/lsetxattr/fsetxattr(2).
+ Flags uint32
+}
+
// StatOptions contains options to VirtualFilesystem.StatAt(),
// FilesystemImpl.StatAt(), FileDescription.Stat(), and
// FileDescriptionImpl.Stat().