]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
mount: Allow bind-mounting with "nosymfollow"
authorJakub Wilk <jwilk@jwilk.net>
Wed, 26 Jan 2022 20:30:04 +0000 (21:30 +0100)
committerJakub Wilk <jwilk@jwilk.net>
Wed, 26 Jan 2022 20:30:04 +0000 (21:30 +0100)
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
libmount/src/mountP.h
sys-utils/mount.8.adoc

index 0919dedb60447e92b1177437f83b2546bc2abfe7..908bf90b310d9c52a1c73169be197396c758c587 100644 (file)
@@ -385,7 +385,7 @@ struct libmnt_context
 #define MNT_FL_DEFAULT         0
 
 /* Flags usable with MS_BIND|MS_REMOUNT */
-#define MNT_BIND_SETTABLE      (MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_NOATIME|MS_NODIRATIME|MS_RELATIME|MS_RDONLY)
+#define MNT_BIND_SETTABLE      (MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_NOATIME|MS_NODIRATIME|MS_RELATIME|MS_RDONLY|MS_NOSYMFOLLOW)
 
 /* lock.c */
 extern int mnt_lock_use_simplelock(struct libmnt_lock *ml, int enable);
index 3e86fa28a2db2be5bbe280aba50239eb4ba2851e..6f4465d0d453eb9916dadcd66d2d991f0374f5ee 100644 (file)
@@ -234,7 +234,7 @@ ____
 
 Note that a read-only bind will create a read-only mountpoint (VFS entry), but the original filesystem superblock will still be writable, meaning that the _olddir_ will be writable, but the _newdir_ will be read-only.
 
-It's also possible to change nosuid, nodev, noexec, noatime, nodiratime and relatime VFS entry flags via a "remount,bind" operation. The other flags (for example filesystem-specific flags) are silently ignored. It's impossible to change mount options recursively (for example with *-o rbind,ro*).
+It's also possible to change nosuid, nodev, noexec, noatime, nodiratime, relatime and nosymfollow VFS entry flags via a "remount,bind" operation. The other flags (for example filesystem-specific flags) are silently ignored. It's impossible to change mount options recursively (for example with *-o rbind,ro*).
 
 Since util-linux 2.31, *mount* ignores the *bind* flag from _/etc/fstab_ on a *remount* operation (if "-o remount" is specified on command line). This is necessary to fully control mount options on remount by command line. In previous versions the bind flag has been always applied and it was impossible to re-define mount options without interaction with the bind semantic. This *mount* behavior does not affect situations when "remount,bind" is specified in the _/etc/fstab_ file.