diff options
| author | Manuel Stoeckl <code@mstoeckl.com> | 2024-11-01 15:46:15 -0400 |
|---|---|---|
| committer | Simon Ser <contact@emersion.fr> | 2024-11-01 22:55:34 +0100 |
| commit | 96f0a0f9c6a9412fc1886bf54e37ece75b0e9f99 (patch) | |
| tree | a9ec752ec010af85104bee0f2e28861ec6e33b45 | |
| parent | fc6fbc98fba775e152443a3d587600767d451fa1 (diff) | |
Exit when password handling subprocess crashes
It is better to have swaylock crash immediately and the compositor
show a red screen than to operate in a degraded state where
passwords cannot be checked and the screen cannot be unlocked.
| -rw-r--r-- | main.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1038,6 +1038,9 @@ static void comm_in(int fd, short mask, void *data) { if (read_comm_reply()) { // Authentication succeeded state.run_display = false; + } else if (mask & (POLLHUP | POLLERR)) { + swaylock_log(LOG_ERROR, "Password checking subprocess crashed; exiting."); + exit(EXIT_FAILURE); } else { state.auth_state = AUTH_STATE_INVALID; schedule_auth_idle(&state); |
