mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
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.
This commit is contained in:
committed by
Daniel Drake
parent
45dc821b3a
commit
af42db88bf
26
src/device.c
26
src/device.c
@ -53,6 +53,8 @@ static gboolean fprint_device_set_storage_type(FprintDevice *rdev,
|
|||||||
gint type);
|
gint type);
|
||||||
static void fprint_device_list_enrolled_fingers(FprintDevice *rdev,
|
static void fprint_device_list_enrolled_fingers(FprintDevice *rdev,
|
||||||
DBusGMethodInvocation *context);
|
DBusGMethodInvocation *context);
|
||||||
|
static void fprint_device_delete_enrolled_fingers(FprintDevice *rdev,
|
||||||
|
DBusGMethodInvocation *context);
|
||||||
|
|
||||||
#include "device-dbus-glue.h"
|
#include "device-dbus-glue.h"
|
||||||
|
|
||||||
@ -700,3 +702,27 @@ static void fprint_device_list_enrolled_fingers(FprintDevice *rdev,
|
|||||||
dbus_g_method_return(context, ret);
|
dbus_g_method_return(context, ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void fprint_device_delete_enrolled_fingers(FprintDevice *rdev,
|
||||||
|
DBusGMethodInvocation *context)
|
||||||
|
{
|
||||||
|
FprintDevicePrivate *priv = DEVICE_GET_PRIVATE(rdev);
|
||||||
|
GError *error = NULL;
|
||||||
|
guint i;
|
||||||
|
|
||||||
|
if (_fprint_device_check_claimed(rdev, context, &error) == FALSE) {
|
||||||
|
dbus_g_method_return_error (context, error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_fprint_device_check_polkit_for_action (rdev, context, "net.reactivated.fprint.device.verify", &error) == FALSE) {
|
||||||
|
dbus_g_method_return_error (context, error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = LEFT_THUMB; i <= RIGHT_LITTLE; i++) {
|
||||||
|
storages[priv->storage_type].print_data_delete(priv->dev, i, priv->username);
|
||||||
|
}
|
||||||
|
|
||||||
|
dbus_g_method_return(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -17,6 +17,10 @@
|
|||||||
<annotation name="org.freedesktop.DBus.GLib.Async" value="" />
|
<annotation name="org.freedesktop.DBus.GLib.Async" value="" />
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
|
<method name="DeleteEnrolledFingers">
|
||||||
|
<annotation name="org.freedesktop.DBus.GLib.Async" value="" />
|
||||||
|
</method>
|
||||||
|
|
||||||
<method name="VerifyStart">
|
<method name="VerifyStart">
|
||||||
<arg type="u" name="print_id" direction="in" />
|
<arg type="u" name="print_id" direction="in" />
|
||||||
<annotation name="org.freedesktop.DBus.GLib.Async" value="" />
|
<annotation name="org.freedesktop.DBus.GLib.Async" value="" />
|
||||||
|
|||||||
Reference in New Issue
Block a user