This commit is contained in:
Patrick Schleizer 2019-12-07 06:51:59 -05:00
parent dc1dfc8c20
commit 9ba84f34c6
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48

View File

@ -45,6 +45,22 @@ if [ ! "$(id -u)" = "0" ]; then
exit 0 exit 0
fi fi
## Does not work (yet) for login, pam_securetty runs before and aborts.
## Also this should only run for login since securetty covers only login.
# if [ "$PAM_USER" = "root" ]; then
# if [ -f /etc/securetty ]; then
# grep_result="$(grep "^[^#]" /etc/securetty)"
# if [ "$grep_result" = "" ]; then
# echo "$0: ERROR: Root login is disabled." >&2
# echo "$0: ERROR: This is because /etc/securetty is empty." >&2
# echo "$0: See also:" >&2
# echo "https://www.whonix.org/wiki/root#login" >&2
# echo "" >&2
# exit 0
# fi
# fi
# fi
pam_tally2_output="$(pam_tally2 --user "$PAM_USER")" pam_tally2_output="$(pam_tally2 --user "$PAM_USER")"
if [ "$pam_tally2_output" = "" ]; then if [ "$pam_tally2_output" = "" ]; then