slock
simple X display locker utility
git clone https://9o.is/git/slock.git
commit 59c8bf73a0359739ee67461f6869c4ac4b40078b parent 6e22e7eace56f2d3334cf0c2c96e9130d43fe7be Author: Drew Marino <drewmarino25@gmail.com> Date: Fri, 15 Aug 2025 19:30:19 -0400 Support ^U for clearing password ^U is a fairly common key combo for clearing fields, this patch adds support for it. Diffstat:
| M | slock.c | | | 3 | +++ |
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/slock.c b/slock.c @@ -185,6 +185,9 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens, (len + num < sizeof(passwd))) { memcpy(passwd + len, buf, num); len += num; + } else if (buf[0] == '\025') { + explicit_bzero(&passwd, sizeof(passwd)); + len = 0; } break; }