Skip to contentSkip to conversation

policycoreutils/fixfiles: Fix "verify" option

PATCH In review Vit Mojzis 2 participants 5 messages Sep 23, 2019 – Sep 26, 2019 SELinux security module

lore
Share & tools
lore

Vit Mojzis

author
#0 lore raw

PATCH 1/1 policycoreutils/fixfiles: Fix "verify" option

"restorecon -n" (used in the "restore" function) has to be used with "-v" to display the files whose labels would be changed.

Fixes:
Fixfiles verify does not report misslabelled files unless "-v" option is used.

---
 policycoreutils/scripts/fixfiles | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
policycoreutils/scripts/fixfiles +1 -1
index 5be9ba6e..1a31e061 100755
@@ -302,7 +302,7 @@ process() {
 case "$1" in
     restore) restore Relabel;;
     check) VERBOSE="-v"; restore Check -n;;
-    verify) restore Verify -n;;
+    verify) VERBOSE="-v"; restore Verify -n;;
     relabel) relabel;;
     onboot)
 	if [ "$RESTORE_MODE" != DEFAULT ]; then
Signature · 1 line
2.21.0
#1 lore raw
Quoted 6 lines · Vit Mojzis

"restorecon -n" (used in the "restore" function) has to be used with "-v" to display the files whose labels would be changed.

Fixes:
Fixfiles verify does not report misslabelled files unless "-v" option is used.

Please add a Signed-off-by line. With this change, aside from display "Verifying" vs. "Checking" there seems to be no difference between fixfiles verify and fixfiles check? Wondering if there was some difference originally?

Quoted 18 lines
---
  policycoreutils/scripts/fixfiles | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
policycoreutils/scripts/fixfiles +1 -1
index 5be9ba6e..1a31e061 100755
@@ -302,7 +302,7 @@ process() {
  case "$1" in
      restore) restore Relabel;;
      check) VERBOSE="-v"; restore Check -n;;
-    verify) restore Verify -n;;
+    verify) VERBOSE="-v"; restore Verify -n;;
      relabel) relabel;;
      onboot)
  	if [ "$RESTORE_MODE" != DEFAULT ]; then
author
#2 lore raw

PATCH 1/1 policycoreutils/fixfiles: Fix "verify" option

"restorecon -n" (used in the "restore" function) has to be used with "-v" to display the files whose labels would be changed.

Fixes:
Fixfiles verify does not report misslabelled files unless "-v" option is used.

---
 policycoreutils/scripts/fixfiles | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
policycoreutils/scripts/fixfiles +1 -1
index 5be9ba6e..1a31e061 100755
@@ -302,7 +302,7 @@ process() {
 case "$1" in
     restore) restore Relabel;;
     check) VERBOSE="-v"; restore Check -n;;
-    verify) restore Verify -n;;
+    verify) VERBOSE="-v"; restore Verify -n;;
     relabel) relabel;;
     onboot)
 	if [ "$RESTORE_MODE" != DEFAULT ]; then
Signature · 1 line
2.21.0
#3 lore raw
Quoted 8 lines · Vit Mojzis

"restorecon -n" (used in the "restore" function) has to be used with "-v" to display the files whose labels would be changed.

Fixes:
Fixfiles verify does not report misslabelled files unless "-v" option is used.

Thanks, applied.

Quoted 18 lines
---
  policycoreutils/scripts/fixfiles | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
policycoreutils/scripts/fixfiles +1 -1
index 5be9ba6e..1a31e061 100755
@@ -302,7 +302,7 @@ process() {
  case "$1" in
      restore) restore Relabel;;
      check) VERBOSE="-v"; restore Check -n;;
-    verify) restore Verify -n;;
+    verify) VERBOSE="-v"; restore Verify -n;;
      relabel) relabel;;
      onboot)
  	if [ "$RESTORE_MODE" != DEFAULT ]; then
author
#4 lore raw
In reply to Stephen Smalley
Quoted 10 lines · Stephen Smalley
Quoted 6 lines · Vit Mojzis

"restorecon -n" (used in the "restore" function) has to be used with "-v" to display the files whose labels would be changed.

Fixes:
    Fixfiles verify does not report misslabelled files unless "-v" option is used.

Please add a Signed-off-by line.  With this change, aside from display "Verifying" vs. "Checking" there seems to be no difference between fixfiles verify and fixfiles check?  Wondering if there was some difference originally?

Apparently "Verify" used to call "restorecon -n -o -", but "-o" is now obsolete. You are right, "Verify" and "Check" do the same thing now.

Quoted 19 lines
Quoted 18 lines

---
  policycoreutils/scripts/fixfiles | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
policycoreutils/scripts/fixfiles +0 -0
index 5be9ba6e..1a31e061 100755
@@ -302,7 +302,7 @@ process() {

  case "$1" in
      restore) restore Relabel;;
      check) VERBOSE="-v"; restore Check -n;;
-    verify) restore Verify -n;;
+    verify) VERBOSE="-v"; restore Verify -n;;
      relabel) relabel;;
      onboot)
      if [ "$RESTORE_MODE" != DEFAULT ]; then