diff mbox series

policycoreutils/fixfiles: Fix "verify" option

Message ID 20190923144340.3197-1-vmojzis@redhat.com (mailing list archive)
State Changes Requested
Headers show
Series policycoreutils/fixfiles: Fix "verify" option | expand

Commit Message

Vit Mojzis Sept. 23, 2019, 2:43 p.m. UTC
"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(-)

Comments

Stephen Smalley Sept. 23, 2019, 3:08 p.m. UTC | #1
On 9/23/19 10:43 AM, Vit Mojzis wrote:
> "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?

> ---
>   policycoreutils/scripts/fixfiles | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/policycoreutils/scripts/fixfiles b/policycoreutils/scripts/fixfiles
> index 5be9ba6e..1a31e061 100755
> --- a/policycoreutils/scripts/fixfiles
> +++ b/policycoreutils/scripts/fixfiles
> @@ -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
>
Vit Mojzis Sept. 24, 2019, 6:51 a.m. UTC | #2
On 9/23/19 5:08 PM, Stephen Smalley wrote:
> On 9/23/19 10:43 AM, Vit Mojzis wrote:
>> "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.


>> ---
>>   policycoreutils/scripts/fixfiles | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/policycoreutils/scripts/fixfiles 
>> b/policycoreutils/scripts/fixfiles
>> index 5be9ba6e..1a31e061 100755
>> --- a/policycoreutils/scripts/fixfiles
>> +++ b/policycoreutils/scripts/fixfiles
>> @@ -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
>>
>
diff mbox series

Patch

diff --git a/policycoreutils/scripts/fixfiles b/policycoreutils/scripts/fixfiles
index 5be9ba6e..1a31e061 100755
--- a/policycoreutils/scripts/fixfiles
+++ b/policycoreutils/scripts/fixfiles
@@ -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