Pádraig Brady wrote:
> Jim Meyering wrote:
>> Pádraig Brady wrote:
>> ...
>>> I'll also look at documenting the ls SElinux options in the info docs
>>> as I couldn't see them on a quick search.
>>
>> Nice.  That will we welcome.
>> If you feel really industrious, mktemp needs info documentation, too.
>
> Ah the SELinux stuff was a TODO, and not just for `ls`.
> Hopefully I caught them all in the attached.
>
> cheers,
> Pádraig.
>
> p.s. I noticed some inconsistencies with how contexts were handled.
> For example `mkdir`, `mkfifo`, `mknod` don't check is_selinux_enabled()
> whereas `install` does. Probably OK, but worth noting I think.

I think it's fine.

When the mk* commands try to perform selinux-related syscalls, they'll
fail due an error return from one of the stub replacement functions.
The test in install is so that -Z and --preserve-context can be used
without penalty on non-SELinux-enabled systems.  I didn't want to do
that for the mk* programs.

quick comments on doc changes:
First, thanks a lot.
This is long overdue.

>>From 39b4994561ccec9ba1cd9e10cb33b6b308dbcf6b Mon Sep 17 00:00:00 2001
> From: =?utf-8?q?P=C3=A1draig=20Brady?= <p...@draigbrady.com>
> Date: Mon, 6 Apr 2009 19:21:51 +0100
> Subject: [PATCH] doc: add missing documentation for some SELinux options
>
> * doc/coreutils.texi (ls invocation): Describe the --context (-Z) option
> (install invocation): Describe the --preserve-context and -Z options
> (id invocation): Describe the --context (-Z) option
> (mkdir invocation): Describe the --context (-Z) option
> (mknod invocation): Describe the --context (-Z) option
> (mkfifo invocation): Describe the --context (-Z) option
> * TODO: remove the todo item
> ---
>  TODO               |    1 -
>  doc/coreutils.texi |   64 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 64 insertions(+), 1 deletions(-)
>
> diff --git a/TODO b/TODO
> index 7288285..9128ddf 100644
> --- a/TODO
> +++ b/TODO
> @@ -15,7 +15,6 @@ document the following in coreutils.texi:
>    mktemp
>    [
>    pinky
> -Also document the SELinux changes.
>
>  Suggestion from Paul Eggert:
>    More generally, there's not that much use for imaxtostr nowadays,
> diff --git a/doc/coreutils.texi b/doc/coreutils.texi
> index 70effa1..5bc4706 100644
> --- a/doc/coreutils.texi
> +++ b/doc/coreutils.texi
> @@ -6540,6 +6540,16 @@ it also affects the HP-UX @command{ls} program.
>
>  @optSi
>
> +...@item -Z
> +...@itemx --context
> +...@opindex -Z
> +...@opindex --context
> +...@cindex SELinux
> +...@cindex security context
> +Display the SELinux security context or @samp{?} if none is found. When used
> +with the @option{-l} option, the security context is printed to the left
> +of the size column.

Please don't write "... is printed...".
That's using what's called the "passive voice".
Use an active voice instead, i.e., change the last sentence to this:

    When used with the @option{-l} option, print the security context
    to the left of the size column.

Please do the same for the three others below.

>  @end table
...


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to