diff options
author | Christian Brauner <brauner@kernel.org> | 2025-02-04 12:27:49 +0100 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-02-12 12:12:27 +0100 |
commit | fa204a65f1b65664eb938940c73cdfc0dcfd578e (patch) | |
tree | 1af8e2835d1d963acf35719bbcc4587de102e55e /samples/vfs/samples-vfs.h | |
parent | a496dfecbc47253012f1e10d01110428bb9dc118 (diff) |
samples/vfs: add STATMOUNT_MNT_{G,U}IDMAP
Illustrate how to use STATMOUNT_MNT_{G,U}IDMAP.
Link: https://lore.kernel.org/r/20250204-work-mnt_idmap-statmount-v2-4-007720f39f2e@kernel.org
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'samples/vfs/samples-vfs.h')
-rw-r--r-- | samples/vfs/samples-vfs.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/samples/vfs/samples-vfs.h b/samples/vfs/samples-vfs.h index 103e1e7c4cec..498baf581b56 100644 --- a/samples/vfs/samples-vfs.h +++ b/samples/vfs/samples-vfs.h @@ -42,7 +42,11 @@ struct statmount { __u32 opt_array; /* [str] Array of nul terminated fs options */ __u32 opt_sec_num; /* Number of security options */ __u32 opt_sec_array; /* [str] Array of nul terminated security options */ - __u64 __spare2[46]; + __u32 mnt_uidmap_num; /* Number of uid mappings */ + __u32 mnt_uidmap; /* [str] Array of uid mappings */ + __u32 mnt_gidmap_num; /* Number of gid mappings */ + __u32 mnt_gidmap; /* [str] Array of gid mappings */ + __u64 __spare2[44]; char str[]; /* Variable size part containing strings */ }; @@ -158,6 +162,14 @@ struct mnt_ns_info { #define STATX_MNT_ID_UNIQUE 0x00004000U /* Want/got extended stx_mount_id */ #endif +#ifndef STATMOUNT_MNT_UIDMAP +#define STATMOUNT_MNT_UIDMAP 0x00002000U /* Want/got uidmap... */ +#endif + +#ifndef STATMOUNT_MNT_GIDMAP +#define STATMOUNT_MNT_GIDMAP 0x00004000U /* Want/got gidmap... */ +#endif + #ifndef MOUNT_ATTR_RDONLY #define MOUNT_ATTR_RDONLY 0x00000001 /* Mount read-only */ #endif |