Skip to contentSkip to conversation

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

PATCH In review Laurent Bigonville 5 participants 7 messages May 17, 2016 – Jun 6, 2016 SELinux security module

lore
Share & tools
lore
#0 lore raw

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

From: Laurent Bigonville <[email protected]>

---
 policycoreutils/semodule/semodule.8 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
policycoreutils/semodule/semodule.8 +1 -1
index 68e95ab..7b07c45 100644
@@ -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
Signature · 1 line
2.8.1
#1 lore raw
Quoted 11 lines · Laurent Bigonville

From: Laurent Bigonville <[email protected]>

---
 policycoreutils/semodule/semodule.8 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
policycoreutils/semodule/semodule.8 +0 -0
index 68e95ab..7b07c45 100644

policycoreutils/semodule/semodule.8 $ semodule \-d alsa · line 119

Quoted 5 lines
policycoreutils/semodule/semodule.8 +1 -1
@@ -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");

Signature · 1 line
Petr Lautrbach
#2 lore raw

*Date: *Wed May 18 2016 09:57:47 GMT+0200 (CEST)

Quoted 25 lines · Laurent Bigonville
Quoted 11 lines

From: Laurent Bigonville <[email protected]>

---
  policycoreutils/semodule/semodule.8 | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
policycoreutils/semodule/semodule.8 +0 -0
index 68e95ab..7b07c45 100644

policycoreutils/semodule/semodule.8 $ semodule \-d alsa · line 119

Quoted 5 lines
policycoreutils/semodule/semodule.8 +1 -1
@@ -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:

Quoted 8 lines

.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.

Quoted 22 lines

# 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
[email protected]
To unsubscribe, send email to [email protected].
To get help, send an email containing "help" to [email protected].

#3 lore raw

*Date: *Wed May 18 2016 12:00:11 GMT+0200 (CEST)

Quoted 31 lines

*Date: *Wed May 18 2016 09:57:47 GMT+0200 (CEST)

Quoted 30 lines · Laurent Bigonville
Quoted 11 lines

From: Laurent Bigonville<[email protected]>

---
  policycoreutils/semodule/semodule.8 | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
policycoreutils/semodule/semodule.8 +0 -0
index 68e95ab..7b07c45 100644

policycoreutils/semodule/semodule.8 $ semodule \-d alsa · line 119

Quoted 5 lines
policycoreutils/semodule/semodule.8 +1 -1
@@ -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)

Quoted 4 lines
Quoted 3 lines

# 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.

Quoted 23 lines
Quoted 22 lines

# 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
[email protected]
To unsubscribe, send email [email protected].
To get help, send an email containing "help" [email protected].

#4 lore raw
In reply to Petr Lautrbach
Quoted 31 lines · Petr Lautrbach
Quoted 5 lines · Laurent Bigonville

From: Laurent Bigonville <[email protected]>

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

Quoted 7 lines
(quoted diff) +0 -0

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

Quoted 7 lines

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.

#5 lore raw

PATCH 1/1 policycoreutils/semodule: Fix the documentation of -l,--list

It wasn't clear how to use -l option with full/standard KIND and the example in semodule.8 man page was wrong.

Based on a patch by Laurent Bigonville <[email protected]>

---
 policycoreutils/semodule/semodule.8 | 4 ++--
 policycoreutils/semodule/semodule.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
policycoreutils/semodule/semodule.8 +2 -2
index 68e95ab..0c5fdf7 100644
@@ -38,7 +38,7 @@ deprecated, alias for --install
 .B  \-r,\-\-remove=MODULE_NAME
 remove existing module
 .TP
-.B  \-l,\-\-list-modules=[KIND]
+.B  \-l[KIND],\-\-list-modules[=KIND]
 display list of installed modules (other than base)
 .TP
 .B  \-E,\-\-extract=MODULE_PKG
@@ -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=full
 # Set an alternate path for the policy root
 $ semodule \-B \-p "/tmp"
 # Set an alternate path for the policy store root
policycoreutils/semodule/semodule.c +1 -1
index bcfaa2b..63900f4 100644
@@ -127,7 +127,7 @@ static void usage(char *progname)
 	printf("  -B, --build		    build and reload policy\n");
 	printf("  -i,--install=MODULE_PKG   install a new module\n");
 	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");
 	printf("            full      list all modules\n");
 	printf("  -X,--priority=PRIORITY    set priority for following operations (1-999)\n");
Signature · 1 line
2.7.4
Applied
#6 lore raw

Re: [PATCH] policycoreutils/semodule: Fix the documentation of -l,--list

Quoted 5 lines · Petr Lautrbach

It wasn't clear how to use -l option with full/standard KIND and the example in semodule.8 man page was wrong.

Based on a patch by Laurent Bigonville <[email protected]>

Applied.

Thanks,

Quoted 41 lines
---
 policycoreutils/semodule/semodule.8 | 4 ++--
 policycoreutils/semodule/semodule.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
policycoreutils/semodule/semodule.8 +2 -2
index 68e95ab..0c5fdf7 100644
@@ -38,7 +38,7 @@ deprecated, alias for --install
 .B  \-r,\-\-remove=MODULE_NAME
 remove existing module
 .TP
-.B  \-l,\-\-list-modules=[KIND]
+.B  \-l[KIND],\-\-list-modules[=KIND]
 display list of installed modules (other than base)
 .TP
 .B  \-E,\-\-extract=MODULE_PKG
@@ -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=full
 # Set an alternate path for the policy root
 $ semodule \-B \-p "/tmp"
 # Set an alternate path for the policy store root
policycoreutils/semodule/semodule.c +1 -1
index bcfaa2b..63900f4 100644
@@ -127,7 +127,7 @@ static void usage(char *progname)
 	printf("  -B, --build		    build and reload policy\n");
 	printf("  -i,--install=MODULE_PKG   install a new module\n");
 	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");
 	printf("            full      list all modules\n");
 	printf("  -X,--priority=PRIORITY    set priority for following operations (1-999)\n");
Signature · 2 lines
James Carter <[email protected]>
National Security Agency