pam-info: create debug log file ~/pam-info-debug.txt

when file /etc/pam-info-debug exists
This commit is contained in:
Patrick Schleizer 2022-11-15 12:29:41 -05:00
parent 2872c2ab52
commit 95487346db
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48

View File

@ -3,10 +3,21 @@
## Copyright (C) 2019 - 2022 ENCRYPTED SUPPORT LP <adrelanos@whonix.org>
## See the file COPYING for copying conditions.
#set -x
#exec 5>&1 1>> ~/pam-info-debug.txt
#exec 6>&2 2>> ~/pam-info-debug.txt
true "$0: START"
## To enable debug log, run:
## /etc/pam-info-debug
##
## Debug log if enabled can be found in file:
## /root/pam-info-debug.txt
true "$0: START PHASE 1"
if test -f /etc/pam-info-debug ; then
set -x
exec 5>&1 1>> ~/pam-info-debug.txt
exec 6>&2 2>> ~/pam-info-debug.txt
fi
true "$0: START PHASE 2"
grep_result="$(grep "accessfile=/etc/security/access-security-misc.conf" /etc/pam.d/common-account 2>/dev/null)"