Skip to contentSkip to conversation

sys-utils: fix SELinux context example in mount.8

PATCH Applied Todd Zullinger 2 participants 2 messages Jun 18, 2023 – Jun 20, 2023 Util-Linux package

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sys-utils: fix SELinux context example in mount.8

In the description of the context option, the example which shows how to properly quote is displayed incorrectly on terminals > 80 columns. This leaves a seemingly needless '\' in the command, e.g.:

mount -t tmpfs none /mnt -o \ 'context="system_u:...'

The intent is to display the command properly on terminals <= 80 columns. Use a literal block to ensure the code is displayed consistently, regardless of the terminal width.

Connect the blockquote to the previous indented items in the context option description to ensure it is properly indented.

---
 sys-utils/mount.8.adoc | 3 +++
 1 file changed, 3 insertions(+)
sys-utils/mount.8.adoc +3 -0
index bb2e4c911..efff26cfd 100644
@@ -521,9 +521,12 @@ The *rootcontext=* option allows you to explicitly label the root inode of a FS
 Note that the kernel rejects any remount request that includes the context option, *even* when unchanged from the current context.
 +
 *Warning: the* _context_ *value might contain commas*, in which case the value has to be properly quoted, otherwise *mount* will interpret the comma as a separator between mount options. Don't forget that the shell strips off quotes and thus *double quoting is required*. For example:
++
 ____
+....
 mount -t tmpfs none /mnt -o \
 'context="system_u:object_r:tmp_t:s0:c127,c456",noexec'
+....
 ____
 
 For more details, see *selinux*(8).
Signature · 1 line
2.41.0
maintainer Applied
#1 lore raw
Quoted 2 lines · Todd Zullinger
 sys-utils/mount.8.adoc | 3 +++
 1 file changed, 3 insertions(+)

Applied, thanks.

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com