Commit graph

53 commits

Author SHA1 Message Date
Abhinav Baid
3ba3bf2cb9 Add /dev/cros_fp to DeviceAllow systemd lockdown rules 2024-08-20 21:58:35 +01:00
Michael M
29f940c021 Fix typo and wording in fprintd.1 manpage 2024-01-22 15:44:10 +00:00
Marco Trevisan (Treviño)
81f52522a6 pam_fprintd: Support setting infinite max_tries
This can be handled by the module loader (i.e. GDM), so a particular
pam configuration may be interested in disabling the max-tries check at
all.
2022-02-24 16:11:13 +00:00
Marco Trevisan (Treviño)
fbd56d6662 pam_fprintd: Support disabling the module timeout
This can be handled by the module loader (i.e. GDM) and in any case we
may want to have setups where fprintd is always active waiting for a
fingerprint, as modern devices support this with no problems.
2022-02-24 16:11:13 +00:00
Benjamin Berg
0595f416f9 data: Fix udev event delivery for systemd service
PrivateNetwork=true is a bad idea, as it means that udev events cannot
be delivered. Remove it, we already restrict the address families
sufficiently anyway.

Closes: #119
2021-11-03 10:46:03 +00:00
Marco Trevisan (Treviño)
50943b1bd4 build: Do not use positional arguments in i18n.merge_file
This was never really used and it's breaking meson 60.
While this may just become a warning in 60.1, it's just better to avoid
using it.

See: https://github.com/mesonbuild/meson/issues/9441
2021-11-02 15:06:29 +00:00
Axel Navarro
245dcfa218
fix: fix typo in man page 2021-10-30 16:49:45 -03:00
Bastien Nocera
b483edbe92 device.policy: Fix permission dialogue titles
Fix the action description for some actions which are used to both
enroll and delete fingerprints for users.

Closes: #116
2021-09-02 17:14:07 +02:00
Benjamin Berg
ff4ba1da47 data: Allow access to hidraw devices
The elanspi driver needs access to a hidraw device in order to reset the
SPI reader.
2021-08-20 13:59:06 +00:00
Benjamin Berg
96b911913e data: Allow tuning USB parameters
Newer libfprint versions try to tune the wakeup and persist option of
USB devices. Add access rules to permit this.
2021-08-06 15:31:24 +02:00
Benjamin Berg
7aecec1449 data: Restrict syscall usage of fprintd
fprintd only needs very few syscalls. Mainly normal IO operations and
ioctl for USB access. All of this is covered by @system-service, we
could likely restrict it quite a bit more though.
2021-06-29 21:10:59 +02:00
Benjamin Berg
0f7340130e data: Disallow fprintd to read kernel logs 2021-06-29 21:10:03 +02:00
Benjamin Berg
fcd7e9bc76 data: Only allow access to USB and SPI devices
That is all that fprintd. Note that ProtectClock already restricts
device access and other device types need to be listed explicitly
because of this.
2021-06-29 20:48:16 +02:00
Marco Trevisan (Treviño)
fe95889f2e pam_fprintd.pod: Adapt documentation on max-tries to match code 2021-02-01 18:08:25 +01:00
Jan Alexander Steffens (heftig)
6fd1aa51cd data: Use the correct mode for the state dir
The code (in file_storage.c) expects mode 0700. However, systemd
defaults to 0755. This causes strange behavior.

https://bugs.archlinux.org/task/68932
2021-01-19 22:18:55 +00:00
Dudemanguy
5aa61adabc build: make systemd dependency optional
The systemd dependency is only used to install some systemd service
files. This can easily be made optional.
2020-12-11 15:01:24 +01:00
Marco Trevisan (Treviño)
a10f0dc22d net.reactivated.Fprint: Allow actual fprind interfaces to be used
We allowed a non-existant net.reactivated.Fprint interface, while our
interfaces are Manager and Device.

Allow them to be used.
2020-12-03 17:54:21 +01:00
Marco Trevisan (Treviño)
df568e1ce1 net.reactivated.Fprint: Explicitly allow basic D-Bus APIs 2020-11-28 20:29:57 +00:00
Marco Trevisan (Treviño)
7ee61393ec net.reactivated.Fprint: Only allow clients to send messages with fprintd iface to us
In the way the rule is currently set it would allow clients to send
messages with the fprintd interface to any other service, while we only
allow them to be redirected to fprintd itself.

This was causing a debian linter failure [1].

[1] https://lintian.debian.org/tags/dbus-policy-without-send-destination.html
2020-11-28 20:29:57 +00:00
Marco Trevisan (Treviño)
778a8540aa device.policy: Use auth-self-keep for enrollment
When user is requested for enrolling, we should ask for password as
anyone who has physical access to the machine could otherwise enroll
its own fingers, and have access to it.

Fixes #5
2020-11-10 14:45:59 +01:00
Benjamin Berg
e224913b80 Revert "data: Add additional fprintd lockdown"
The current lockdown rules prevent USB devices from being accessed and
cause threading to not work.
As such, revert them until it is clear on how/if we can apply these
measures. It is primarily not clear on how to prevent fork/clone as
fprintd does not need those.

This reverts commit 2fd86624e5.

See: #82
2020-11-10 12:27:38 +00:00
Bastien Nocera
2fd86624e5 data: Add additional fprintd lockdown 2020-10-13 09:28:39 +00:00
Bastien Nocera
73625233f6 build: Remove autotools support 2020-02-05 16:54:54 +01:00
Marco Trevisan (Treviño)
53d80c1474 build: Use gettext to translate policy file with meson
Recent versions of gettext can merge translations in xml files,
so use it and remove the intltool dependency for meson builds.
2020-02-05 15:25:35 +01:00
Marco Trevisan (Treviño)
eb6dbb6953 build: Add meson build system
Reuse the generated dbus interface .xml files from fprintd to avoid
unnecessary copies.
2020-02-05 15:25:35 +01:00
Bastien Nocera
b97903f781 data: Update built man pages
As used in the dist tarball.
2020-01-24 17:03:43 +01:00
Bastien Nocera
a30697a28d data: Add pam_fprintd man page
Closes: #24
2020-01-24 17:03:43 +01:00
Bastien Nocera
aad3212d22 data: Update links to other man pages 2020-01-24 17:03:43 +01:00
Bastien Nocera
3624bcb114 data: Fix copy/paste error in fprintd-verify's man page 2020-01-24 17:03:43 +01:00
Bastien Nocera
4eb751a218 data: Fix typos in man pages 2020-01-14 14:00:56 +01:00
worldofpeace
3520cb56d1 build: Move D-Bus conf file to $(datadir)/dbus-1/system.d
Since D-Bus 1.9.18 configuration files installed by third-party should
go in share/dbus-1/system.d. The old location is for sysadmin overrides.
2019-09-16 11:43:51 -04:00
Will Thompson
94a9815362 data: tell systemd to create state directory
If the directory referred to by ReadWritePaths= does not exist, the
service fails to start:

    systemd[1]: Starting Fingerprint Authentication Daemon...
    systemd[9736]: fprintd.service: Failed to set up mount namespacing: No such file or directory
    systemd[9736]: fprintd.service: Failed at step NAMESPACE spawning /usr/lib/fprintd/fprintd: No such file or directory
    systemd[1]: fprintd.service: Main process exited, code=exited, status=226/NAMESPACE
    systemd[1]: fprintd.service: Failed with result 'exit-code'.
    systemd[1]: Failed to start Fingerprint Authentication Daemon.

This may happen when booting with an empty /var filesystem.

For a system service, "StateDirectory=fprint" causes /var/lib/fprint and
any parent directories to be created if missing (with mode 0755 by
default, owned by the user and group of the service, which in this case
is root).  In combination with ProtectSystem=strict, this state
directory will be mounted read-write.  StateDirectory was introduced in
systemd 235, so require at least this version.

The /var/lib prefix is hardcoded in systemd. (Since systemd 240, the
full path(s) to StateDirectory are provided as $STATE_DIRECTORY, but
since it is always /var/lib, we continue to just hardcode that path.)

On non-systemd systems, since fprintd runs as root with no confinement,
it can create its state directory as needed (with g_mkdir_with_parents()
in file_storage_print_data_save()).
2019-07-04 15:27:54 +01:00
Will Thompson
9ed8767cb3 Hardcode storage path as /var/lib/fprint
--localstatedir (and --prefix) will now be ignored in favour of this
hardcoded path.  This is in preparation for a change to use systemd's
StateDirectory feature.
2019-07-04 15:27:54 +01:00
Bastien Nocera
32b9f1b056 data: Update policy vendor URL 2018-06-15 17:54:01 +02:00
Bastien Nocera
2704e72308 data: Restrict available socket protocols
When starting the daemon
2018-04-26 14:44:02 +02:00
Bastien Nocera
6494efa94e data: Stop privilege escalations in daemon
Using the NoNewPrivileges stanza from systemd.
2017-09-13 15:48:17 +02:00
Bastien Nocera
36d3d9d749 data: Lockdown the fprintd service
Give read-write access to USB devices in /dev, and the location of the
fingerprints, access to Unix sockets for D-Bus and
close everything else down.

See systemd.exec(5) for details about the options.
2017-01-05 13:04:48 +01:00
Bastien Nocera
7710040ea7 data: Fix syntax error in fprintd.pod
fprintd.pod around line 100: =over without closing =back
POD document had syntax errors at /usr/bin/pod2man line 69.
2013-08-11 18:58:20 +02:00
Peter Volkov
7eb1f0fd86 tests: Support -f 'finger' option for enroll
Add support for -f 'finger' option to fprintd-enroll.
Update docs accordingly.

https://bugs.freedesktop.org/show_bug.cgi?id=62644
2013-06-26 13:10:17 +02:00
Bastien Nocera
476b175cc0 data: Fix left-over build files from systemd service 2013-03-05 15:50:44 +01:00
Bastien Nocera
c35cf36ba8 data: Add systemd unit file to the dist 2013-03-05 15:27:40 +01:00
Colin Walters
9ea025d9cb Add a systemd unit file
It's just better if we get activated via systemd rather than dbus.
Various bits of configury/makefile taken from polkit.

https://bugs.freedesktop.org/show_bug.cgi?id=58468
2012-12-18 17:29:26 +01:00
Colin Walters
78623147bc build: Only use pod2man if it exists
This fixes the build in gnome-ostree, where we don't have pod2man
to generate the manpages.
2012-11-17 09:07:04 +01:00
Bastien Nocera
76700853f0 data: Update man page 2011-03-30 16:41:04 +01:00
Bastien Nocera
7ece7446b9 Fix verbose xmllint output 2010-09-11 14:56:56 +01:00
Bastien Nocera
731b22d368 0.2.0
Fix a missing brace in main.c, fix distchecking.
2010-08-19 16:01:23 +01:00
Bastien Nocera
4f30f39699 Add man page for the command-line utilities 2010-08-16 19:35:10 +01:00
Matthias Clasen
24fefbe332 Port to PolicyKit 1.0
See https://bugzilla.redhat.com/show_bug.cgi?id=498368
and
https://fedoraproject.org/wiki/Features/PolicyKitOne
2010-08-16 19:33:01 +01:00
Bastien Nocera
b2b81d0df9 Update D-Bus config file
Following the recent changes in D-Bus, the configuration file
needs to be a bit more explicit.
2008-12-10 00:54:28 +00:00
Bastien Nocera
31a8e2c61d Fix distcheck
And add a TODO item
2008-11-21 18:14:09 +00:00