fix custom password for bsd_auth.
This commit is contained in:
parent
05406845e7
commit
f229dd67b7
8
slock.c
8
slock.c
@ -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++;
|
||||||
|
Loading…
Reference in New Issue
Block a user