aboutsummaryrefslogtreecommitdiff
path: root/include/util.h
diff options
context:
space:
mode:
authorGeoff Greer <geoff@greer.fm>2017-12-13 00:30:43 -0800
committerGeoff Greer <geoff@greer.fm>2017-12-14 19:53:11 -0800
commit1312db8b43bd1b688f7e62b541b6f9c616e275e7 (patch)
tree1941c8873e1ed0c4cdbf14d26ee33718992508ff /include/util.h
parent52c4c166d83caa1f8a0d1fbc49deff65d9de0bcf (diff)
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/util.h')
0 files changed, 0 insertions, 0 deletions