util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/10] Manual pages: unshare.1: EXAMPLES: improve persistent mount namespace example
@ 2020-05-28 14:58 Michael Kerrisk (man-pages)
  2020-05-28 14:58 ` [PATCH 02/10] Manual pages: unshare.1: typo fix Michael Kerrisk (man-pages)
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-05-28 14:58 UTC (permalink / raw)
  To: mtk.manpages, Karel Zak; +Cc: util-linux

The text describing the persistent mount namespace example
is rather confused. Explain more clearly the purpose of making
the parent directory a bind mount with private propagation.
Also make a few other wording improvements.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
---
 sys-utils/unshare.1 | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/sys-utils/unshare.1 b/sys-utils/unshare.1
index ea170b13a..e3a23f78c 100644
--- a/sys-utils/unshare.1
+++ b/sys-utils/unshare.1
@@ -304,9 +304,16 @@ FOO
 .EE
 .in
 .PP
-Establish a persistent mount namespace referenced by the bind mount
-/root/namespaces/mnt.  This example shows a portable solution, because it
-makes sure that the bind mount is created on a shared filesystem.
+The following commands
+establish a persistent mount namespace referenced by the bind mount
+.IR /root/namespaces/mnt .
+In order to ensure that this bind mount does not get propagated
+to other mount namespaces,
+the parent directory
+.RI ( /root/namespaces )
+is first made a bind mount with
+.I private
+propagation.
 .PP
 .in +4n
 .EX
-- 
2.26.2


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

* [PATCH 02/10] Manual pages: unshare.1: typo fix
  2020-05-28 14:58 [PATCH 01/10] Manual pages: unshare.1: EXAMPLES: improve persistent mount namespace example Michael Kerrisk (man-pages)
@ 2020-05-28 14:58 ` Michael Kerrisk (man-pages)
  2020-05-28 14:58 ` [PATCH 03/10] Manual pages: setpriv.1: Minor formatting and typo fixes Michael Kerrisk (man-pages)
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-05-28 14:58 UTC (permalink / raw)
  To: mtk.manpages, Karel Zak; +Cc: util-linux

(Introduced in one of my earlier commits)

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
---
 sys-utils/unshare.1 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-utils/unshare.1 b/sys-utils/unshare.1
index e3a23f78c..a260d02e3 100644
--- a/sys-utils/unshare.1
+++ b/sys-utils/unshare.1
@@ -19,7 +19,7 @@ By default, a new namespace persists only as long as it has member processes.
 A new namespace can be made persistent even when it has no member processes
 by bind mounting
 /proc/\fIpid\fR/ns/\fItype\fR files to a filesystem path.
-A namespace that has been made persistent in this was can subsequently
+A namespace that has been made persistent in this way can subsequently
 be entered with
 .BR \%nsenter (1)
 even after the \fIprogram\fR terminates (except PID namespaces where
-- 
2.26.2


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

* [PATCH 03/10] Manual pages: setpriv.1: Minor formatting and typo fixes
  2020-05-28 14:58 [PATCH 01/10] Manual pages: unshare.1: EXAMPLES: improve persistent mount namespace example Michael Kerrisk (man-pages)
  2020-05-28 14:58 ` [PATCH 02/10] Manual pages: unshare.1: typo fix Michael Kerrisk (man-pages)
@ 2020-05-28 14:58 ` Michael Kerrisk (man-pages)
  2020-05-28 14:58 ` [PATCH 04/10] Manual pages: mount.8, umount.8: Clarify that "namespace" means "mount namespace" Michael Kerrisk (man-pages)
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-05-28 14:58 UTC (permalink / raw)
  To: mtk.manpages, Karel Zak; +Cc: util-linux

These seem all "obviously correct", so I'm rolling them up
into one patch.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
---
 sys-utils/setpriv.1 | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/sys-utils/setpriv.1 b/sys-utils/setpriv.1
index d1bd5efda..dbf5772ed 100644
--- a/sys-utils/setpriv.1
+++ b/sys-utils/setpriv.1
@@ -14,7 +14,7 @@ In comparison to
 .BR su (1)
 and
 .BR runuser (1),
-.BR setpriv (1)
+.BR setpriv
 neither uses PAM, nor does it prompt for a password.
 It is a simple, non-set-user-ID wrapper around
 .BR execve (2),
@@ -32,7 +32,8 @@ or similar tools shipped by other service managers.
 Clear supplementary groups.
 .TP
 .BR \-d , " \-\-dump"
-Dump current privilege state.  Can be specified more than once to show extra,
+Dump the current privilege state.
+Can be specified more than once to show extra,
 mostly useless, information.  Incompatible with all other options.
 .TP
 .B \-\-groups \fIgroup\fR...
@@ -49,7 +50,7 @@ entries, which add or remove an entry respectively. \fIcap\fR can either be a
 human-readable name as seen in
 .BR capabilities (7)
 without the \fIcap_\fR prefix or of the format
-.BI cap_N ,
+.BR cap_N ,
 where \fIN\fR is the internal capability index used by Linux.
 .B +all
 and
@@ -97,11 +98,13 @@ and
 .I Documentation/\:prctl/\:no_\:new_\:privs.txt
 in the Linux kernel source.
 .sp
-The no_new_privs bit is supported since Linux 3.5.
+The
+.I no_new_privs
+bit is supported since Linux 3.5.
 .TP
 .BI \-\-rgid " gid\fR, " \-\-egid " gid\fR, " \-\-regid " gid"
 Set the real, effective, or both GIDs.  The \fIgid\fR argument can be
-given as textual group name.
+given as a textual group name.
 .sp
 For safety, you must specify one of
 .BR \-\-clear\-groups ,
@@ -113,7 +116,7 @@ if you set any primary
 .TP
 .BI \-\-ruid " uid\fR, " \-\-euid " uid\fR, " \-\-reuid " uid"
 Set the real, effective, or both UIDs.  The \fIuid\fR argument can be
-given as textual login name.
+given as a textual login name.
 .sp
 Setting a
 .I uid
@@ -148,7 +151,7 @@ credentials to remedy that situation.
 .BI \-\-selinux\-label " label"
 Request a particular SELinux transition (using a transition on exec, not
 dyntrans).  This will fail and cause
-.BR setpriv (1)
+.BR setpriv
 to abort if SELinux is not in use, and the transition may be ignored or cause
 .BR execve (2)
 to fail at SELinux's whim.  (In particular, this is unlikely to work in
@@ -160,7 +163,7 @@ This is similar to
 .BI \-\-apparmor\-profile " profile"
 Request a particular AppArmor profile (using a transition on exec).  This will
 fail and cause
-.BR setpriv (1)
+.BR setpriv
 to abort if AppArmor is not in use, and the transition may be ignored or cause
 .BR execve (2)
 to fail at AppArmor's whim.
@@ -187,7 +190,9 @@ will not be run and
 will return with exit status 127.
 .PP
 Be careful with this tool \-\- it may have unexpected security consequences.
-For example, setting no_new_privs and then execing a program that is
+For example, setting
+.I no_new_privs
+and then execing a program that is
 SELinux\-confined (as this tool would do) may prevent the SELinux
 restrictions from taking effect.
 .SH EXAMPLES
-- 
2.26.2


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

* [PATCH 04/10] Manual pages: mount.8, umount.8: Clarify that "namespace" means "mount namespace"
  2020-05-28 14:58 [PATCH 01/10] Manual pages: unshare.1: EXAMPLES: improve persistent mount namespace example Michael Kerrisk (man-pages)
  2020-05-28 14:58 ` [PATCH 02/10] Manual pages: unshare.1: typo fix Michael Kerrisk (man-pages)
  2020-05-28 14:58 ` [PATCH 03/10] Manual pages: setpriv.1: Minor formatting and typo fixes Michael Kerrisk (man-pages)
@ 2020-05-28 14:58 ` Michael Kerrisk (man-pages)
  2020-05-28 14:58 ` [PATCH 05/10] Manual pages: mount.8, umount.8: Consistently format pathnames with italic Michael Kerrisk (man-pages)
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-05-28 14:58 UTC (permalink / raw)
  To: mtk.manpages, Karel Zak; +Cc: util-linux

There are various references to "namespaces" when it would be
clearer to say "mount namespaces". Also, add references to the
mount_namespaces(7) manual page.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
---
 sys-utils/mount.8  | 11 +++++++----
 sys-utils/umount.8 | 11 +++++++----
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/sys-utils/mount.8 b/sys-utils/mount.8
index 81bc225cb..fff060ad1 100644
--- a/sys-utils/mount.8
+++ b/sys-utils/mount.8
@@ -664,19 +664,21 @@ This is necessary for example when
 is on a read-only filesystem.
 .TP
 .BR \-N , " \-\-namespace " \fIns
-Perform mount in namespace specified by \fIns\fR.
+Perform mount in the mount namespace specified by \fIns\fR.
 \fIns\fR is either PID of process running in that namespace
 or special file representing that namespace.
 .sp
 .BR mount (8)
-switches to the namespace when it reads /etc/fstab, writes /etc/mtab (or writes to /run/mount) and calls
+switches to the mount namespace when it reads /etc/fstab,
+writes /etc/mtab (or writes to /run/mount) and calls
 .BR mount (2)
-system call, otherwise it runs in the original namespace. It means that the target namespace does not have
+system call, otherwise it runs in the original mount namespace.
+It means that the target namespace does not have
 to contain any libraries or another requirements necessary to execute
 .BR mount (2)
 command.
 .sp
-See \fBnamespaces\fR(7) for more information.
+See \fBmount_namespaces\fR(7) for more information.
 .TP
 .BR \-O , " \-\-test\-opts " \fIopts
 Limit the set of filesystems to which the
@@ -2680,6 +2682,7 @@ Karel Zak <kzak@redhat.com>
 .BR fstab (5),
 .BR nfs (5),
 .BR xfs (5),
+.BR mount_namespaces (7)
 .BR e2label (8),
 .BR findmnt (8),
 .BR losetup (8),
diff --git a/sys-utils/umount.8 b/sys-utils/umount.8
index 43363b11c..edcb6cc1f 100644
--- a/sys-utils/umount.8
+++ b/sys-utils/umount.8
@@ -68,7 +68,8 @@ filesystems. This list of the filesystems may be replaced by \fB\-\-types\fR
 umount option.
 .TP
 .BR \-A , " \-\-all\-targets"
-Unmount all mountpoints in the current namespace for the specified filesystem.
+Unmount all mountpoints in the current mount namespace
+for the specified filesystem.
 The filesystem can be specified by one of the mountpoints or the device name (or
 UUID, etc.).  When this option is used together with \fB\-\-recursive\fR, then
 all nested mounts within the filesystem are recursively unmounted.
@@ -129,19 +130,20 @@ server or a network partition. Remounts of the share will not be possible.
 
 .TP
 .BR \-N , " \-\-namespace " \fIns
-Perform umount in namespace specified by \fIns\fR.
+Perform umount in the mount namespace specified by \fIns\fR.
 \fIns\fR is either PID of process running in that namespace
 or special file representing that namespace.
 .sp
 .BR umount (8)
 switches to the namespace when it reads /etc/fstab, writes /etc/mtab (or writes to /run/mount) and calls
 .BR umount (2)
-system call, otherwise it runs in the original namespace. It means that the target namespace does not have
+system call, otherwise it runs in the original namespace.
+It means that the target mount namespace does not have
 to contain any libraries or another requirements necessary to execute
 .BR umount (2)
 command.
 .sp
-See \fBnamespaces\fR(7) for more information.
+See \fBmount_namespaces\fR(7) for more information.
 .TP
 .BR \-n , " \-\-no\-mtab"
 Unmount without writing in
@@ -278,6 +280,7 @@ command appeared in Version 6 AT&T UNIX.
 .SH SEE ALSO
 .BR umount (2),
 .BR losetup (8),
+.BR mount_namespaces (7)
 .BR mount (8)
 .SH AVAILABILITY
 The umount command is part of the util-linux package and is available from
-- 
2.26.2


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

* [PATCH 05/10] Manual pages: mount.8, umount.8: Consistently format pathnames with italic
  2020-05-28 14:58 [PATCH 01/10] Manual pages: unshare.1: EXAMPLES: improve persistent mount namespace example Michael Kerrisk (man-pages)
                   ` (2 preceding siblings ...)
  2020-05-28 14:58 ` [PATCH 04/10] Manual pages: mount.8, umount.8: Clarify that "namespace" means "mount namespace" Michael Kerrisk (man-pages)
@ 2020-05-28 14:58 ` Michael Kerrisk (man-pages)
  2020-05-28 14:58 ` [PATCH 06/10] Manual pages: mount.8: SEE ALSO: add some obvious references Michael Kerrisk (man-pages)
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-05-28 14:58 UTC (permalink / raw)
  To: mtk.manpages, Karel Zak; +Cc: util-linux

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
---
 sys-utils/mount.8  | 163 ++++++++++++++++++++++++++++++++++-----------
 sys-utils/umount.8 |  31 ++++++---
 2 files changed, 146 insertions(+), 48 deletions(-)

diff --git a/sys-utils/mount.8 b/sys-utils/mount.8
index fff060ad1..7a1782284 100644
--- a/sys-utils/mount.8
+++ b/sys-utils/mount.8
@@ -171,7 +171,9 @@ file.  Tags are
 more readable, robust and portable.  The
 .BR mount (8)
 command internally uses udev
-symlinks, so the use of symlinks in /etc/fstab has no advantage over tags.
+symlinks, so the use of symlinks in
+.I /etc/fstab
+has no advantage over tags.
 For more details see
 .BR libblkid (3).
 
@@ -284,10 +286,13 @@ are specified.  For example, to mount device
 .sp
 .RE
 This default behaviour is possible to change by command line option
-\fB\-\-options\-source\-force\fR to always read configuration from fstab. For
-non-root users
+\fB\-\-options\-source\-force\fR to always read configuration from
+.IR fstab .
+For non-root users
 .B mount
-always read fstab configuration.
+always read
+.I fstab
+configuration.
 
 .SS Non-superuser mounts
 Normally, only the superuser can mount filesystems.
@@ -310,7 +315,9 @@ using the command:
 .sp
 .RE
 Note that \fBmount\fR is very strict about non-root users and all paths
-specified on command line are verified before fstab is parsed or a helper
+specified on command line are verified before
+.I fstab
+is parsed or a helper
 program is executed. It's strongly recommended to use a valid mountpoint to
 specify filesystem, otherwise \fBmount\fR may fail. For example it's bad idea
 to use NFS or CIFS source on command line.
@@ -353,7 +360,9 @@ Remount part of the file hierarchy somewhere else.  The call is:
 .I olddir newdir
 .RE
 
-or by using this fstab entry:
+or by using this
+.I fstab
+entry:
 
 .RS
 .br
@@ -583,14 +592,18 @@ keyword).  The filesystems are mounted following their order in
 The mount command compares filesystem source, target (and fs root for bind
 mount or btrfs) to detect already mounted filesystems. The kernel table with
 already mounted filesystems is cached during \fBmount \-\-all\fR. It means
-that all duplicated fstab entries will be mounted.
+that all duplicated
+.I fstab
+entries will be mounted.
 .sp
 The option \fB\-\-all\fR is possible to use for remount operation too. In this
 case all filters (\fB\-t\fR and \fB\-O\fR) are applied to the table of already
 mounted filesystems.
 .sp
 Since version 2.35 is possible to use the command line option \fB\-o\fR to
-alter mount options from fstab (see also \fB\-\-options\-mode\fR).
+alter mount options from
+.I fstab
+(see also \fB\-\-options\-mode\fR).
 .sp
 Note that it is a bad practice to use \fBmount \-a\fR for
 .I fstab
@@ -602,7 +615,9 @@ in both places).  See above, under \fBBind mounts\fR.
 .TP
 .BR \-c , " \-\-no\-canonicalize"
 Don't canonicalize paths.  The mount command canonicalizes all paths
-(from command line or fstab) by default.  This option can be used
+(from command line or
+.IR fstab )
+by default.  This option can be used
 together with the
 .B \-f
 flag for already canonicalized absolute paths.  The option is designed for mount
@@ -633,7 +648,9 @@ flag to determine what the
 .B mount
 command is trying to do.  It can also be used to add entries for devices
 that were mounted earlier with the \fB\-n\fR option.  The \fB\-f\fR option
-checks for an existing record in /etc/mtab and fails when the record already
+checks for an existing record in
+.I /etc/mtab
+and fails when the record already
 exists (with a regular non-fake mount, this check is done by the kernel).
 .IP "\fB\-i, \-\-internal\-only\fP"
 Don't call the \fB/sbin/mount.\fIfilesystem\fR helper even if it exists.
@@ -669,8 +686,13 @@ Perform mount in the mount namespace specified by \fIns\fR.
 or special file representing that namespace.
 .sp
 .BR mount (8)
-switches to the mount namespace when it reads /etc/fstab,
-writes /etc/mtab (or writes to /run/mount) and calls
+switches to the mount namespace when it reads
+.IR /etc/fstab ,
+writes
+.I /etc/mtab
+(or writes to
+.IR /run/mount )
+and calls
 .BR mount (2)
 system call, otherwise it runs in the original mount namespace.
 It means that the target namespace does not have
@@ -741,11 +763,17 @@ sections.
 
 .TP
 .BR "\-\-options\-mode " \fImode
-Controls how to combine options from fstab/mtab with options from command line.
+Controls how to combine options from
+.IR fstab / mtab
+with options from command line.
 \fImode\fR can be one of
 .BR ignore ", " append ", " prepend " or " replace .
-For example \fBappend\fR means that options from fstab are appended to options from command line.
-Default value is \fBprepend\fR -- it means command line options are evaluated after fstab options.
+For example \fBappend\fR means that options from
+.I fstab
+are appended to options from command line.
+Default value is \fBprepend\fR -- it means command line options are evaluated after
+.I fstab
+options.
 Note that the last option wins if there are conflicting ones.
 
 .TP
@@ -760,7 +788,9 @@ Default value is \fBfstab,mtab\fR.
 
 .TP
 .B \-\-options\-source\-force
-Use options from fstab/mtab even if both \fIdevice\fR and \fIdir\fR are specified.
+Use options from
+.IR fstab / mtab
+even if both \fIdevice\fR and \fIdir\fR are specified.
 
 .TP
 .BR \-R , " \-\-rbind"
@@ -797,30 +827,44 @@ explicitly define that the argument is the mount target.
 .TP
 .BI \-\-target\-prefix " directory"
 Prepend specified directory to all mount targets.  This option allows to follow
-fstab, but mount operations is done on another place, for example:
+.IR fstab ,
+but mount operations is done on another place, for example:
 .RS
 .RS
 .sp
 .B "mount \-\-all \-\-target\-prefix /chroot \-o X\-mount.mkdir
 .sp
 .RE
-mounts all from system fstab to /chroot, all missing muontpoint are created
-(due to X-mount.mkdir).  See also \fB\-\-fstab\fP to use an alternative fstab.
+mounts all from system
+.I fstab
+to
+.IR /chroot ,
+all missing muontpoint are created
+(due to X-mount.mkdir).  See also \fB\-\-fstab\fP to use an alternative
+.IR fstab .
 .RE
 .TP
 .BR \-T , " \-\-fstab " \fIpath
-Specifies an alternative fstab file.  If \fIpath\fP is a directory then the files
+Specifies an alternative
+.I fstab
+file.  If \fIpath\fP is a directory then the files
 in the directory are sorted by
 .BR strverscmp (3);
-files that start with "."\& or without an \&.fstab extension are ignored.  The option
+files that start with "."\& or without an
+.I \&.fstab
+extension are ignored.  The option
 can be specified more than once.  This option is mostly designed for initramfs
 or chroot scripts where additional configuration is specified beyond standard
 system configuration.
 .sp
 Note that \fBmount\fR(8) does not pass the option \fB\-\-fstab\fP to the
-\fB/sbin/mount.\fItype\fR helpers, meaning that the alternative fstab files will be
+\fB/sbin/mount.\fItype\fR helpers, meaning that the alternative
+.I fstab
+files will be
 invisible for the helpers.  This is no problem for normal mounts, but user
-(non-root) mounts always require fstab to verify the user's rights.
+(non-root) mounts always require
+.I fstab
+to verify the user's rights.
 .TP
 .BR \-t , " \-\-types " \fIfstype
 The argument following the
@@ -958,7 +1002,9 @@ file.
 
 Some of these options could be enabled or disabled by default
 in the system kernel.  To check the current setting see the options
-in /proc/mounts.  Note that filesystems also have per-filesystem
+in
+.IR /proc/mounts .
+Note that filesystems also have per-filesystem
 specific default mount options (see for example \fBtune2fs \-l\fP
 output for extN filesystems).
 
@@ -1160,7 +1206,8 @@ possible for the kernel to default to
 or
 .B \%noatime
 but still allow userspace to override it.  For more details about the default
-system mount options see /proc/mounts.
+system mount options see
+.IR /proc/mounts .
 .TP
 .B nostrictatime
 Use the kernel's default behavior for inode access time updates.
@@ -1223,8 +1270,13 @@ The remount operation together with the
 flag has special semantic. See above, the subsection \fBBind mounts\fR.
 
 The remount functionality follows the standard way the mount command works
-with options from fstab.  This means that \fBmount\fR does not
-read fstab (or mtab) only when both
+with options from
+.IR fstab .
+This means that \fBmount\fR does not read
+.I fstab
+(or
+.IR mtab )
+only when both
 .I device
 and
 .I dir
@@ -1235,16 +1287,23 @@ are specified.
 .in
 .sp
 After this call all old mount options are replaced and arbitrary stuff from
-fstab (or mtab) is ignored, except the loop= option which is internally
+.I fstab
+(or
+.IR mtab )
+is ignored, except the loop= option which is internally
 generated and maintained by the mount command.
 .sp
 .in +4
 .B "mount \-o remount,rw  /dir"
 .in
 .sp
-After this call, mount reads fstab and merges these options with
+After this call, mount reads
+.I fstab
+and merges these options with
 the options from the command line (\fB\-o\fR).
-If no mountpoint is found in fstab, then a remount with unspecified source is
+If no mountpoint is found in
+.IR fstab ,
+then a remount with unspecified source is
 allowed.
 .sp
 mount(8) allows to use \fB\-\-all\fR to remount all already mounted filesystems
@@ -1256,7 +1315,11 @@ which match a specified filter (\fB\-O\fR and \fB\-t\fR).  For example:
 .sp
 remounts all already mounted vfat filesystems in read-only mode. The each of the
 filesystems is remounted by "mount \-o remount,ro /dir" semantic. It means the
-mount command reads fstab or mtab and merges these options with the options
+mount command reads
+.I fstab
+or
+.I mtab
+and merges these options with the options
 from the command line.
 .TP
 .B ro
@@ -1272,8 +1335,14 @@ media with a limited number of write cycles
 .TP
 .B user
 Allow an ordinary user to mount the filesystem.
-The name of the mounting user is written to the mtab file (or to the private
-libmount file in /run/mount on systems without a regular mtab) so that this
+The name of the mounting user is written to the
+.I mtab
+file (or to the private
+libmount file in
+.I /run/mount
+on systems without a regular
+.IR mtab )
+so that this
 same user can unmount the filesystem again.
 This option implies the options
 .BR noexec ", " nosuid ", and " nodev
@@ -1294,7 +1363,10 @@ This option implies the options
 .TP
 .B X-*
 All options prefixed with "X-" are interpreted as comments or as userspace
-application-specific options.  These options are not stored in the user space (e.g., mtab file),
+application-specific options.
+These options are not stored in the user space (e.g.,
+.I mtab
+file),
 nor sent to the mount.\fItype\fR helpers nor to the
 .BR mount (2)
 system call.  The suggested format is \fBX-\fIappname\fR.\fIoption\fR.
@@ -1309,7 +1381,9 @@ available (for example after a move mount operation or in unshared namespace).
 Note that before util-linux v2.30 the x-* options have not been maintained by
 libmount and stored in user space (functionality was the same as have X-* now),
 but due to growing number of use-cases (in initrd, systemd etc.) the
-functionality have been extended to keep existing fstab configurations usable
+functionality have been extended to keep existing
+.I fstab
+configurations usable
 without a change.
 .TP
 .BR X-mount.mkdir [ = \fImode\fR ]
@@ -2578,9 +2652,13 @@ comma-separated list as argument to the \fB\-o\fR option.
 
 .SH ENVIRONMENT
 .IP LIBMOUNT_FSTAB=<path>
-overrides the default location of the fstab file (ignored for suid)
+overrides the default location of the
+.I fstab
+file (ignored for suid)
 .IP LIBMOUNT_MTAB=<path>
-overrides the default location of the mtab file (ignored for suid)
+overrides the default location of the
+.I mtab
+file (ignored for suid)
 .IP LIBMOUNT_DEBUG=all
 enables libmount debug output
 .IP LIBBLKID_DEBUG=all
@@ -2597,7 +2675,8 @@ filesystem table
 libmount private runtime directory
 .TP
 .I /etc/mtab
-table of mounted filesystems or symlink to /proc/mounts
+table of mounted filesystems or symlink to
+.I /proc/mounts
 .TP
 .I /etc/mtab\s+3~\s0
 lock file (unused on systems with mtab symlink)
@@ -2643,8 +2722,12 @@ don't match on systems with a regular mtab file.  The first file is based only o
 the mount command options, but the content of the second file also depends on
 the kernel and others settings (e.g.\& on a remote NFS server -- in certain cases
 the mount command may report unreliable information about an NFS mount point
-and the /proc/mounts file usually contains more reliable information.)  This is
-another reason to replace the mtab file with a symlink to the
+and the
+.I /proc/mount
+file usually contains more reliable information.)  This is
+another reason to replace the
+.I mtab
+file with a symlink to the
 .I /proc/mounts
 file.
 .PP
diff --git a/sys-utils/umount.8 b/sys-utils/umount.8
index edcb6cc1f..c56e51e18 100644
--- a/sys-utils/umount.8
+++ b/sys-utils/umount.8
@@ -62,7 +62,8 @@ issues. See \fB\-\-lazy\fR description below.
 .BR \-a , " \-\-all"
 All of the filesystems described in
 .I /proc/self/mountinfo
-(or in deprecated /etc/mtab)
+(or in deprecated
+.IR /etc/mtab )
 are unmounted, except the proc, devfs, devpts, sysfs, rpc_pipefs and nfsd
 filesystems. This list of the filesystems may be replaced by \fB\-\-types\fR
 umount option.
@@ -73,8 +74,11 @@ for the specified filesystem.
 The filesystem can be specified by one of the mountpoints or the device name (or
 UUID, etc.).  When this option is used together with \fB\-\-recursive\fR, then
 all nested mounts within the filesystem are recursively unmounted.
-This option is only supported on systems where /etc/mtab is a symlink
-to /proc/mounts.
+This option is only supported on systems where
+.I /etc/mtab
+is a symlink
+to
+.IR /proc/mounts .
 .TP
 .BR \-c , " \-\-no\-canonicalize"
 Do not canonicalize paths.  The paths canonicalization is based on
@@ -135,7 +139,13 @@ Perform umount in the mount namespace specified by \fIns\fR.
 or special file representing that namespace.
 .sp
 .BR umount (8)
-switches to the namespace when it reads /etc/fstab, writes /etc/mtab (or writes to /run/mount) and calls
+switches to the namespace when it reads
+.IR /etc/fstab ,
+writes
+.IR /etc/mtab
+(or writes to
+.IR /run/mount )
+and calls
 .BR umount (2)
 system call, otherwise it runs in the original namespace.
 It means that the target mount namespace does not have
@@ -163,7 +173,9 @@ Suppress "not mounted" error messages.
 .BR \-R , " \-\-recursive"
 Recursively unmount each specified directory.  Recursion for each directory will
 stop if any unmount operation in the chain fails for any reason.  The relationship
-between mountpoints is determined by /proc/self/mountinfo entries.  The filesystem
+between mountpoints is determined by
+.I /proc/self/mountinfo
+entries.  The filesystem
 must be specified by mountpoint path; a recursive unmount by device name (or UUID)
 is unsupported.
 .TP
@@ -181,7 +193,8 @@ to indicate that no action should be taken for all of the mentioned types.
 Note that
 .B umount
 reads information about mounted filesystems from kernel (/proc/mounts) and
-filesystem names may be different than filesystem names used in the /etc/fstab
+filesystem names may be different than filesystem names used in the
+.I /etc/fstab
 (e.g., "nfs4" vs. "nfs").
 .TP
 .BR \-v , " \-\-verbose"
@@ -216,7 +229,8 @@ The
 .B umount
 command will automatically detach loop device previously initialized by
 .BR mount (8)
-command independently of /etc/mtab.
+command independently of
+.IR /etc/mtab .
 
 In this case the device is initialized with "autoclear" flag (see
 .BR losetup (8)
@@ -266,7 +280,8 @@ enables libmount debug output
 .TP
 .I /etc/mtab
 table of mounted filesystems (deprecated and usually replaced by
-symlink to /proc/mounts)
+symlink to
+.IR /proc/mounts )
 .TP
 .I /etc/fstab
 table of known filesystems
-- 
2.26.2


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

* [PATCH 06/10] Manual pages: mount.8: SEE ALSO: add some obvious references
  2020-05-28 14:58 [PATCH 01/10] Manual pages: unshare.1: EXAMPLES: improve persistent mount namespace example Michael Kerrisk (man-pages)
                   ` (3 preceding siblings ...)
  2020-05-28 14:58 ` [PATCH 05/10] Manual pages: mount.8, umount.8: Consistently format pathnames with italic Michael Kerrisk (man-pages)
@ 2020-05-28 14:58 ` Michael Kerrisk (man-pages)
  2020-05-28 14:58 ` [PATCH 07/10] Manual pages: mount.8: Typo fix (remove an accidental paragraph break) Michael Kerrisk (man-pages)
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-05-28 14:58 UTC (permalink / raw)
  To: mtk.manpages, Karel Zak; +Cc: util-linux

And correct sort order for "umount(8)" entry.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
---
 sys-utils/mount.8 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sys-utils/mount.8 b/sys-utils/mount.8
index 7a1782284..b7a14de4e 100644
--- a/sys-utils/mount.8
+++ b/sys-utils/mount.8
@@ -2759,13 +2759,15 @@ Karel Zak <kzak@redhat.com>
 .fi
 .SH SEE ALSO
 .na
+.BR lsblk (1),
 .BR mount (2),
 .BR umount (2),
-.BR umount (8),
+.BR fileystems (5),
 .BR fstab (5),
 .BR nfs (5),
 .BR xfs (5),
 .BR mount_namespaces (7)
+.BR xattr (7)
 .BR e2label (8),
 .BR findmnt (8),
 .BR losetup (8),
@@ -2774,6 +2776,7 @@ Karel Zak <kzak@redhat.com>
 .BR nfsd (8),
 .BR swapon (8),
 .BR tune2fs (8),
+.BR umount (8),
 .BR xfs_admin (8)
 .ad
 .SH AVAILABILITY
-- 
2.26.2


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

* [PATCH 07/10] Manual pages: mount.8: Typo fix (remove an accidental paragraph break)
  2020-05-28 14:58 [PATCH 01/10] Manual pages: unshare.1: EXAMPLES: improve persistent mount namespace example Michael Kerrisk (man-pages)
                   ` (4 preceding siblings ...)
  2020-05-28 14:58 ` [PATCH 06/10] Manual pages: mount.8: SEE ALSO: add some obvious references Michael Kerrisk (man-pages)
@ 2020-05-28 14:58 ` Michael Kerrisk (man-pages)
  2020-05-28 14:58 ` [PATCH 08/10] Manual pages: mount.8: Rewrite FILESYSTEM-SPECIFIC MOUNT OPTIONS intro Michael Kerrisk (man-pages)
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 13+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-05-28 14:58 UTC (permalink / raw)
  To: mtk.manpages, Karel Zak; +Cc: util-linux

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
---
 sys-utils/mount.8 | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sys-utils/mount.8 b/sys-utils/mount.8
index b7a14de4e..7fa5733d4 100644
--- a/sys-utils/mount.8
+++ b/sys-utils/mount.8
@@ -1048,7 +1048,6 @@ The
 option is useful when mounting filesystems that do not support
 extended attributes, such as a floppy or hard disk formatted with VFAT, or
 systems that are not normally running under SELinux, such as an ext3 or ext4 formatted
-
 disk from a non-SELinux workstation.  You can also use
 .B context=
 on filesystems you do not trust, such as a floppy.  It also helps in compatibility with
-- 
2.26.2


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

* [PATCH 08/10] Manual pages: mount.8: Rewrite FILESYSTEM-SPECIFIC MOUNT OPTIONS intro
  2020-05-28 14:58 [PATCH 01/10] Manual pages: unshare.1: EXAMPLES: improve persistent mount namespace example Michael Kerrisk (man-pages)
                   ` (5 preceding siblings ...)
  2020-05-28 14:58 ` [PATCH 07/10] Manual pages: mount.8: Typo fix (remove an accidental paragraph break) Michael Kerrisk (man-pages)
@ 2020-05-28 14:58 ` Michael Kerrisk (man-pages)
  2020-05-28 14:58 ` [PATCH 09/10] Manual pages: umount.8: use "filesystem" consistently Michael Kerrisk (man-pages)
  2020-05-29  7:46 ` [PATCH 01/10] Manual pages: unshare.1: EXAMPLES: improve persistent mount namespace example Karel Zak
  8 siblings, 0 replies; 13+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-05-28 14:58 UTC (permalink / raw)
  To: mtk.manpages, Karel Zak; +Cc: util-linux

Add a table listing other manual pages that describe mount options
of some widely used filesystems. Additionally, rewrite the remaining
text to be a bit easier to read.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
---
 sys-utils/mount.8 | 38 ++++++++++++++++++++++++++------------
 1 file changed, 26 insertions(+), 12 deletions(-)

diff --git a/sys-utils/mount.8 b/sys-utils/mount.8
index 7fa5733d4..94cb570a1 100644
--- a/sys-utils/mount.8
+++ b/sys-utils/mount.8
@@ -1396,23 +1396,37 @@ only for root users or when mount executed without suid permissions.  The option
 is also supported as x-mount.mkdir, this notation is deprecated since v2.30.
 
 .SH FILESYSTEM-SPECIFIC MOUNT OPTIONS
-You should consult the respective man page for the filesystem first.
-If you want to know what options the ext4 filesystem supports, then check the
-.BR ext4 (5)
-man page.
-If that doesn't exist, you can also check the corresponding mount page like
-.BR mount.cifs (8).
-Note that you might have to install the respective userland tools.
-.sp
+This section lists options that are specific to particular filesystems.
+Where possible, you should first consult filesystem-specific manual pages
+for details.
+Some of those pages are listed in the following table.
+.TS
+lb lb
+l l.
+Filesystem(s)	Manual page
+btrfs	\fBbtrfs\fP(5)
+cifs	\fBmount.cifs\fP(8)
+ext2, ext3, ext4	\fBext4\fP(5)
+fuse	\fBfuse\fP(8)
+nfs	\fBnfs\fP(5)
+tmpfs	\fBtmpfs\fP(5)
+xfs	\fBxfs\fP(5)
+.TE
+.PP
+Note that some of the pages listed above might be available only
+after you install the respective userland tools.
+.PP
 The following options apply only to certain filesystems.
-We sort them by filesystem.  They all follow the
+We sort them by filesystem.
+All options follow the
 .B \-o
 flag.
-.sp
+.PP
 What options are supported depends a bit on the running kernel.
-More info may be found in the kernel source subdirectory
+Further information may be available in fileystem-specific
+files in the kernel source subdirectory
 .IR Documentation/filesystems .
-
+.\"
 .SS "Mount options for adfs"
 .TP
 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
-- 
2.26.2


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

* [PATCH 09/10] Manual pages: umount.8: use "filesystem" consistently
  2020-05-28 14:58 [PATCH 01/10] Manual pages: unshare.1: EXAMPLES: improve persistent mount namespace example Michael Kerrisk (man-pages)
                   ` (6 preceding siblings ...)
  2020-05-28 14:58 ` [PATCH 08/10] Manual pages: mount.8: Rewrite FILESYSTEM-SPECIFIC MOUNT OPTIONS intro Michael Kerrisk (man-pages)
@ 2020-05-28 14:58 ` Michael Kerrisk (man-pages)
  2020-05-29  7:46 ` [PATCH 01/10] Manual pages: unshare.1: EXAMPLES: improve persistent mount namespace example Karel Zak
  8 siblings, 0 replies; 13+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-05-28 14:58 UTC (permalink / raw)
  To: mtk.manpages, Karel Zak; +Cc: util-linux

Currently, this page has a mix of "filesystem" and file system",
with the former being predominant.  Let's settle on one.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
---
 sys-utils/umount.8 | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sys-utils/umount.8 b/sys-utils/umount.8
index c56e51e18..f04746211 100644
--- a/sys-utils/umount.8
+++ b/sys-utils/umount.8
@@ -24,7 +24,7 @@
 .\"
 .TH UMOUNT 8 "July 2014" "util-linux" "System Administration"
 .SH NAME
-umount \- unmount file systems
+umount \- unmount filesystems
 .SH SYNOPSIS
 .B umount \-a
 .RB [ \-dflnrv ]
@@ -43,13 +43,13 @@ umount \- unmount file systems
 .SH DESCRIPTION
 The
 .B umount
-command detaches the mentioned file system(s) from the file hierarchy.  A
-file system is specified by giving the directory where it has been
-mounted.  Giving the special device on which the file system lives may
+command detaches the mentioned filesystem(s) from the file hierarchy.  A
+filesystem is specified by giving the directory where it has been
+mounted.  Giving the special device on which the filesystem lives may
 also work, but is obsolete, mainly because it will fail in case this
 device was mounted on more than one directory.
 .PP
-Note that a file system cannot be unmounted when it is 'busy' - for
+Note that a filesystem cannot be unmounted when it is 'busy' - for
 example, when there are open files on it, or when some process has its
 working directory there, or when a swap file on it is in use.  The
 offending process could even be
-- 
2.26.2


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

* Re: [PATCH 01/10] Manual pages: unshare.1: EXAMPLES: improve persistent mount namespace example
  2020-05-28 14:58 [PATCH 01/10] Manual pages: unshare.1: EXAMPLES: improve persistent mount namespace example Michael Kerrisk (man-pages)
                   ` (7 preceding siblings ...)
  2020-05-28 14:58 ` [PATCH 09/10] Manual pages: umount.8: use "filesystem" consistently Michael Kerrisk (man-pages)
@ 2020-05-29  7:46 ` Karel Zak
  2020-05-29  8:54   ` John Paul Adrian Glaubitz
  2020-05-29 13:22   ` Michael Kerrisk
  8 siblings, 2 replies; 13+ messages in thread
From: Karel Zak @ 2020-05-29  7:46 UTC (permalink / raw)
  To: Michael Kerrisk (man-pages); +Cc: util-linux

On Thu, May 28, 2020 at 04:58:15PM +0200, Michael Kerrisk (man-pages) wrote:
>  sys-utils/unshare.1 | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)

All 10 patches applied. Thanks!

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


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

* Re: [PATCH 01/10] Manual pages: unshare.1: EXAMPLES: improve persistent mount namespace example
  2020-05-29  7:46 ` [PATCH 01/10] Manual pages: unshare.1: EXAMPLES: improve persistent mount namespace example Karel Zak
@ 2020-05-29  8:54   ` John Paul Adrian Glaubitz
  2020-05-29 12:43     ` Karel Zak
  2020-05-29 13:22   ` Michael Kerrisk
  1 sibling, 1 reply; 13+ messages in thread
From: John Paul Adrian Glaubitz @ 2020-05-29  8:54 UTC (permalink / raw)
  To: Karel Zak, Michael Kerrisk (man-pages); +Cc: util-linux

Hi Karel!

On 5/29/20 9:46 AM, Karel Zak wrote:
> On Thu, May 28, 2020 at 04:58:15PM +0200, Michael Kerrisk (man-pages) wrote:
>>  sys-utils/unshare.1 | 13 ++++++++++---
>>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> All 10 patches applied. Thanks!
I just wanted to say Thank You to you for being such a busy maintainer! It's really
refreshing to see how fast new patches are reviewed and applied for util-linux
knowing that in other projects, reviews can take days or even weeks!

Kudos!

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

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

* Re: [PATCH 01/10] Manual pages: unshare.1: EXAMPLES: improve persistent mount namespace example
  2020-05-29  8:54   ` John Paul Adrian Glaubitz
@ 2020-05-29 12:43     ` Karel Zak
  0 siblings, 0 replies; 13+ messages in thread
From: Karel Zak @ 2020-05-29 12:43 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz; +Cc: Michael Kerrisk (man-pages), util-linux

On Fri, May 29, 2020 at 10:54:03AM +0200, John Paul Adrian Glaubitz wrote:
> > All 10 patches applied. Thanks!
> I just wanted to say Thank You to you for being such a busy maintainer! It's really

Thanks to Red Hat -- it's my fulltime job (together maintenance for RHEL/Fedora).

> refreshing to see how fast new patches are reviewed and applied for util-linux
> knowing that in other projects, reviews can take days or even weeks!

Well, on github we have some pending issues/PR ...

Thanks for your feedback :-)

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


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

* Re: [PATCH 01/10] Manual pages: unshare.1: EXAMPLES: improve persistent mount namespace example
  2020-05-29  7:46 ` [PATCH 01/10] Manual pages: unshare.1: EXAMPLES: improve persistent mount namespace example Karel Zak
  2020-05-29  8:54   ` John Paul Adrian Glaubitz
@ 2020-05-29 13:22   ` Michael Kerrisk
  1 sibling, 0 replies; 13+ messages in thread
From: Michael Kerrisk @ 2020-05-29 13:22 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux

Thanks, Karel!

On Fri, May 29, 2020 at 9:47 AM Karel Zak <kzak@redhat.com> wrote:
>
> On Thu, May 28, 2020 at 04:58:15PM +0200, Michael Kerrisk (man-pages) wrote:
> >  sys-utils/unshare.1 | 13 ++++++++++---
> >  1 file changed, 10 insertions(+), 3 deletions(-)
>
> All 10 patches applied. Thanks!
>
>     Karel
>
> --
>  Karel Zak  <kzak@redhat.com>
>  http://karelzak.blogspot.com
>

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

end of thread, other threads:[~2020-05-29 13:22 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28 14:58 [PATCH 01/10] Manual pages: unshare.1: EXAMPLES: improve persistent mount namespace example Michael Kerrisk (man-pages)
2020-05-28 14:58 ` [PATCH 02/10] Manual pages: unshare.1: typo fix Michael Kerrisk (man-pages)
2020-05-28 14:58 ` [PATCH 03/10] Manual pages: setpriv.1: Minor formatting and typo fixes Michael Kerrisk (man-pages)
2020-05-28 14:58 ` [PATCH 04/10] Manual pages: mount.8, umount.8: Clarify that "namespace" means "mount namespace" Michael Kerrisk (man-pages)
2020-05-28 14:58 ` [PATCH 05/10] Manual pages: mount.8, umount.8: Consistently format pathnames with italic Michael Kerrisk (man-pages)
2020-05-28 14:58 ` [PATCH 06/10] Manual pages: mount.8: SEE ALSO: add some obvious references Michael Kerrisk (man-pages)
2020-05-28 14:58 ` [PATCH 07/10] Manual pages: mount.8: Typo fix (remove an accidental paragraph break) Michael Kerrisk (man-pages)
2020-05-28 14:58 ` [PATCH 08/10] Manual pages: mount.8: Rewrite FILESYSTEM-SPECIFIC MOUNT OPTIONS intro Michael Kerrisk (man-pages)
2020-05-28 14:58 ` [PATCH 09/10] Manual pages: umount.8: use "filesystem" consistently Michael Kerrisk (man-pages)
2020-05-29  7:46 ` [PATCH 01/10] Manual pages: unshare.1: EXAMPLES: improve persistent mount namespace example Karel Zak
2020-05-29  8:54   ` John Paul Adrian Glaubitz
2020-05-29 12:43     ` Karel Zak
2020-05-29 13:22   ` Michael Kerrisk

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