about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/sys
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-01-31 09:46:24 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-06-24 16:03:31 -0300
commitb4deb7beb8c977f79642a6a839c0475e1ce3a209 (patch)
tree13200fa7415f11a269750fc039437a31d9e05cd5 /sysdeps/unix/sysv/linux/sys
parent6c0eedd97e49aae3b22abcdd892efb7c3f57b9f4 (diff)
downloadglibc-b4deb7beb8c977f79642a6a839c0475e1ce3a209.tar.gz
glibc-b4deb7beb8c977f79642a6a839c0475e1ce3a209.tar.xz
glibc-b4deb7beb8c977f79642a6a839c0475e1ce3a209.zip
linux: Add fsmount
It was added on 5.2 (93766fbd2696c2c4453dd8e1070977e9cd4e6b6d) to
provide a way by which a filesystem opened with fsopen and configured
by a series of fsconfig calls can have a detached mount object
created for it.

Tested-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/unix/sysv/linux/sys')
-rw-r--r--sysdeps/unix/sysv/linux/sys/mount.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/sys/mount.h b/sysdeps/unix/sysv/linux/sys/mount.h
index 56da283d3f..6d55c55de8 100644
--- a/sysdeps/unix/sysv/linux/sys/mount.h
+++ b/sysdeps/unix/sysv/linux/sys/mount.h
@@ -137,6 +137,22 @@ enum
 /* fsopen flags.  */
 #define FSOPEN_CLOEXEC          0x00000001
 
+/* fsmount flags.  */
+#define FSMOUNT_CLOEXEC         0x00000001
+
+/* mount attributes used on fsmount.  */
+#define MOUNT_ATTR_RDONLY       0x00000001 /* Mount read-only.  */
+#define MOUNT_ATTR_NOSUID       0x00000002 /* Ignore suid and sgid bits.  */
+#define MOUNT_ATTR_NODEV        0x00000004 /* Disallow access to device special files.  */
+#define MOUNT_ATTR_NOEXEC       0x00000008 /* Disallow program execution.  */
+#define MOUNT_ATTR__ATIME       0x00000070 /* Setting on how atime should be updated.  */
+#define MOUNT_ATTR_RELATIME     0x00000000 /* - Update atime relative to mtime/ctime.  */
+#define MOUNT_ATTR_NOATIME      0x00000010 /* - Do not update access times.  */
+#define MOUNT_ATTR_STRICTATIME  0x00000020 /* - Always perform atime updates  */
+#define MOUNT_ATTR_NODIRATIME   0x00000080 /* Do not update directory access times.  */
+#define MOUNT_ATTR_IDMAP        0x00100000 /* Idmap mount to @userns_fd in struct mount_attr.  */
+#define MOUNT_ATTR_NOSYMFOLLOW  0x00200000 /* Do not follow symlinks.  */
+
 
 __BEGIN_DECLS
 
@@ -155,6 +171,11 @@ extern int umount2 (const char *__special_file, int __flags) __THROW;
    mouting.  */
 extern int fsopen (const char *__fs_name, unsigned int __flags) __THROW;
 
+/* Create a mount representation for the FD created by fsopen using
+   FLAGS with ATTR_FLAGS describing how the mount is to be performed.  */
+extern int fsmount (int __fd, unsigned int __flags,
+		    unsigned int __ms_flags) __THROW;
+
 __END_DECLS
 
 #endif /* _SYS_MOUNT_H */