slock

My slock fork
git clone https://git.kausban.com/slock/raw/.git
Log | Files | Refs | README

commit c8567e636bf1bb90338d2f041769658aec2cb32e
parent 552165efc862ee4f6d2069fda8dd89ef83308fec
Author: kausban <mail@kausban.com>
Date:   Mon, 15 Mar 2021 13:38:00 +0100

v1.4-5 with backspace patch file.

Diffstat:
A.SRCINFO | 23+++++++++++++++++++++++
Abackspace.patch | 30++++++++++++++++++++++++++++++
2 files changed, 53 insertions(+), 0 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = slock + pkgdesc = A simple screen locker for X + pkgver = 1.4 + pkgrel = 5 + url = https://tools.suckless.org/slock + arch = x86_64 + groups = modified + license = MIT + depends = libxext + depends = libxrandr + source = https://dl.suckless.org/tools/slock-1.4.tar.gz + source = backspace.patch + source = slock-pam_auth-20190207-35633d4.diff + source = slock-message-20191215-post_pam.diff + source = config.h + md5sums = f91dd5ba50ce7bd1842caeca067086a3 + md5sums = 20d46d8e70dfc80a2cd8467b461ac74d + md5sums = eddc691152663c3f623ad63649b93bc2 + md5sums = 030f0ba0039750b67460f0b4b0ad147b + md5sums = 3c7c2f5567299b01b28232ada132e28f + +pkgname = slock + diff --git a/backspace.patch b/backspace.patch @@ -0,0 +1,30 @@ +commit 35633d45672d14bd798c478c45d1a17064701aa9 +Author: Tobias Stoeckmann <tobias@stoeckmann.org> +Date: Sat Mar 25 21:16:01 2017 +0100 + + Properly clear the last entered character + + When enter is pressed, passwd[len] will be set to '\0'. Pressing + backspace is supposed to remove the last entered character. + + But currently, the clearing has an off-by-one, as in setting + passwd[len] to '\0' just like enter would do. + + You can also verify it by imagining len=1 and that it's impossible to + clear passwd[0] by pressing backspace with the current code. + + Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> + +diff --git a/slock.c b/slock.c +index d55eb3d..5ae738c 100644 +--- a/slock.c ++++ b/slock.c +@@ -177,7 +177,7 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens, + break; + case XK_BackSpace: + if (len) +- passwd[len--] = '\0'; ++ passwd[--len] = '\0'; + break; + default: + if (num && !iscntrl((int)buf[0]) &&