Commit Graph

39 Commits

Author SHA1 Message Date
d70f15b5e8 pam: Port to sd-bus
This pam plugin never used GDBus because it transparently uses threads
which do not work well with a lot of PAM applications. But even settling
on the "still better to use than plain dbus library" dbus-glib wasn't
without problems, as any use or initialisation of GIO sockets would
modify signal handler for signals such as SIGPIPE (see gio/gsocket.c).

Many years later, sd-bus is a more modern alternative to the bare dbus
library with a better API.

This includes:
- Removing use of gboolean, guint, g_new0() and many glib string helpers
- Simplifying debug logging
- Marking user-facing messages to be translated
2020-01-24 00:51:13 +01:00
67adcb59ed configure.ac: Depend on libfprint-2
libfprint changed SONAME to completely break with previous version, so
update fprintd dependency accordingly.
2020-01-23 18:24:53 +01:00
00b79d1a2f tests: Add test for the PAM module
Test the PAM module using pam_wrapper and our mock fprintd.

See https://lwn.net/Articles/671094/

Note that this requires a version of pam_wrapper with this bug fixed:
https://bugzilla.samba.org/show_bug.cgi?id=14245
2020-01-22 15:34:02 +01:00
1a5ef6c5a7 build: Add separate dependency for pam module 2020-01-14 15:52:21 +01:00
d0df422f9b all: Bump required glib version
Require the same version of glib as libfprint, and remove support for
very old versions.
2019-12-18 17:03:37 +01:00
74838f9efc tests: Add basic integration test
This test uses the virtual image driver included in libfprint for
testing.
2019-12-03 17:08:04 +01:00
3db69c2c2f utils: Move test binaries into utils
These utilities are generally useful beyond only testing purproses. And,
since it is desirable to have automated tests inside the tests
subdirecty, it makes sense to move them elsewhere.
2019-12-03 17:08:03 +01:00
d7821aa790 Initial port to libfprint2 2019-12-03 17:08:03 +01:00
c0ba475fbf 0.9.0 2019-08-08 15:18:00 +02:00
e061990fa9 build: Fix loading configuration file with default build args
Fix incorrect configuration path when the sysconfdir is relative to the
prefix argument:
fprintd-WARNING **: 12:22:38.816: Could not open "${prefix}/etc/fprintd.conf": No such file or directory

The path needs to be expanded before it's substituted.
2019-08-08 12:26:23 +02:00
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
9e32cd5257 0.8.1 2018-06-15 17:54:01 +02:00
8eba309920 0.8.0 2017-09-13 16:27:53 +02:00
eabeaa258e 0.7.0 2016-10-13 17:33:26 +02:00
c4f3cc2dc3 0.6.0 2015-02-03 17:07:15 +01:00
3330b8f351 0.5.1 2013-08-11 17:58:52 +02:00
4183c3cdec build: Dist as a .tar.xz file 2013-08-11 17:58:32 +02:00
cb72e9790d 0.5.0 2013-03-05 15:50:45 +01:00
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
870a7a8361 build: Fix checks for pod2man
Previous commit had two obviously broken parts.
2012-11-19 00:44:16 +01:00
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
b10180503d 0.4.1
And fix distcheck.
2011-04-19 00:27:09 +01:00
5b466bbab8 0.4.0 2011-04-18 18:07:00 +01:00
2d11e76cb7 daemon: Use GDBus to monitor clients
Instead of the custom egg code.
2011-04-18 17:55:13 +01:00
bf538f884f build: Silent by default 2011-03-30 16:39:46 +01:00
731b22d368 0.2.0
Fix a missing brace in main.c, fix distchecking.
2010-08-19 16:01:23 +01:00
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
3cd0a7aeaf First pass at adding API docs through gtk-doc
Required a bit of mangling.
2008-11-21 18:15:51 +00:00
4fa5552650 Add PAM module
Add a PAM module, and enable all the warnings
2008-11-03 22:53:44 +00:00
bd2debc01e Update storage code to allow plugins
Add naive plugin support to the storage code, it will
load plugins from $(libdir)/fprintd/modules, given the configuration
from /etc/fprintd.conf.
2008-11-02 11:16:13 +00:00
24d7041fe4 Update polkit dependency
0.8 is the minimum version required.
2008-11-02 11:16:13 +00:00
46a9783be6 Add PolicyKit checking
Add PolicyKit checks to all the public functions, grouped
in 2 main groups: Verify and Enroll
By default, only the user is able to enroll new fingers,
or verify themselves.
You need to be allowed at least one of those 2 actions
to be allowed to claim or release the device.

We also add a new SetUsername function, for administration
functions. Users will need to be authenticate as admins to
be allowed to change the username on which the actions will
be taken. Any prints loaded before the change of username will
be unloaded.
2008-05-22 17:56:25 +01:00
61a2266e52 Start of PolicyKit support
Get a PolicyKit context per-device, set up its main loop,
and steal more code from gnome-panel to check whether
the actions are allowed for a particular caller.
2008-05-22 17:56:25 +01:00
5dafd66eb8 Fix compilation after i18n support addition
Simply missing a po/Makefile.in in the config output, oopsie
2008-05-16 12:17:43 +01:00
3ad569b66a Add i18n support
This will be needed to get better error messages to
users of the D-Bus API. We use glib's builtin gettext
support. No strings marked as translatable yet, we'll
need to mark those user-visible strings carefully and
review them.
2008-05-14 16:07:20 +01:00
822a2e5438 Require libfprint-0.1
To stop people trying to compile it with 0.0 :)
2008-05-13 18:20:42 +01:00
aff2f2aacc D-Bus activation
Provide .conf and .service files for D-Bus to use, allowing fprintd to be
autostarted
2008-05-13 18:18:35 +01:00
2a1aa4e0c0 Rename examples to tests
Real clients won't have the xml available, so calling these "examples"
is not appropriate.
2008-03-09 10:51:48 +00:00
b69cb4a705 Initial commit 2008-03-04 12:39:02 +00:00