pinosaur
/
slock.git
/ commitdiff
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
6dedc69
..
2d57e81
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");