Commit Graph

748 Commits

Author SHA1 Message Date
35ae4dd071 Fix a bunch of warnings
More warnings fixed in the file storage.
2008-11-02 11:16:59 +00:00
0a075532c7 Fix another error path
More to do though...
2008-11-02 11:16:59 +00:00
f83ee93d6a Add warnings m4 macros from GNOME
This is better than what we've got currently, and
even works with older versions of GCC.
2008-11-02 11:16:59 +00:00
15fbacd738 More identification work
- Add a finger selected signal, so that when an "automatic" finger
  is selected for verification, we know which one to scan
- Fix the finger print numbers list to use GPOINTER_TO_INT /
  GINT_TO_POINTER
- Make sure the gallery is NULL when there's no prints available
- Don't use identification when a finger number is provided
- Add support for selecting the finger number in verify
- Add support for fatal warnings there as well
2008-11-02 11:16:13 +00:00
ee874bb1d4 Add identify support
Passing -1 to the VerifyStart function will either accept any
fingers scanned, if the driver supports identification, or select
the first enrolled fingerprint for scanning if it doesn't.
2008-11-02 11:16:13 +00:00
b4bfdcd55d Remove a TODO item
ClaimDevice is now only needed for hardware related actions
2008-11-02 11:16:13 +00:00
974e022c4d Debug output cleanup
Remove a few debug messages, and merge another one.
2008-11-02 11:16:13 +00:00
e8c36e9592 Rework the "SetUsername" functionality
- Remove SetUsername itself, and add a username parameter to DeviceClaim,
  ListEnrolledFingers and DeleteEnrolledFingers.
- For each of those calls, check that the incoming connection is allowed
  to operate on that particular username
- Don't require a claimed device to list or remove fingerprints
- Clean up username and sender when releasing the device
- Modify the storage backend to not require an opened device to list
  or delete fingerprints
- Add a simple test program to list registered fingerprints for the
  usernames passed as argument
2008-11-02 11:16:13 +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
96b444ed3e Install a configuration file
This should be used to set the storage type.
2008-11-02 11:16:13 +00:00
c738aa334d Fix PolicyKit action for deleting fingerprints
We can only delete fingerprints if we could enroll them
in the first place.
2008-11-02 11:16:13 +00:00
81933406d0 Support setting the username in the tests
Allow enroll and verify to optionally set a username. Makes
testing easier.
2008-11-02 11:16:13 +00:00
2f5987eded Update TODO list
Add a few more TODO items
2008-11-02 11:16:13 +00:00
af42db88bf Add DeleteEnrolledFingers
To delete all the enrolled finger prints for a particular user.
We can already overwrite existing enrolled fingerprints, and there's
not really any point in dismissing just one fingerprint.
2008-11-02 11:16:13 +00:00
45dc821b3a Update use cases
Less implementation details, more use casing.
2008-11-02 11:16:13 +00:00
bb1210981b Kill LoadPrintData and UnloadPrintData
They were just doing nothing interesting for us, and might
cause problems if data changes under us (say, remote storage).
2008-11-02 11:16:13 +00:00
f7ae545dc9 Add a few use cases to the README
Will be useful when people try to do crazy things with fprintd
2008-11-02 11:16:13 +00:00
98bcdc9397 Add myself to the authors
..
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
5e194488e7 The user that claims the device is the one we work on
When the user claims the device, get its uid and username,
and use this data to read/save from storage.
2008-05-22 17:55:16 +01:00
8529a43b0d Save using storage
Save the fingerprint using the storage functions so we
can verify the data we enroll.
2008-05-22 17:55:16 +01:00
b1b5e2b495 Kill ListEnrolledFingersFromStorage
Last FromStorage variant killed, we need to make sure all
the functions now use the storage functions internally,
otherwise we won't be able to load from the place we save.
2008-05-22 17:55:16 +01:00
148b6fc676 Constify username
Fixes a few warnings on compilation
2008-05-22 17:55:16 +01:00
5d4e23ab32 Kill LoadPrintDataFromStorage
First FromStorage variant to go
2008-05-22 17:55:15 +01:00
7587105647 Add TODO items
Some thoughts on storage handling
2008-05-22 17:55:15 +01:00
54583f4750 Don't hardcode username
We use the current user's username instead.
2008-05-22 17:55:15 +01:00
7f592dd2e4 Fix return values for async methods
Async methods should return "out" variables using dbus_g_method_return(),
not through function parameters. Fixes crashing using those functions.
2008-05-22 17:55:15 +01:00
c63f624a26 Async methods return void
Thanks to Richard Hughes for spotting this. Shouldn't
make any operational differences, as the return values
of those methods weren't used anyway.
2008-05-22 17:55:15 +01:00
1748e5f484 Add user tracking when claiming a device
Mark all the methods on the device as async, so we
can get access to the associated DBusGMethodInvocation.

When claiming the device, remember the sender, and for every
API entry point, check that the sender is the same as the one
that made the original claim.

Trying to enroll a user whilst the device is already claimed
from another program will fail with:
** ERROR **: failed to claim device: Device was already claimed

This is the first step towards PolicyKit and multi-user support
2008-05-18 12:41:05 +01:00
039c988f4b Fix warning on startup
When there are no errors on startup, we'd get a warning
as we were copying a NULL GError
2008-05-16 18:21:20 +01:00
5d60894e69 Add support for --g-fatal-warnings
This makes debugging warnings from fprintd easier, uses
GOption as available since glib 2.6
2008-05-16 18:21:13 +01:00
3a0152e124 Fix _get_error() in the manager
Fix wrong assumption of semantics when fp_discover_devs()
returns NULL.
2008-05-16 12:17:48 +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
1919ca75f2 Use GObject-provided boilerplate
Clean up the device object by using G_DEFINE_TYPE
2008-05-14 16:07:32 +01:00
017f770480 Clean up object creation code
Make all of FPrintManager's struct members private,
warn of errors using a _get_error() function, as object
creation can never fail.

The only error possible shouldn't really be an error though,
as it only means that no devices will be enumerated, but it
could tell us about newly plugged devices instead.
2008-05-14 16:07:25 +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
6cbb079619 Make the daemon a system daemon
With this patch, and the D-Bus activation patches posted earlier the
fprintd daemon is started automatically when needed.

We should have a way to exit it nicely when there are no users
anymore as well...
2008-05-13 23:10:04 +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
1f54a0c363 Initial storage implementation
[dsd: changed from /etc/fprint to /var/lib/fprint]
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2008-04-06 23:49:28 +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
fc6b0c194c Add enrollment functionality 2008-03-06 16:37:19 +00:00
3e68c40e4e Present verify results with a signal 2008-03-06 13:12:34 +00:00
080e427651 Move to object oriented model
There is now a single Manager class shared between all apps.
Apps then share a collection of Device objects.
2008-03-05 23:52:33 +00:00
98c936dbdd Make claim and release asynchronous 2008-03-04 14:55:37 +00:00
b69cb4a705 Initial commit 2008-03-04 12:39:02 +00:00