linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add NOSYMFOLLOW flags to mount(2) and statfs(2)
@ 2020-09-04 16:12 Ross Zwisler
  2020-09-07  7:13 ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 4+ messages in thread
From: Ross Zwisler @ 2020-09-04 16:12 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Ross Zwisler, linux-man

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Add NOSYMFOLLOW flags to mount(2) and statfs(2)
  2020-09-04 16:12 [PATCH] Add NOSYMFOLLOW flags to mount(2) and statfs(2) Ross Zwisler
@ 2020-09-07  7:13 ` Michael Kerrisk (man-pages)
  2020-10-27 17:02   ` zwisler
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-09-07  7:13 UTC (permalink / raw)
  To: Ross Zwisler; +Cc: Ross Zwisler, linux-man

Hello Ross,

On Fri, 4 Sep 2020 at 18:12, Ross Zwisler <zwisler@chromium.org> wrote:
>
> These flags should first appear in Linux kernel version v5.10.
>
> Signed-off-by: Ross Zwisler <zwisler@google.com>

Thanks for the patch. I will try to keep track of this, but if you
happened to notice whether this goes in in 5.10, and pinged this mail
thread, that would be great.

Cheers,

Michael

> ---
> 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
>


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Add NOSYMFOLLOW flags to mount(2) and statfs(2)
  2020-09-07  7:13 ` Michael Kerrisk (man-pages)
@ 2020-10-27 17:02   ` zwisler
  2020-10-27 17:17     ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 4+ messages in thread
From: zwisler @ 2020-10-27 17:02 UTC (permalink / raw)
  To: Michael Kerrisk (man-pages); +Cc: Ross Zwisler, linux-man

On Mon, Sep 07, 2020 at 09:13:08AM +0200, Michael Kerrisk (man-pages) wrote:
> Hello Ross,
> 
> On Fri, 4 Sep 2020 at 18:12, Ross Zwisler <zwisler@chromium.org> wrote:
> >
> > These flags should first appear in Linux kernel version v5.10.
> >
> > Signed-off-by: Ross Zwisler <zwisler@google.com>
> 
> Thanks for the patch. I will try to keep track of this, but if you
> happened to notice whether this goes in in 5.10, and pinged this mail
> thread, that would be great.

Hey Michael,

The associated kernel patches were successfully merged in the v5.10 merge
window:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dab741e0e02bd3c4f5e2e97be74b39df2523fc6e

Thanks,
- Ross

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Add NOSYMFOLLOW flags to mount(2) and statfs(2)
  2020-10-27 17:02   ` zwisler
@ 2020-10-27 17:17     ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-10-27 17:17 UTC (permalink / raw)
  To: Ross Zwisler; +Cc: Ross Zwisler, linux-man

Hey Ross,

On Tue, 27 Oct 2020 at 18:02, <zwisler@google.com> wrote:
>
> On Mon, Sep 07, 2020 at 09:13:08AM +0200, Michael Kerrisk (man-pages) wrote:
> > Hello Ross,
> >
> > On Fri, 4 Sep 2020 at 18:12, Ross Zwisler <zwisler@chromium.org> wrote:
> > >
> > > These flags should first appear in Linux kernel version v5.10.
> > >
> > > Signed-off-by: Ross Zwisler <zwisler@google.com>
> >
> > Thanks for the patch. I will try to keep track of this, but if you
> > happened to notice whether this goes in in 5.10, and pinged this mail
> > thread, that would be great.
>
> Hey Michael,
>
> The associated kernel patches were successfully merged in the v5.10 merge
> window:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dab741e0e02bd3c4f5e2e97be74b39df2523fc6e

Thank you very much for the ping! I've now merged that patch into a
branch for the next man-pages-5.10 release.

Cheers,

Michael


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-27 17:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-04 16:12 [PATCH] Add NOSYMFOLLOW flags to mount(2) and statfs(2) Ross Zwisler
2020-09-07  7:13 ` Michael Kerrisk (man-pages)
2020-10-27 17:02   ` zwisler
2020-10-27 17:17     ` Michael Kerrisk (man-pages)

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).