aboutsummaryrefslogtreecommitdiff
path: root/swaylock/password.c
AgeCommit message (Collapse)AuthorLines
2019-01-13Split swaylock into separate projectDrew DeVault-190/+0
2019-01-03swaylock: Fix caps lock not updating immediatelyOscar Cowdery Lack-8/+0
Partially fixes #2788. This change makes it so the lock screen is redrawn whenever the caps lock modifier state changes, rather on relying on the keypress event. This didn't work because caps lock is disabled when the key is released, not pressed, so the caps lock indicator does not go away until the next keypress event.
2018-12-23swaylock: Submit password on Ctrl-DMilkey Mouse-38/+48
Ctrl-D functions as EOF in most cases on the terminal. login(1) & many other programs check the password on EOF, same as Enter. To make behavior consistent, have swaylock submit the password on Ctrl-D. This commit moves the handling for Enter into its own static function, which is now also called on Ctrl-D.
2018-12-23swaylock: Clear password buffer on Ctrl-CMilkey Mouse-0/+1
I've got in the habit of using Ctrl-C with login(1) to restart password entry. If Sway does the same thing I don't have to retrain my login muscle memory ;)
2018-11-25Replace _XOPEN_SOURCE with _POSIX_C_SOURCEemersion-1/+0
And make sure we don't define both in the same source file.
2018-10-23swaylock: exit on display errorIan Fan-1/+5
2018-10-15Remove timerfd from loop implementationRyan Dwyer-5/+5
timerfd doesn't work on the BSDs, so this replaces it with a timespec for the expiry and uses a poll timeout to check the timers when needed.
2018-10-15swaylock: Don't wait too long for surface damage before verifyingRyan Dwyer-1/+18
2018-10-15swaylock: clear password after 10 secondsRyan Dwyer-0/+21
2018-10-15swaylock: Remove indicator after 3 secondsRyan Dwyer-0/+22
2018-10-14swaylock: fix clear_password_bufferespkk-1/+1
2018-09-28Add support for building swaylock without PAMDrew DeVault-51/+0
This involves setuid'ing swaylock, which then forks and drops perms on the parent process. The child process remains root and listens on a pipe for requests to validate passwords against /etc/shadow.
2018-07-10Implement swaylock customization flagsBrian Ashworth-0/+4
2018-07-09Update for swaywm/wlroots#1126emersion-3/+3
2018-07-07swaylock: fix the displaying of "verified"Dominique Martinet-1/+14
Displaying verified after damaging state needs more than one roundtrip, so keep looping until surfaces are not dirty anymore
2018-06-08swaylock: implement ^U to clear bufferDominique Martinet-0/+8
The whole state->xcb.modifiers thing didn't work at all (always 0) The xkb doc says "[xkb_state_serialize_mods] should not be used in regular clients; please use the xkb_state_mod_*_is_active API instead" so here it is
2018-05-27swaylock: implement a proper render loopemersion-51/+51
2018-04-24Improved key handling in swaylockMattias Eriksson-1/+29
Make escape clear buffer Add indicator states for ctrl,shift,super et al Add CapsLock indicator
2018-04-12swaylock: Securely zero-out password.Geoff Greer-24/+20
- Replace char* with static array. Any chars > 1024 will be discarded. - mlock() password buffer so it can't be written to swap. - Clear password buffer after auth succeeds or fails. This is basically the same treatment I gave the 0.15 branch in https://github.com/swaywm/sway/pull/1519
2018-04-04Address review feedback from @emersionDrew DeVault-1/+2
2018-04-04Move extra roundtrip into password.cDrew DeVault-0/+1
2018-04-04Actually let's not do that TODODrew DeVault-1/+0
2018-04-04R E N D E R I N GDrew DeVault-4/+16
2018-04-04Verify passwordsDrew DeVault-1/+57
2018-04-04Add password buffer, refactor rendering/surfacesDrew DeVault-0/+57