Introduction
Introduction Statistics Contact Development Disclaimer Help
error out early on crypt() fail - slock - simple X display locker utility
git clone git://git.suckless.org/slock
Log
Files
Refs
README
LICENSE
---
commit a98fba8971ab4b8d8b1f18422b808a79434d8923
parent dc2e8e839e4d72f5fec36c9a0474e6062a7a8f51
Author: Markus Teich <[email protected]>
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");
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.