slock
simple X display locker utility
git clone https://9o.is/git/slock.git
commit 12300ed377bd92f980cec92094f285a25f5487ad parent 69211adeea9586032c23e33eb9d54c67dd5fa991 Author: Markus Teich <markus.teich@stusta.mhn.de> Date: Fri, 23 Sep 2016 19:08:39 +0200 error out early on crypt() fail Diffstat:
| M | slock.c | | | 5 | +++-- |
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/slock.c b/slock.c @@ -321,8 +321,9 @@ main(int argc, char **argv) { #endif hash = gethash(); - if (strlen(hash) < 2) - die("slock: failed to get user password hash.\n"); + errno = 0; + if (!crypt("", hash)) + die("slock: crypt: %s\n", strerror(errno)); if (!(dpy = XOpenDisplay(NULL))) die("slock: cannot open display\n");