mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-03-09 20:30:23 +07:00
fix, no longer unconditionally abort pam for user accounts with locked passwords
as locked user accounts might have valid sudoers exceptions Thanks to @mimp for the bug report! https://forums.whonix.org/t/pam-abort-on-locked-password-and-running-privileged-command-from-web-browser/10521
This commit is contained in:
parent
211769dc65
commit
dfe9b0f6c7
@ -15,7 +15,7 @@ fi
|
||||
if [ "$(echo "$passwd_output" | cut -d ' ' -f 2)" = "P" ]; then
|
||||
true "INFO: Password not locked."
|
||||
else
|
||||
echo "$0: ERROR: Password for user \"$PAM_USER\" is locked." >&2
|
||||
echo "$0: INFO: Password for user \"$PAM_USER\" is locked."
|
||||
|
||||
if [ -f /usr/share/whonix/marker ] || [ -f /usr/share/kicksecure/marker ]; then
|
||||
if [ "$PAM_USER" = "root" ]; then
|
||||
@ -28,7 +28,7 @@ else
|
||||
## Should not unconditionally 'exit 1' here.
|
||||
## Locked user accounts might have valid sudoers exceptions.
|
||||
## https://forums.whonix.org/t/pam-abort-on-locked-password-and-running-privileged-command-from-web-browser/10521
|
||||
exit 1
|
||||
exit 0
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user