Skip to contentSkip to conversation

policycoreutils: fix the extract example in semodule.8

PATCH In review Petr Lautrbach 3 participants 5 messages May 10, 2016 – May 16, 2016 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 policycoreutils: fix the extract example in semodule.8

The man page's example suggested to use -g instead of -E

---
 policycoreutils/semodule/semodule.8 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
policycoreutils/semodule/semodule.8 +1 -1
index 6db390c..e5b54b3 100644
@@ -121,7 +121,7 @@ $ semodule \-B \-p "/tmp"
 $ semodule \-B \-S "/tmp/var/lib/selinux"
 # Write the HLL version of puppet and the CIL version of wireshark
 # modules at priority 400 to the current working directory
-$ semodule \-X 400 \-g wireshark \-\-cil \-g puppet \-\-hll
+$ semodule \-X 400 \-E wireshark \-\-cil \-E puppet \-\-hll
 .fi
 
 .SH SEE ALSO
Signature · 1 line
2.7.4
#1 lore raw
Quoted 12 lines · Petr Lautrbach

The man page's example suggested to use -g instead of -E

---
 policycoreutils/semodule/semodule.8 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
policycoreutils/semodule/semodule.8 +0 -0
index 6db390c..e5b54b3 100644

policycoreutils/semodule/semodule.8 $ semodule \-B \-p "/tmp" · line 124

Quoted 5 lines
policycoreutils/semodule/semodule.8 +1 -1
@@ -121,7 +121,7 @@ $ semodule \-B \-p "/tmp"
 $ semodule \-B \-S "/tmp/var/lib/selinux"
 # Write the HLL version of puppet and the CIL version of wireshark
 # modules at priority 400 to the current working directory
-$ semodule \-X 400 \-g wireshark \-\-cil \-g puppet \-\-hll
+$ semodule \-X 400 \-E wireshark \-\-cil \-E puppet \-\-hll

Actually this command extracts the HLL version of wireshark and the CIL version of puppet (it creates wireshark.pp and puppet.cil on my system with checkpolicy 2.5). In order to do what the comment suggests, the --cil and --hll flags need to be set before the -E options: semodule -X 400 --cil -E wireshark --hll -E puppet.

-- Nicolas

#2 lore raw
Quoted 25 lines · Nicolas Iooss
Quoted 12 lines · Petr Lautrbach

The man page's example suggested to use -g instead of -E

---
 policycoreutils/semodule/semodule.8 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
policycoreutils/semodule/semodule.8 +0 -0
index 6db390c..e5b54b3 100644

policycoreutils/semodule/semodule.8 $ semodule \-B \-p "/tmp" · line 124

Quoted 5 lines
policycoreutils/semodule/semodule.8 +1 -1
@@ -121,7 +121,7 @@ $ semodule \-B \-p "/tmp"
 $ semodule \-B \-S "/tmp/var/lib/selinux"
 # Write the HLL version of puppet and the CIL version of wireshark
 # modules at priority 400 to the current working directory
-$ semodule \-X 400 \-g wireshark \-\-cil \-g puppet \-\-hll
+$ semodule \-X 400 \-E wireshark \-\-cil \-E puppet \-\-hll

Actually this command extracts the HLL version of wireshark and the CIL version of puppet (it creates wireshark.pp and puppet.cil on my system with checkpolicy 2.5). In order to do what the comment suggests, the --cil and --hll flags need to be set before the -E options: semodule -X 400 --cil -E wireshark --hll -E puppet.

Quoted 2 lines

-- Nicolas

I overlooked that. Thanks.

I'll prepare another patch.

Petr

Signature · 1 line
Petr Lautrbach
#3 lore raw

PATCH 1/1 policycoreutils: fix the extract example in semodule.8

The man page's example suggested to use -g instead of -E and used --cil and --hll options on the wrong positions.

---
 policycoreutils/semodule/semodule.8 | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
policycoreutils/semodule/semodule.8 +5 -3
index 6db390c..68e95ab 100644
@@ -88,10 +88,12 @@ Use an alternate path for the policy store root
 be verbose
 .TP
 .B  \-c,\-\-cil
-Extract module as a CIL file. This only affects the \-\-extract option.
+Extract module as a CIL file. This only affects the \-\-extract option and
+only modules listed in \-\-extract after this option.
 .TP
 .B  \-H,\-\-hll
-Extract module as an HLL file. This only affects the \-\-extract option.
+Extract module as an HLL file. This only affects the \-\-extract option and
+only modules listed in \-\-extract after this option.
 
 .SH EXAMPLE
 .nf
@@ -121,7 +123,7 @@ $ semodule \-B \-p "/tmp"
 $ semodule \-B \-S "/tmp/var/lib/selinux"
 # Write the HLL version of puppet and the CIL version of wireshark
 # modules at priority 400 to the current working directory
-$ semodule \-X 400 \-g wireshark \-\-cil \-g puppet \-\-hll
+$ semodule \-X 400 \-\-hll \-E puppet \-\-cil \-E wireshark
 .fi
 
 .SH SEE ALSO
Signature · 1 line
2.7.4
#4 lore raw
Quoted 2 lines · Petr Lautrbach

The man page's example suggested to use -g instead of -E and used --cil and --hll options on the wrong positions.

Thanks, applied.

Quoted 35 lines
---
 policycoreutils/semodule/semodule.8 | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
policycoreutils/semodule/semodule.8 +5 -3
index 6db390c..68e95ab 100644
@@ -88,10 +88,12 @@ Use an alternate path for the policy store root
 be verbose
 .TP
 .B  \-c,\-\-cil
-Extract module as a CIL file. This only affects the \-\-extract option.
+Extract module as a CIL file. This only affects the \-\-extract option and
+only modules listed in \-\-extract after this option.
 .TP
 .B  \-H,\-\-hll
-Extract module as an HLL file. This only affects the \-\-extract option.
+Extract module as an HLL file. This only affects the \-\-extract option and
+only modules listed in \-\-extract after this option.
 
 .SH EXAMPLE
 .nf
@@ -121,7 +123,7 @@ $ semodule \-B \-p "/tmp"
 $ semodule \-B \-S "/tmp/var/lib/selinux"
 # Write the HLL version of puppet and the CIL version of wireshark
 # modules at priority 400 to the current working directory
-$ semodule \-X 400 \-g wireshark \-\-cil \-g puppet \-\-hll
+$ semodule \-X 400 \-\-hll \-E puppet \-\-cil \-E wireshark
 .fi
 
 .SH SEE ALSO