diff mbox

semodule: Fix the --list-modules=full example in the manpage

Message ID 1463498859-5911-1-git-send-email-bigon@debian.org (mailing list archive)
State Not Applicable
Headers show

Commit Message

Laurent Bigonville May 17, 2016, 3:27 p.m. UTC
From: Laurent Bigonville <bigon@bigon.be>

---
 policycoreutils/semodule/semodule.8 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Petr Lautrbach May 18, 2016, 7:57 a.m. UTC | #1
On 05/17/2016 05:27 PM, Laurent Bigonville wrote:
> From: Laurent Bigonville <bigon@bigon.be>
> 
> ---
>  policycoreutils/semodule/semodule.8 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/policycoreutils/semodule/semodule.8 b/policycoreutils/semodule/semodule.8
> index 68e95ab..7b07c45 100644
> --- a/policycoreutils/semodule/semodule.8
> +++ b/policycoreutils/semodule/semodule.8
> @@ -116,7 +116,7 @@ $ semodule \-d alsa
>  # Install a module at a specific priority.
>  $ semodule \-X 100 \-i alsa.pp
>  # List all modules.
> -$ semodule \-l full
> +$ semodule \-\-list-modules=full


It works without " " before full:

$ semodule -lfull

What about:

policycoreutils/semodule/semodule.8:

 .TP
-.B  \-l,\-\-list-modules=[KIND]
+.B  \-l[KIND],\-\-list-modules[=KIND]
 display list of installed modules (other than base)

 # List all modules.
-$ semodule \-l full
+$ semodule \-lfull
 # Set an alternate path for the policy root


policycoreutils/semodule/semodule.c:

        printf("  -r,--remove=MODULE_NAME   remove existing module\n");
-       printf("  -l,--list-modules=[KIND]  display list of installed
modules\n");
+       printf("  -l[KIND],--list-modules[=KIND]  display list of
installed modules\n");
        printf("     KIND:  standard  list highest priority, enabled
modules\n");
Dalibor Pospíšil May 18, 2016, 10 a.m. UTC | #2
*Date: *Wed May 18 2016 09:57:47 GMT+0200 (CEST)
> On 05/17/2016 05:27 PM, Laurent Bigonville wrote:
>> From: Laurent Bigonville <bigon@bigon.be>
>>
>> ---
>>   policycoreutils/semodule/semodule.8 | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/policycoreutils/semodule/semodule.8 b/policycoreutils/semodule/semodule.8
>> index 68e95ab..7b07c45 100644
>> --- a/policycoreutils/semodule/semodule.8
>> +++ b/policycoreutils/semodule/semodule.8
>> @@ -116,7 +116,7 @@ $ semodule \-d alsa
>>   # Install a module at a specific priority.
>>   $ semodule \-X 100 \-i alsa.pp
>>   # List all modules.
>> -$ semodule \-l full
>> +$ semodule \-\-list-modules=full
> It works without " " before full:
>
> $ semodule -lfull
>
> What about:
>
> policycoreutils/semodule/semodule.8:
>
>   .TP
> -.B  \-l,\-\-list-modules=[KIND]
> +.B  \-l[KIND],\-\-list-modules[=KIND]
>   display list of installed modules (other than base)
>
>   # List all modules.
> -$ semodule \-l full
> +$ semodule \-lfull
Wouldn't it be more natural to use 'all' instead of 'full' to express listing of all modules? I would expect 'full' as an option to some kind of formatting, like displaying full details.
>   # Set an alternate path for the policy root
>
>
> policycoreutils/semodule/semodule.c:
>
>          printf("  -r,--remove=MODULE_NAME   remove existing module\n");
> -       printf("  -l,--list-modules=[KIND]  display list of installed
> modules\n");
> +       printf("  -l[KIND],--list-modules[=KIND]  display list of
> installed modules\n");
>          printf("     KIND:  standard  list highest priority, enabled
> modules\n");
>
>
>
>
>
> _______________________________________________
> Selinux mailing list
> Selinux@tycho.nsa.gov
> To unsubscribe, send email to Selinux-leave@tycho.nsa.gov.
> To get help, send an email containing "help" to Selinux-request@tycho.nsa.gov.
Dalibor Pospíšil May 18, 2016, 2:11 p.m. UTC | #3
*Date: *Wed May 18 2016 12:00:11 GMT+0200 (CEST)
> *Date: *Wed May 18 2016 09:57:47 GMT+0200 (CEST)
>> On 05/17/2016 05:27 PM, Laurent Bigonville wrote:
>>> From: Laurent Bigonville<bigon@bigon.be>
>>>
>>> ---
>>>   policycoreutils/semodule/semodule.8 | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/policycoreutils/semodule/semodule.8 b/policycoreutils/semodule/semodule.8
>>> index 68e95ab..7b07c45 100644
>>> --- a/policycoreutils/semodule/semodule.8
>>> +++ b/policycoreutils/semodule/semodule.8
>>> @@ -116,7 +116,7 @@ $ semodule \-d alsa
>>>   # Install a module at a specific priority.
>>>   $ semodule \-X 100 \-i alsa.pp
>>>   # List all modules.
>>> -$ semodule \-l full
>>> +$ semodule \-\-list-modules=full
>> It works without " " before full:
>>
>> $ semodule -lfull
>>
>> What about:
>>
>> policycoreutils/semodule/semodule.8:
>>
>>   .TP
>> -.B  \-l,\-\-list-modules=[KIND]
>> +.B  \-l[KIND],\-\-list-modules[=KIND]
>>   display list of installed modules (other than base)
>>
>>   # List all modules.
>> -$ semodule \-l full
>> +$ semodule \-lfull
> Wouldn't it be more natural to use 'all' instead of 'full' to express listing of all modules? I would expect 'full' as an option to some kind of formatting, like displaying full details.
After discussion with Petr the 'full' kind makes sens. Actually I haven't tried it I just read the documentation which does not say much about this. Maybe it would be good to extend documentation to better describe 'full' kind, not just say it lists all modules. I would suggest something like 'long/detailed listing of (all) modules', similarly to ls -l.
>>   # Set an alternate path for the policy root
>>
>>
>> policycoreutils/semodule/semodule.c:
>>
>>          printf("  -r,--remove=MODULE_NAME   remove existing module\n");
>> -       printf("  -l,--list-modules=[KIND]  display list of installed
>> modules\n");
>> +       printf("  -l[KIND],--list-modules[=KIND]  display list of
>> installed modules\n");
>>          printf("     KIND:  standard  list highest priority, enabled
>> modules\n");
>>
>>
>>
>>
>>
>> _______________________________________________
>> Selinux mailing list
>> Selinux@tycho.nsa.gov
>> To unsubscribe, send email toSelinux-leave@tycho.nsa.gov.
>> To get help, send an email containing "help" toSelinux-request@tycho.nsa.gov.
>
Stephen Smalley May 20, 2016, 7:48 p.m. UTC | #4
On 05/18/2016 03:57 AM, Petr Lautrbach wrote:
> On 05/17/2016 05:27 PM, Laurent Bigonville wrote:
>> From: Laurent Bigonville <bigon@bigon.be>
>> 
>> --- policycoreutils/semodule/semodule.8 | 2 +- 1 file changed, 1
>> insertion(+), 1 deletion(-)
>> 
>> diff --git a/policycoreutils/semodule/semodule.8
>> b/policycoreutils/semodule/semodule.8 index 68e95ab..7b07c45
>> 100644 --- a/policycoreutils/semodule/semodule.8 +++
>> b/policycoreutils/semodule/semodule.8 @@ -116,7 +116,7 @@ $
>> semodule \-d alsa # Install a module at a specific priority. $
>> semodule \-X 100 \-i alsa.pp # List all modules. -$ semodule \-l
>> full +$ semodule \-\-list-modules=full
> 
> 
> It works without " " before full:
> 
> $ semodule -lfull
> 
> What about:
> 
> policycoreutils/semodule/semodule.8:
> 
> .TP -.B  \-l,\-\-list-modules=[KIND] +.B
> \-l[KIND],\-\-list-modules[=KIND] display list of installed modules
> (other than base)
> 
> # List all modules. -$ semodule \-l full +$ semodule \-lfull # Set
> an alternate path for the policy root
> 
> 
> policycoreutils/semodule/semodule.c:
> 
> printf("  -r,--remove=MODULE_NAME   remove existing module\n"); -
> printf("  -l,--list-modules=[KIND]  display list of installed 
> modules\n"); +       printf("  -l[KIND],--list-modules[=KIND]
> display list of installed modules\n"); printf("     KIND:  standard
> list highest priority, enabled modules\n");

That works for me.  Someone want to spin an actual patch?  Although
the -l argument handling is somewhat odd and non-standard; if it
wasn't already in place, I think I'd have advocated for a separate
option flag if you want the full/long listing.
diff mbox

Patch

diff --git a/policycoreutils/semodule/semodule.8 b/policycoreutils/semodule/semodule.8
index 68e95ab..7b07c45 100644
--- a/policycoreutils/semodule/semodule.8
+++ b/policycoreutils/semodule/semodule.8
@@ -116,7 +116,7 @@  $ semodule \-d alsa
 # Install a module at a specific priority.
 $ semodule \-X 100 \-i alsa.pp
 # List all modules.
-$ semodule \-l full
+$ semodule \-\-list-modules=full
 # Set an alternate path for the policy root
 $ semodule \-B \-p "/tmp"
 # Set an alternate path for the policy store root