diff options
author | Christian Brauner <brauner@kernel.org> | 2024-06-24 18:49:48 +0300 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-06-28 10:53:30 +0300 |
commit | 0a3deb11858ae8a0b3849b5fda45512ad383f0e1 (patch) | |
tree | 7b998c4299e62457e3976b080508b4d576f88b84 /include | |
parent | 09b31295f833031c88419550172703d45c5401e3 (diff) | |
download | linux-0a3deb11858ae8a0b3849b5fda45512ad383f0e1.tar.xz |
fs: Allow listmount() in foreign mount namespace
Expand struct mnt_id_req to add an optional mnt_ns_id field. When this
field is populated, listmount() will be performed on the specified mount
namespace, provided the currently application has CAP_SYS_ADMIN in its
user namespace and the mount namespace is a child of the current
namespace.
Co-developed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Link: https://lore.kernel.org/r/49930bdce29a8367a213eb14c1e68e7e49284f86.1719243756.git.josef@toxicpanda.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/uapi/linux/mount.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/mount.h b/include/uapi/linux/mount.h index a07508aee518..ee1559cd6764 100644 --- a/include/uapi/linux/mount.h +++ b/include/uapi/linux/mount.h @@ -189,10 +189,12 @@ struct mnt_id_req { __u32 spare; __u64 mnt_id; __u64 param; + __u64 mnt_ns_id; }; /* List of all mnt_id_req versions. */ #define MNT_ID_REQ_SIZE_VER0 24 /* sizeof first published struct */ +#define MNT_ID_REQ_SIZE_VER1 32 /* sizeof second published struct */ /* * @mask bits for statmount(2) |