]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: add MOUNT_ATTR_NOSYMFOLLOW
authorKarel Zak <kzak@redhat.com>
Wed, 21 Sep 2022 15:27:15 +0000 (17:27 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 3 Jan 2023 11:58:42 +0000 (12:58 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
include/mount-api-utils.h
libmount/src/optlist.c

index db2df949db4686efaafbf4f6111ce0b4c6fef20f..4e2f23fc8a5eda62b1829d3d23a3e233a6302ff8 100644 (file)
@@ -74,10 +74,6 @@ static inline int move_mount(int from_dfd, const char *from_pathname, int to_dfd
 # define MOUNT_ATTR_NOEXEC 0x00000008
 #endif
 
-#ifndef MOUNT_ATTR_NODIRATIME
-# define MOUNT_ATTR_NODIRATIME 0x00000080
-#endif
-
 #ifndef MOUNT_ATTR__ATIME
 # define MOUNT_ATTR__ATIME 0x00000070
 #endif
@@ -94,10 +90,18 @@ static inline int move_mount(int from_dfd, const char *from_pathname, int to_dfd
 # define MOUNT_ATTR_STRICTATIME 0x00000020
 #endif
 
+#ifndef MOUNT_ATTR_NODIRATIME
+# define MOUNT_ATTR_NODIRATIME 0x00000080
+#endif
+
 #ifndef MOUNT_ATTR_IDMAP
 # define MOUNT_ATTR_IDMAP 0x00100000
 #endif
 
+#ifndef MOUNT_ATTR_NOSYMFOLLOW
+# define MOUNT_ATTR_NOSYMFOLLOW 0x00200000
+#endif
+
 #ifndef HAVE_STRUCT_MOUNT_ATTR
 # include <inttypes.h>
 struct mount_attr {
index 1171237967686356856e508304af092467d05147..6531d5b46e8e5a2e78fee083c45be6d8da3cb4be 100644 (file)
@@ -777,6 +777,8 @@ int mnt_optlist_get_attrs(struct libmnt_optlist *ls, uint64_t *attrs)
                *attrs |= MOUNT_ATTR_NOATIME;
        if (flags & MS_STRICTATIME)
                *attrs |= MOUNT_ATTR_STRICTATIME;
+       if (flags & MS_NOSYMFOLLOW)
+               *attrs |= MOUNT_ATTR_NOSYMFOLLOW;
 #endif
        return 0;
 }