fix custom password for bsd_auth.

This commit is contained in:
Christopher Jeffrey 2014-09-30 12:22:12 -07:00
parent 05406845e7
commit f229dd67b7

View File

@ -424,15 +424,15 @@ readpw(Display *dpy, const char *pws)
switch(ksym) { switch(ksym) {
case XK_Return: case XK_Return:
passwd[len] = 0; passwd[len] = 0;
#ifdef HAVE_BSD_AUTH
running = !auth_userokay(getlogin(), NULL, "auth-xlock", passwd);
#else
if(g_pw) { if(g_pw) {
running = !!strcmp(passwd, g_pw); running = !!strcmp(passwd, g_pw);
} else { } else {
#ifdef HAVE_BSD_AUTH
running = !auth_userokay(getlogin(), NULL, "auth-xlock", passwd);
#else
running = !!strcmp(crypt(passwd, pws), pws); running = !!strcmp(crypt(passwd, pws), pws);
}
#endif #endif
}
if(running) { if(running) {
XBell(dpy, 100); XBell(dpy, 100);
lock_tries++; lock_tries++;