summaryrefslogtreecommitdiffhomepage
path: root/pkg/abi
diff options
context:
space:
mode:
authorJamie Liu <jamieliu@google.com>2021-06-10 18:22:18 -0700
committergVisor bot <gvisor-bot@google.com>2021-06-10 18:25:04 -0700
commit0892420c9796358da06ea3ba375ee3e0fa8595ac (patch)
treede187ea557c28178a171e2b07b677ee3ccc8e967 /pkg/abi
parent3c91fa42aeb3adaf86f0987b545be17125f208dc (diff)
Minor VFS2 xattr changes.
- Allow the gofer client to use most xattr namespaces. As documented by the updated comment, this is consistent with e.g. Linux's FUSE client, and allows gofers to provide extended attributes from FUSE filesystems. - Make tmpfs' listxattr omit xattrs in the "trusted" namespace for non-privileged users. PiperOrigin-RevId: 378778854
Diffstat (limited to 'pkg/abi')
-rw-r--r--pkg/abi/linux/xattr.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/abi/linux/xattr.go b/pkg/abi/linux/xattr.go
index 8ef837f27..1fa7a4f4f 100644
--- a/pkg/abi/linux/xattr.go
+++ b/pkg/abi/linux/xattr.go
@@ -23,6 +23,12 @@ const (
XATTR_CREATE = 1
XATTR_REPLACE = 2
+ XATTR_SECURITY_PREFIX = "security."
+ XATTR_SECURITY_PREFIX_LEN = len(XATTR_SECURITY_PREFIX)
+
+ XATTR_SYSTEM_PREFIX = "system."
+ XATTR_SYSTEM_PREFIX_LEN = len(XATTR_SYSTEM_PREFIX)
+
XATTR_TRUSTED_PREFIX = "trusted."
XATTR_TRUSTED_PREFIX_LEN = len(XATTR_TRUSTED_PREFIX)