From: Ross Zwisler <zwisler@chromium.org>
To: mtk.manpages@gmail.com
Cc: Ross Zwisler <zwisler@google.com>, linux-man@vger.kernel.org
Subject: [PATCH] Add NOSYMFOLLOW flags to mount(2) and statfs(2)
Date: Fri, 4 Sep 2020 10:12:03 -0600 [thread overview]
Message-ID: <20200904161203.598281-1-zwisler@google.com> (raw)
These flags should first appear in Linux kernel version v5.10.
Signed-off-by: Ross Zwisler <zwisler@google.com>
---
The nosymfollow kernel code has been merged into Al Viro's tree and
should be part of the v5.10 merge window.
https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git/commit/?h=work.misc&id=dab741e0e02bd3c4f5e2e97be74b39df2523fc6e
---
man2/mount.2 | 10 ++++++++++
man2/statfs.2 | 4 ++++
2 files changed, 14 insertions(+)
diff --git a/man2/mount.2 b/man2/mount.2
index f565ee578..039e4b83b 100644
--- a/man2/mount.2
+++ b/man2/mount.2
@@ -280,6 +280,16 @@ the
flag to
.BR open (2)
was specified for all file opens to this filesystem).
+.TP
+.B MS_NOSYMFOLLOW
+Do not follow symlinks when resolving paths. Symlinks can still be created,
+and
+.BR readlink (1),
+.BR readlink (2),
+.BR realpath (1)
+and
+.BR realpath (3)
+all still work properly.
.PP
From Linux 2.4 onward, some of the above flags are
settable on a per-mount basis,
diff --git a/man2/statfs.2 b/man2/statfs.2
index 0fc537c14..d5edf2a50 100644
--- a/man2/statfs.2
+++ b/man2/statfs.2
@@ -206,6 +206,10 @@ Writes are synched to the filesystem immediately (see the description of
.B O_SYNC
in
.BR open (2)).
+.TP
+.B ST_NOSYMFOLLOW
+Symlinks are not followed when resolving paths; see
+.BR mount (2).
.PP
Nobody knows what
.I f_fsid
--
2.28.0.526.ge36021eeef-goog
next reply other threads:[~2020-09-04 16:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-04 16:12 Ross Zwisler [this message]
2020-09-07 7:13 ` [PATCH] Add NOSYMFOLLOW flags to mount(2) and statfs(2) Michael Kerrisk (man-pages)
2020-10-27 17:02 ` zwisler
2020-10-27 17:17 ` Michael Kerrisk (man-pages)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200904161203.598281-1-zwisler@google.com \
--to=zwisler@chromium.org \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=zwisler@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).