This commit is contained in:
Patrick Schleizer 2022-11-24 07:00:23 -05:00
parent 4601e106c4
commit a806c782d7
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48

View File

@ -32,11 +32,6 @@ if [ "$PAM_USER" = "" ]; then
exit 0 exit 0
fi fi
if ! command -v "/usr/bin/faillock-user" &>/dev/null; then
true "$0: The /usr/bin/faillock-user wrapper is unavailable, exiting."
exit 0
fi
grep_result="$(grep "accessfile=/etc/security/access-security-misc.conf" /etc/pam.d/common-account 2>/dev/null)" grep_result="$(grep "accessfile=/etc/security/access-security-misc.conf" /etc/pam.d/common-account 2>/dev/null)"
## Check if grep matched something. ## Check if grep matched something.
@ -105,8 +100,8 @@ fi
## ##
## Checking exit code to avoid breaking when read-only disk boot but ## Checking exit code to avoid breaking when read-only disk boot but
## without ro-mode-init or grub-live being used. ## without ro-mode-init or grub-live being used.
if ! pam_faillock_output="$(sudo --non-interactive /usr/bin/faillock-user)" ; then if ! pam_faillock_output="$(faillock --user "$PAM_USER")" ; then
true "$0: /usr/bin/faillock-user non-zero exit code." true "$0: faillock non-zero exit code."
exit 0 exit 0
fi fi