X-Git-Url: https://git.danieliu.xyz/?p=slock.git;a=blobdiff_plain;f=slock.c;h=2d57e81ae4c163750a212c03ef00d46aad0fa525;hp=6dedc69944ca49e43104f4a81513448e0e9a0af0;hb=a98fba8971ab4b8d8b1f18422b808a79434d8923;hpb=dc2e8e839e4d72f5fec36c9a0474e6062a7a8f51 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");