summaryrefslogtreecommitdiff
path: root/comm.c
AgeCommit message (Collapse)Author
2025-03-16Reapply "comm: improve robustness"Simon Ser
This reverts commit e0ca5adecd0b0f89f20322c9b410b460e8f73c5b. See 285d0292914b ("comm: improve robustness") for details. Also add EINTR handling.
2025-03-15Revert "comm: improve robustness"Simon Ser
This reverts commit 285d0292914bf6361a1a32ce1561a6d3fb6ebeca. This got accidentally pushed to master.
2025-03-14comm: improve robustnessSimon Ser
swaylock was performing some read() calls with a >1 size and didn't handle partial reads. Fix this by introducing two helpers, read_full() and write_full(), to read/write a complete buffer. read_comm_request() needs to make the difference between EOF at the start of a message vs. in the middle, so needs to return a tri-state.
2025-03-12Better handle subprocess crashesSimon Ser
On my machine EOF doesn't trigger POLLHUP (not sure why), instead read() returns zero. It just prints the following message in a loop: [comm.c:101] Failed to read pw result: Success Better handle this case in read_comm_reply() by making a difference between a failed read() and a failed authentication.
2022-06-15Use mlock for password bufferRobin Ebert
2019-01-17Check password without blockingemersion
2019-01-17Move PAM into a child processemersion