aboutsummaryrefslogtreecommitdiff
path: root/slock.c
diff options
context:
space:
mode:
Diffstat (limited to 'slock.c')
-rw-r--r--slock.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/slock.c b/slock.c
index 6dedc69..2d57e81 100644
--- 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");