mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-21 02:25:21 -04:00
097290f7da
When pam_faillock locks the account (DMS authenticates through the system PAM stack: /etc/pam.d/login -> system-auth), the lock screen kept showing the generic "Incorrect password - try again" even though the real cause is a lockout, so a correct password looks rejected and only a reboot (which clears the tmpfs /run/faillock tally) appears to help. See #2647. The previous onMessageChanged only matched the *English* faillock strings ("The account is locked ...") and then wiped that text again on the trailing pam_unix "Password:" prompt. On a non-English system (e.g. German) the strings never matched, so the lockout was never surfaced at all. Detect the notice by position rather than by text: pam emits its informational messages within an attempt before the password prompt. Collect every non-prompt info message and, once the prompt arrives, surface the collected lines (minus the prompt itself) as lockMessage. If the stack short-circuits without ever prompting (e.g. pam_faillock preauth configured as requisite), the notice is surfaced on completion instead. This is locale-independent. A per-attempt flag keeps the message stable across repeated locked attempts and retires it when an attempt completes without a lockout (faillock reset / unlock_time elapsed). Fixes #2647