mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-06-23 18:54:08 -04:00
improve error handling
This commit is contained in:
parent
784867e24b
commit
ef8515ba82
1 changed files with 8 additions and 0 deletions
|
@ -190,6 +190,14 @@ pam_faillock_output_count="$(printf '%s\n' "$pam_faillock_output" | wc -l)"
|
||||||
## example pam_faillock_output_count:
|
## example pam_faillock_output_count:
|
||||||
## 4
|
## 4
|
||||||
|
|
||||||
|
if [[ "$deny" == *[!0-9]* ]]; then
|
||||||
|
printf '%s\n' "\
|
||||||
|
$0: ERROR: Variable pam_faillock_output_count is not numeric. pam_faillock_output_count: '$deny'
|
||||||
|
ERROR: Please report this bug.
|
||||||
|
" >&2
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
## Do not count the first two informational textual output lines (starting with "user:" and "When") if present,
|
## Do not count the first two informational textual output lines (starting with "user:" and "When") if present,
|
||||||
failed_login_counter=$(( pam_faillock_output_count - 2 ))
|
failed_login_counter=$(( pam_faillock_output_count - 2 ))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue