diff options
author | 2017-12-13 00:30:43 -0800 | |
---|---|---|
committer | 2017-12-14 19:53:11 -0800 | |
commit | 1312db8b43bd1b688f7e62b541b6f9c616e275e7 (patch) | |
tree | 1941c8873e1ed0c4cdbf14d26ee33718992508ff /include | |
parent | Merge pull request #1446 from kon14/patch-1 (diff) | |
download | sway-1312db8b43bd1b688f7e62b541b6f9c616e275e7.tar.gz sway-1312db8b43bd1b688f7e62b541b6f9c616e275e7.tar.zst sway-1312db8b43bd1b688f7e62b541b6f9c616e275e7.zip |
Swaylock: Clear password buffer after use.
After a user enters or clears a password, try to overwrite the buffer containing it. That way it's not sitting around in RAM for something else to read later. Also, mlock() the password buffer so that it is never swapped out.
This also replaces the dynamically allocated buffer with a static char[1024]. Any characters past that are discarded until the user hits enter or escape.
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions