This commit is contained in:
Patrick Schleizer 2025-05-21 12:40:27 -04:00
parent f023651c98
commit a969fa350e
No known key found for this signature in database
GPG key ID: CB8D50BB77BB3C48

View file

@ -46,9 +46,14 @@ https://github.com/rspamd/rspamd/issues/5137" >&2
exit 1 exit 1
fi fi
command -v pam_faillock_output &>/dev/null
## Named constants. ## Named constants.
pam_faillock_state_dir="/var/lib/security-misc/faillock" pam_faillock_state_dir="/var/lib/security-misc/faillock"
[[ -v PAM_USER ]] || PAM_USER=""
[[ -v SUDO_USER ]] || SUDO_USER=""
## Debugging. ## Debugging.
who_ami="$(whoami)" who_ami="$(whoami)"
true "$0: who_ami: $who_ami" true "$0: who_ami: $who_ami"
@ -72,6 +77,7 @@ if [ ! "$grep_result" = "" ]; then
## https://forums.whonix.org/t/etc-security-hardening-console-lockdown/8592 ## https://forums.whonix.org/t/etc-security-hardening-console-lockdown/8592
console_allowed=""
if id --name --groups --zero -- "$PAM_USER" | grep --quiet --null-data --line-regexp --fixed-strings -- "console"; then if id --name --groups --zero -- "$PAM_USER" | grep --quiet --null-data --line-regexp --fixed-strings -- "console"; then
console_allowed=true console_allowed=true
fi fi