From 13ac521d4a8fe523640da638cfc3ac9d8817dd93 Mon Sep 17 00:00:00 2001 From: Marcus Burghardt Date: Thu, 23 Feb 2023 15:08:17 +0100 Subject: [PATCH] Increase the robustness of OVAL check The previous check was reporting "unknown" when there is no password defined in the /etc/shadow file of the checked system. Before, it was not clear the reason for the unknown result. Therefore, a new test was included to check if passwords are inexistent in the system. The rule is no longer reporting "unknown" and the generated reports are more clearly informing which checks passed or not. --- .../oval/shared.xml | 70 +++++++++++-------- 1 file changed, 39 insertions(+), 31 deletions(-) diff --git a/linux_os/guide/system/accounts/accounts-restrictions/password_storage/accounts_password_last_change_is_in_past/oval/shared.xml b/linux_os/guide/system/accounts/accounts-restrictions/password_storage/accounts_password_last_change_is_in_past/oval/shared.xml index 6aaa2d448661..6dab19e148b2 100644 --- a/linux_os/guide/system/accounts/accounts-restrictions/password_storage/accounts_password_last_change_is_in_past/oval/shared.xml +++ b/linux_os/guide/system/accounts/accounts-restrictions/password_storage/accounts_password_last_change_is_in_past/oval/shared.xml @@ -1,51 +1,59 @@ - {{{ oval_metadata("All password change date is in the past.") }}} - - + {{{ oval_metadata("All passwords last change date is in the past.") }}} + + + - + + ^(!|!!|!\*|\*|!locked)$ + + + + .* + state_accounts_password_all_chage_past_has_no_password + + + + item_field="chg_lst"/> 86400 - + + comment="time difference between the last change field of shadow entry and the current time"> - + - - var_accounts_password_last_change_time_diff - - - - - 86400000 - - - + - + - - .* - state_accounts_password_all_chage_past_has_no_password - - - ^(!|!!|!\*|\*|!locked)$ - + + var_accounts_password_last_change_time_diff + + + + + 86400000 + + + +