An agent, so a finger can mean something in your session

The daemon announces every matched finger on the system bus and stops there,
because root has no session bus, no display and no business starting your
applications. fingerprintd-agent is the other half: it runs as you, subscribes
properly rather than parsing gdbus monitor output, filters by uid because the
signal is visible to every local user, and maps fingers to commands from a file
you own and can edit without restarting anything.

It is a separate binary and a separate subpackage because it is a separate
trust domain. /etc/fingerprintd/actions.conf is a root shell and is guarded
like one; ~/.config/fingerprintd/fingers.conf runs your commands as you, so it
is an ordinary dotfile.

Demonstrated on the phone: one press of the unlock finger both unlocks it and
opens plasma-camera.
This commit is contained in:
Jorijn van der Graaf 2026-09-05 06:21:53 +02:00
commit 1934822554
8 changed files with 264 additions and 2 deletions

View file

@ -10,11 +10,14 @@ VER="${1:-$(sed -n 's/.*char\* Version = "\(.*\)".*/\1/p' implementations/main.c
[ -n "$VER" ] || { echo "could not determine version — pass it as \$1" >&2; exit 1; }
BIN=$(ls -t bin/fingerprintd-aarch64-*/fingerprintd 2>/dev/null | head -n1)
[ -n "$BIN" ] || { echo "no aarch64 fingerprintd build found — cross-compile first" >&2; exit 1; }
AGENT=$(ls -t bin/fingerprintd-agent-aarch64-*/fingerprintd-agent 2>/dev/null | head -n1)
[ -n "$AGENT" ] || { echo "no aarch64 agent build — cross-compile with --product=agent" >&2; exit 1; }
stage=$(mktemp -d)
trap 'rm -rf "$stage"' EXIT
mkdir "$stage/fingerprintd-$VER"
cp "$BIN" "$stage/fingerprintd-$VER/fingerprintd"
cp "$AGENT" "$stage/fingerprintd-$VER/fingerprintd-agent"
cp packaging/fingerprintd.service \
packaging/mnt-persist.mount \
packaging/80-fingerprintd.preset \
@ -28,6 +31,8 @@ cp packaging/fingerprintd.service \
packaging/fingerprint-auth.pam \
packaging/postlogin.pam \
packaging/actions.conf.example \
packaging/fingerprintd-agent.service \
packaging/fingers.conf.example \
"$stage/fingerprintd-$VER/"
tar -C "$stage" -czf "fingerprintd-$VER.tar.gz" "fingerprintd-$VER"
echo "wrote fingerprintd-$VER.tar.gz ($(du -h "fingerprintd-$VER.tar.gz" | cut -f1))"