Util-Linux Archive mirror
 help / color / mirror / Atom feed
From: Todd Zullinger <tmz@pobox.com>
To: util-linux@vger.kernel.org
Subject: [PATCH] sys-utils: fix SELinux context example in mount.8
Date: Sun, 18 Jun 2023 17:29:11 -0400	[thread overview]
Message-ID: <20230618212911.549645-1-tmz@pobox.com> (raw)

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.

Signed-off-by: Todd Zullinger <tmz@pobox.com>
---
 sys-utils/mount.8.adoc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys-utils/mount.8.adoc b/sys-utils/mount.8.adoc
index bb2e4c911..efff26cfd 100644
--- a/sys-utils/mount.8.adoc
+++ b/sys-utils/mount.8.adoc
@@ -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).
-- 
2.41.0


             reply	other threads:[~2023-06-18 21:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-18 21:29 Todd Zullinger [this message]
2023-06-20  9:28 ` [PATCH] sys-utils: fix SELinux context example in mount.8 Karel Zak

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=20230618212911.549645-1-tmz@pobox.com \
    --to=tmz@pobox.com \
    --cc=util-linux@vger.kernel.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).