gvisorgvisor.dev/gvisor/pkg/sentry/vfs/memxattr Index | Files

package memxattr

import "gvisor.dev/gvisor/pkg/sentry/vfs/memxattr"

Package memxattr provides a default, in-memory extended attribute implementation.

Index

Types

type SimpleExtendedAttributes

type SimpleExtendedAttributes struct {
	// contains filtered or unexported fields
}

SimpleExtendedAttributes implements extended attributes using a map of names to values.

SimpleExtendedAttributes calls vfs.CheckXattrPermissions, so callers are not required to do so.

+stateify savable

func (*SimpleExtendedAttributes) GetXattr

func (x *SimpleExtendedAttributes) GetXattr(creds *auth.Credentials, mode linux.FileMode, kuid auth.KUID, opts *vfs.GetXattrOptions) (string, error)

GetXattr returns the value at 'name'.

func (*SimpleExtendedAttributes) ListXattr

func (x *SimpleExtendedAttributes) ListXattr(creds *auth.Credentials, size uint64) ([]string, error)

ListXattr returns all names in xattrs.

func (*SimpleExtendedAttributes) RemoveXattr

func (x *SimpleExtendedAttributes) RemoveXattr(creds *auth.Credentials, mode linux.FileMode, kuid auth.KUID, name string) error

RemoveXattr removes the xattr at 'name'.

func (*SimpleExtendedAttributes) SetXattr

func (x *SimpleExtendedAttributes) SetXattr(creds *auth.Credentials, mode linux.FileMode, kuid auth.KUID, kgid auth.KGID, opts *vfs.SetXattrOptions) error

SetXattr sets 'value' at 'name'.

Source Files

xattr.go

Version
v0.0.0-20250605235530-a6711d1e1dc6 (latest)
Published
Jun 5, 2025
Platform
linux/amd64
Imports
6 packages
Last checked
4 hours ago

Tools for package owners.