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

@ -105,6 +105,28 @@ extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> a
Core->GetInterfacesAndImplementations(ifaces, impls);
}
// fingerprintd-agent — the session half. Built with --product=agent.
// It is a separate binary and not a mode of the daemon because it is a
// different user, a different trust domain and a different lifetime: the
// daemon is root and boot-long, this is you and session-long. It links
// the core only for the finger-name vocabulary, and never touches the TEE.
for (std::string_view a : args) {
if (a != "--product=agent") continue;
Configuration agent;
agent.path = "./";
agent.name = "fingerprintd-agent";
agent.outputName = "fingerprintd-agent";
ApplyStandardArgs(agent, args);
agent.type = ConfigurationType::Executable;
agent.dependencies = { Core.get() };
std::array<fs::path, 0> noIfaces = {};
std::array<fs::path, 1> agentImpls = { "implementations/agent" };
agent.GetInterfacesAndImplementations(noIfaces, agentImpls);
ApplyGioFlags(agent);
ProjectLint::AddProjectLintRules(agent);
return agent;
}
// fingerprintd — the daemon: sensor rail, QTEE session, the gpfile and
// RPMB listeners, and the bus surface, wrapped around the core.
Configuration cfg;