From 17a4661f69cd4c31216cfd4742abcbf49d82bc7f Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Thu, 15 Dec 2016 09:44:44 -0600 Subject: [PATCH] Fix invalid user/group checks bug The existence of output is checked for both of the invalid user/group tasks, but the *length* of the output isn't checked. This patch fixes that bug and only displays output when there is output to display. Closes-Bug: 1650113 Change-Id: I661006e6ee5c01505c1801d7d55c3823f3632ddd --- tasks/rhel7stig/file_perms.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/rhel7stig/file_perms.yml b/tasks/rhel7stig/file_perms.yml index f2239859..d48f8041 100644 --- a/tasks/rhel7stig/file_perms.yml +++ b/tasks/rhel7stig/file_perms.yml @@ -67,6 +67,7 @@ when: - invalid_owner_files is defined - invalid_owner_files.stdout_lines is defined + - invalid_owner_files.stdout_lines | length > 0 tags: - file_perms - medium @@ -91,6 +92,7 @@ when: - invalid_group_owner_files is defined - invalid_group_owner_files.stdout_lines is defined + - invalid_group_owner_files.stdout_lines | length > 0 tags: - file_perms - medium