Support ^U for clearing password
^U is a fairly common key combo for clearing fields, this patch adds support for it.
This commit is contained in:
1 parent
e3fb34364e
commit
bf0a5577ac
1 file changed
+3
@@ -185,6 +185,9 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens,
|
|||||||
(len + num < sizeof(passwd))) {
|
(len + num < sizeof(passwd))) {
|
||||||
memcpy(passwd + len, buf, num);
|
memcpy(passwd + len, buf, num);
|
||||||
len += num;
|
len += num;
|
||||||
|
} else if (buf[0] == '\025') {
|
||||||
|
explicit_bzero(&passwd, sizeof(passwd));
|
||||||
|
len = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user