projects
/
suckless
/
slock.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc2e8e8
)
error out early on crypt() fail
author
Markus Teich
<markus.teich@stusta.mhn.de>
Fri, 23 Sep 2016 17:08:39 +0000
(19:08 +0200)
committer
Markus Teich
<markus.teich@stusta.mhn.de>
Fri, 23 Sep 2016 17:08:39 +0000
(19:08 +0200)
slock.c
patch
|
blob
|
history
diff --git
a/slock.c
b/slock.c
index 6dedc69944ca49e43104f4a81513448e0e9a0af0..2d57e81ae4c163750a212c03ef00d46aad0fa525 100644
(file)
--- 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");