diff mbox series

policycoreutils/fixfiles: Fix "verify" option

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

Commit Message

Vit Mojzis Sept. 24, 2019, 6:41 a.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.

Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
---
 policycoreutils/scripts/fixfiles | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stephen Smalley Sept. 26, 2019, 12:24 p.m. UTC | #1
On 9/24/19 2:41 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.
> 
> Signed-off-by: Vit Mojzis <vmojzis@redhat.com>

Thanks, applied.

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