From 09e6af5c080f776d56d7e2390f88c4ae7e01bdb7 Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Wed, 16 Nov 2022 02:01:23 -0500 Subject: [PATCH] pam-info refactoring --- usr/libexec/security-misc/pam-info | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr/libexec/security-misc/pam-info b/usr/libexec/security-misc/pam-info index 2140026..c751e2d 100755 --- a/usr/libexec/security-misc/pam-info +++ b/usr/libexec/security-misc/pam-info @@ -41,6 +41,11 @@ if [ ! "$(id -u)" = "0" ]; then exit 0 fi +if ! command -v "faillock" &>/dev/null; then + echo "$0: The faillock program is unavailable, exiting." + exit 0 +fi + grep_result="$(grep "accessfile=/etc/security/access-security-misc.conf" /etc/pam.d/common-account 2>/dev/null)" ## Check if grep matched something.