summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/attr.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/fs/attr.go')
-rw-r--r--pkg/sentry/fs/attr.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkg/sentry/fs/attr.go b/pkg/sentry/fs/attr.go
index 56a2ad6f7..4178f18b2 100644
--- a/pkg/sentry/fs/attr.go
+++ b/pkg/sentry/fs/attr.go
@@ -91,6 +91,8 @@ func (n InodeType) String() string {
// StableAttr contains Inode attributes that will be stable throughout the
// lifetime of the Inode.
+//
+// +stateify savable
type StableAttr struct {
// Type is the InodeType of a InodeOperations.
Type InodeType
@@ -150,6 +152,8 @@ func IsCharDevice(s StableAttr) bool {
// UnstableAttr contains Inode attributes that may change over the lifetime
// of the Inode.
+//
+// +stateify savable
type UnstableAttr struct {
// Size is the file size in bytes.
Size int64
@@ -186,6 +190,8 @@ func WithCurrentTime(ctx context.Context, u UnstableAttr) UnstableAttr {
}
// AttrMask contains fields to mask StableAttr and UnstableAttr.
+//
+// +stateify savable
type AttrMask struct {
Type bool
DeviceID bool
@@ -227,6 +233,8 @@ func (a AttrMask) Union(b AttrMask) AttrMask {
}
// PermMask are file access permissions.
+//
+// +stateify savable
type PermMask struct {
// Read indicates reading is permitted.
Read bool
@@ -280,6 +288,8 @@ func (p PermMask) SupersetOf(other PermMask) bool {
// FilePermissions represents the permissions of a file, with
// Read/Write/Execute bits for user, group, and other.
+//
+// +stateify savable
type FilePermissions struct {
User PermMask
Group PermMask
@@ -370,6 +380,8 @@ func (f FilePermissions) AnyRead() bool {
}
// FileOwner represents ownership of a file.
+//
+// +stateify savable
type FileOwner struct {
UID auth.KUID
GID auth.KGID