Hi everybody,
after using slock for quite some time and being generally very pleased
with it, I wanted to use it in more situations, especially ones using
PAM. I checked out the patches on the wiki and found them ...
incomplete. Depending on what PAM is authentication against, like a
fingerprint reader, it might be necessary to display some prompts and
feedback generated by PAM. A possible dialog:
"""
Place your finger on the fingerprint reader
Place your finger on the reader again
Place your finger on the reader again
Verification timed out
Password:
"""
So I started playing with the code.
The short story is that I ended up abstracting things a little
differently to make it possible to compile the authenticating code
independently of slock.c and link it in.
The authenticating code goes into files of the form auth-*.c, of which I
have included two:
* auth-passwd.c
* auth-pam.c
The interface is defined in a new header file, slock.h.
I have put a great deal of effort into keeping the code simple and
concise, as was the original. True to the suckless philosophy, what
little configuration is provided, is done in config.h.
Nonetheless, the code that came out the other end of my journey is
significantly different from the starting code. It cannot usefully be
expressed as a patch for the purposes of discussion.
I am offering this code back to suckless to incorporate as desired and
to get feedback. If the general idea is something that is of interest to
the project, I am quite willing to adjust the code based on feedback to
fit better.
To share the code with you all, I ran `make dist` and uploaded the resultant
tarball to
https://sbronner.com/~waschtl/slock-1.5-waschtl-modular.tar.gz
I look forward to all of your reactions.
Sincerely,
Sebastian
Received on Fri Sep 20 2024 - 22:01:18 CEST