Commit 54583f47 authored by Bastien Nocera's avatar Bastien Nocera Committed by Daniel Drake
Browse files

Don't hardcode username

We use the current user's username instead.
parent 7f592dd2
......@@ -146,7 +146,7 @@ static DBusGProxy *open_device(void)
return dev;
}
static guint32 find_finger(DBusGProxy *dev)
static guint32 find_finger(DBusGProxy *dev, const char *username)
{
GError *error = NULL;
GArray *fingers;
......@@ -154,7 +154,7 @@ static guint32 find_finger(DBusGProxy *dev)
int fingernum;
guint32 print_id;
if (!net_reactivated_Fprint_Device_list_enrolled_fingers_from_storage(dev, "anarsoul", &fingers, &error))
if (!net_reactivated_Fprint_Device_list_enrolled_fingers_from_storage(dev, username, &fingers, &error))
g_error("ListEnrolledFingers failed: %s", error->message);
if (fingers->len == 0) {
......@@ -226,13 +226,16 @@ int main(int argc, char **argv)
GMainLoop *loop;
DBusGProxy *dev;
guint32 print_id;
const char *username;
g_type_init();
loop = g_main_loop_new(NULL, FALSE);
create_manager();
username = g_get_user_name ();
dev = open_device();
print_id = find_finger(dev);
print_id = find_finger(dev, username);
do_verify(dev, print_id);
unload_print(dev, print_id);
release_device(dev);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment