SELinux Security Module development
 help / color / mirror / Atom feed
From: Petr Lautrbach <plautrba@redhat.com>
To: Vit Mojzis <vmojzis@redhat.com>, selinux@vger.kernel.org
Subject: Re: [PATCH 5/5] libselinux: Add examples to man pages
Date: Wed, 31 May 2023 16:56:54 +0200	[thread overview]
Message-ID: <87ttvsk0qx.fsf@redhat.com> (raw)
In-Reply-To: <20230524111535.1743163-5-vmojzis@redhat.com>

Vit Mojzis <vmojzis@redhat.com> writes:

> Also fix some typos and remove trailing whitespaces.
>
> Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
>

Acked-by: Petr Lautrbach <lautrbach@redhat.com>

> ---
>  libselinux/man/man8/getsebool.8    | 18 +++++++++++-------
>  libselinux/man/man8/matchpathcon.8 | 19 +++++++++++++------
>  2 files changed, 24 insertions(+), 13 deletions(-)
>
> diff --git a/libselinux/man/man8/getsebool.8 b/libselinux/man/man8/getsebool.8
> index d70bf1e4..9e36f04f 100644
> --- a/libselinux/man/man8/getsebool.8
> +++ b/libselinux/man/man8/getsebool.8
> @@ -1,6 +1,6 @@
>  .TH "getsebool" "8" "11 Aug 2004" "dwalsh@redhat.com" "SELinux Command Line documentation"
>  .SH "NAME"
> -getsebool \- get SELinux boolean value(s) 
> +getsebool \- get SELinux boolean value(s)
>  .
>  .SH "SYNOPSIS"
>  .B getsebool
> @@ -8,17 +8,16 @@ getsebool \- get SELinux boolean value(s)
>  .RI [ boolean ]
>  .
>  .SH "DESCRIPTION"
> -.B getsebool 
> -reports where a particular SELinux boolean or
> -all SELinux booleans are on or off
> -In certain situations a boolean can be in one state with a pending 
> -change to the other state.  getsebool will report this as a pending change.
> +.B getsebool
> +reports whether a particular SELinux boolean, or all SELinux booleans, are on or off.
> +In certain situations a boolean can be in one state with a pending
> +change to the other state. getsebool will report this as a pending change.
>  The pending value indicates
>  the value that will be applied upon the next boolean commit.
>  
>  The setting of boolean values occurs in two stages; first the pending
>  value is changed, then the booleans are committed, causing their
> -active values to become their pending values.  This allows a group of
> +active values to become their pending values. This allows a group of
>  booleans to be changed in a single transaction, by setting all of
>  their pending values as desired and then committing once.
>  .
> @@ -27,6 +26,11 @@ their pending values as desired and then committing once.
>  .B \-a
>  Show all SELinux booleans.
>  .
> +.SH EXAMPLE
> +.nf
> +Show current state of httpd_can_connect_ftp
> +# getsebool httpd_can_connect_ftp
> +.
>  .SH AUTHOR
>  This manual page was written by Dan Walsh <dwalsh@redhat.com>.
>  The program was written by Tresys Technology.
> diff --git a/libselinux/man/man8/matchpathcon.8 b/libselinux/man/man8/matchpathcon.8
> index 50c0d392..6d848f43 100644
> --- a/libselinux/man/man8/matchpathcon.8
> +++ b/libselinux/man/man8/matchpathcon.8
> @@ -25,8 +25,8 @@ queries the system policy and outputs the default security context associated wi
>  Identical paths can have different security contexts, depending on the file
>  type (regular file, directory, link file, char file ...).
>  
> -.B matchpathcon 
> -will also take the file type into consideration in determining the default security context if the file exists.  If the file does not exist, no file type matching will occur.
> +.B matchpathcon
> +will also take the file type into consideration in determining the default security context if the file exists. If the file does not exist, no file type matching will occur.
>  .
>  .SH OPTIONS
>  .TP
> @@ -34,19 +34,19 @@ will also take the file type into consideration in determining the default secur
>  Force file type for the lookup.
>  Valid types are
>  .BR file ", " dir ", "pipe ", " chr_file ", " blk_file ", "
> -.BR lnk_file ", " sock_file .
> +.BR lnk_file ", " sock_file
>  .TP
>  .B \-n
> -Do not display path.
> +Do not display path
>  .TP
>  .B \-N
> -Do not use translations.
> +Do not use translations
>  .TP
>  .BI \-f " file_context_file"
>  Use alternate file_context file
>  .TP
>  .BI \-p " prefix"
> -Use prefix to speed translations
> +Use prefix to speed up translations
>  .TP
>  .BI \-P " policy_root_path"
>  Use alternate policy root path
> @@ -54,6 +54,13 @@ Use alternate policy root path
>  .B \-V
>  Verify file context on disk matches defaults
>  .
> +.SH EXAMPLE
> +.nf
> +Show the default label of sock_file cups.sock
> +# matchpathcon -m sock_file /var/run/cups/cups.sock
> +Verify that /var/www/html directory is labeled correctly (the content of the folder is not checked)
> +# matchpathcon -V /var/www/html
> +.
>  .SH AUTHOR
>  This manual page was written by Dan Walsh <dwalsh@redhat.com>.
>  .
> -- 
> 2.40.0


  reply	other threads:[~2023-05-31 14:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24 11:15 [PATCH 1/5] policycoreutils: Add examples to man pages Vit Mojzis
2023-05-24 11:15 ` [PATCH 2/5] python/sepolicy: Improve " Vit Mojzis
2023-05-31 14:37   ` Petr Lautrbach
2023-05-24 11:15 ` [PATCH 3/5] sandbox: Add examples to " Vit Mojzis
2023-05-24 11:15 ` [PATCH 4/5] checkpolicy: " Vit Mojzis
2023-05-31 14:44   ` Petr Lautrbach
2023-05-24 11:15 ` [PATCH 5/5] libselinux: " Vit Mojzis
2023-05-31 14:56   ` Petr Lautrbach [this message]
2023-06-01 14:39     ` [PATCH v2 1/5] policycoreutils: " Vit Mojzis
2023-06-01 14:39       ` [PATCH v2 2/5] python/sepolicy: Improve " Vit Mojzis
2023-06-01 14:39       ` [PATCH v2 3/5] sandbox: Add examples to " Vit Mojzis
2023-06-01 14:39       ` [PATCH v2 4/5] checkpolicy: " Vit Mojzis
2023-06-01 14:39       ` [PATCH v2 5/5] libselinux: " Vit Mojzis
2023-06-06  8:09       ` [PATCH v2 1/5] policycoreutils: " Petr Lautrbach
2023-06-08 19:51         ` James Carter
2023-05-31 14:14 ` [PATCH " Petr Lautrbach

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=87ttvsk0qx.fsf@redhat.com \
    --to=plautrba@redhat.com \
    --cc=selinux@vger.kernel.org \
    --cc=vmojzis@redhat.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