Skip to contentSkip to conversation

policycoreutils/setfiles: Improve description of -d switch

PATCH In review Petr Lautrbach 2 participants 8 messages Apr 1, 2022 – Apr 12, 2022 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 policycoreutils/setfiles: Improve description of -d switch

From: Vit Mojzis <[email protected]>

The "-q" switch is becoming obsolete (completely unused in fedora) and debug output ("-d" switch) makes sense in any scenario. Therefore both options can be specified at once.

Resolves: rhbz#1271327

---
 policycoreutils/setfiles/setfiles.8 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
policycoreutils/setfiles/setfiles.8 +1 -1
index 15f939d1bee0..0aab2aa24681 100644
@@ -59,7 +59,7 @@ option will force a replacement of the entire context.
 check the validity of the contexts against the specified binary policy.
 .TP
 .B \-d
-show what specification matched each file.
+show what specification matched each file. Not affected by "\-q".
 .TP
 .BI \-e \ directory
 directory to exclude (repeat option for more than one directory).
Signature · 1 line
2.35.1
#1 lore raw
Quoted 28 lines · Petr Lautrbach

From: Vit Mojzis <[email protected]>

The "-q" switch is becoming obsolete (completely unused in fedora) and debug output ("-d" switch) makes sense in any scenario. Therefore both options can be specified at once.

Resolves: rhbz#1271327

---
 policycoreutils/setfiles/setfiles.8 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
policycoreutils/setfiles/setfiles.8 +1 -2
index 15f939d1bee0..0aab2aa24681 100644
@@ -59,7 +59,7 @@ option will force a replacement of the entire context.
 check the validity of the contexts against the specified binary policy.
 .TP
 .B \-d
-show what specification matched each file.
+show what specification matched each file. Not affected by "\-q".
 .TP
 .BI \-e \ directory
 directory to exclude (repeat option for more than one directory).
--
Quoted 2 lines

2.35.1

Looking at setfiles.c, specifying "-q" doesn't do anything at all, so it makes more sense to me to change what it says for "-q".

Maybe:
Deprecated and replaced by "-v". Has no effect on other options or on program behavior.

Jim

#2 lore raw

PATCH v2 1/1 setfiles.8: -q is deprecated and has no effect

---
 policycoreutils/setfiles/setfiles.8 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
policycoreutils/setfiles/setfiles.8 +3 -1
index 15f939d1bee0..5267064de3b5 100644
@@ -124,7 +124,9 @@ and
 options are mutually exclusive.
 .TP 
 .B \-q
-Deprecated, was only used to stop printing inode association parameters.
+Deprecated and replaced by
+.B \-v
+. Has no effect on other options or on program behavior.
 .TP 
 .BI \-r \ rootpath
 use an alternate root path. Used in meta-selinux for OpenEmbedded/Yocto builds
Signature · 1 line
2.35.1
#3 lore raw

Re: [PATCH v2] setfiles.8: -q is deprecated and has no effect

Quoted 11 lines · Petr Lautrbach
---
 policycoreutils/setfiles/setfiles.8 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
policycoreutils/setfiles/setfiles.8 +0 -0
index 15f939d1bee0..5267064de3b5 100644

policycoreutils/setfiles/setfiles.8 and · line 129

Quoted 7 lines
policycoreutils/setfiles/setfiles.8 +3 -1
@@ -124,7 +124,9 @@ and
 options are mutually exclusive.
 .TP
 .B \-q
-Deprecated, was only used to stop printing inode association parameters.
+Deprecated and replaced by
+.B \-v
+. Has no effect on other options or on program behavior.

The "." at the beginning causes that line to not appear.

I am no man page expert, but this seems to work.

.B \-q
Deprecated and replaced by \fB\-v\fR. Has no effect on other options or on program
behavior.

Thanks,
Jim

Quoted 6 lines
policycoreutils/setfiles/setfiles.8 +0 -1
 .TP
 .BI \-r \ rootpath
 use an alternate root path. Used in meta-selinux for OpenEmbedded/Yocto builds
--

2.35.1

#4 lore raw

Re: [PATCH v2] setfiles.8: -q is deprecated and has no effect

Quoted 22 lines · James Carter
Quoted 11 lines · Petr Lautrbach
---
 policycoreutils/setfiles/setfiles.8 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
policycoreutils/setfiles/setfiles.8 +0 -0
index 15f939d1bee0..5267064de3b5 100644

policycoreutils/setfiles/setfiles.8 and · line 129

Quoted 7 lines
policycoreutils/setfiles/setfiles.8 +3 -1
@@ -124,7 +124,9 @@ and
 options are mutually exclusive.
 .TP
 .B \-q
-Deprecated, was only used to stop printing inode association parameters.
+Deprecated and replaced by
+.B \-v
+. Has no effect on other options or on program behavior.

The "." at the beginning causes that line to not appear.

Quoted 7 lines

I am no man page expert, but this seems to work.

.B \-q
Deprecated and replaced by \fB\-v\fR. Has no effect on other options or on program
behavior.

I'm sorry for that. I really thought I opened the page and checked it works. Apparently I didn't :(

Quoted 9 lines

Thanks,
Jim

Quoted 6 lines
policycoreutils/setfiles/setfiles.8 +0 -1
 .TP
 .BI \-r \ rootpath
 use an alternate root path. Used in meta-selinux for OpenEmbedded/Yocto builds
--

2.35.1

#5 lore raw

PATCH v3 1/1 setfiles.8: -q is deprecated and has no effect

In reply to Petr Lautrbach

From: James Carter <[email protected]>

---
 policycoreutils/setfiles/setfiles.8 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
policycoreutils/setfiles/setfiles.8 +1 -1
index 15f939d1bee0..19b59a2cc90d 100644
@@ -124,7 +124,7 @@ and
 options are mutually exclusive.
 .TP 
 .B \-q
-Deprecated, was only used to stop printing inode association parameters.
+Deprecated and replaced by \fB\-v\fR. Has no effect on other options or on program behavior.
 .TP 
 .BI \-r \ rootpath
 use an alternate root path. Used in meta-selinux for OpenEmbedded/Yocto builds
Signature · 1 line
2.35.1
Acked-by on v3 1/1
#6 lore raw

Re: [PATCH v3] setfiles.8: -q is deprecated and has no effect

Quoted 4 lines · Petr Lautrbach

From: James Carter <[email protected]>

Quoted 20 lines
---
 policycoreutils/setfiles/setfiles.8 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
policycoreutils/setfiles/setfiles.8 +1 -2
index 15f939d1bee0..19b59a2cc90d 100644
@@ -124,7 +124,7 @@ and
 options are mutually exclusive.
 .TP
 .B \-q
-Deprecated, was only used to stop printing inode association parameters.
+Deprecated and replaced by \fB\-v\fR. Has no effect on other options or on program behavior.
 .TP
 .BI \-r \ rootpath
 use an alternate root path. Used in meta-selinux for OpenEmbedded/Yocto builds
--

2.35.1

#7 lore raw

Re: [PATCH v3] setfiles.8: -q is deprecated and has no effect

Quoted 9 lines · James Carter
Quoted 4 lines · Petr Lautrbach

From: James Carter <[email protected]>

Merged.
Thanks,
Jim

Quoted 20 lines
Quoted 20 lines
---
 policycoreutils/setfiles/setfiles.8 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
policycoreutils/setfiles/setfiles.8 +1 -2
index 15f939d1bee0..19b59a2cc90d 100644
@@ -124,7 +124,7 @@ and
 options are mutually exclusive.
 .TP
 .B \-q
-Deprecated, was only used to stop printing inode association parameters.
+Deprecated and replaced by \fB\-v\fR. Has no effect on other options or on program behavior.
 .TP
 .BI \-r \ rootpath
 use an alternate root path. Used in meta-selinux for OpenEmbedded/Yocto builds
--

2.35.1