Commit b70a10e0 authored by Daiki Ueno's avatar Daiki Ueno

login: Use the same label as before when storing password

https://bugzilla.gnome.org/show_bug.cgi?id=794500
parent afbdb0a0
......@@ -29,6 +29,7 @@
#include "gkd-login.h"
#include "egg/egg-secure-memory.h"
#include <glib/gi18n.h>
#include <string.h>
static const gchar *XDG_SCHEMA = "xdg:schema";
......@@ -175,17 +176,20 @@ gkd_login_interaction_ask_password_finish (GTlsInteraction *interaction,
const guchar *value;
gsize length;
gchar *password;
gchar *label;
value = g_tls_password_get_value (G_TLS_PASSWORD (login_password),
&length);
password = egg_secure_strndup ((const gchar *)value, length);
label = g_strdup_printf (_("Unlock password for: %s"), self->label);
gkd_login_store_passwordv (self->session,
password,
self->label,
label,
GCR_UNLOCK_OPTION_ALWAYS, -1,
self->store_fields);
egg_secure_free (password);
g_free (label);
}
return result;
......
......@@ -7,6 +7,7 @@ daemon/gnome-keyring-pkcs11.desktop.in.in
daemon/gnome-keyring-secrets.desktop.in.in
daemon/gnome-keyring-ssh.desktop.in.in
daemon/login/gkd-login.c
daemon/login/gkd-login-interaction.c
daemon/ssh-agent/gkd-ssh-agent-interaction.c
daemon/ssh-agent/gkd-ssh-agent-service.c
egg/dotlock.c
......
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