[gnome-initial-setup/shell/4765: 23/362] account: create login keyring when setting user password



commit 77e7c2d1522a8810354c5a30594c4a6b56316e9c
Author: Cosimo Cecchi <cosimo endlessm com>
Date:   Fri Apr 18 14:27:56 2014 -0700

    account: create login keyring when setting user password

 configure.ac                                       |    1 +
 .../pages/account/gis-account-page.c               |    7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ac6145d..3fe8222 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,6 +40,7 @@ PKG_CHECK_MODULES(INITIAL_SETUP,
                   polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION
                   accountsservice
                   gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION
+                  gnome-keyring-1
                   gstreamer-1.0
                   fontconfig
                   geoclue-2.0
diff --git a/gnome-initial-setup/pages/account/gis-account-page.c 
b/gnome-initial-setup/pages/account/gis-account-page.c
index bc43ca0..4e50380 100644
--- a/gnome-initial-setup/pages/account/gis-account-page.c
+++ b/gnome-initial-setup/pages/account/gis-account-page.c
@@ -31,6 +31,7 @@
 
 #include <glib/gi18n.h>
 #include <gio/gio.h>
+#include <gnome-keyring.h>
 
 #include <act/act-user-manager.h>
 
@@ -484,10 +485,12 @@ local_create_user (GisAccountPage *page)
 
   act_user_set_user_name (priv->act_user, username);
   act_user_set_account_type (priv->act_user, priv->account_type);
-  if (strlen (password) == 0)
+  if (strlen (password) == 0) {
     act_user_set_password_mode (priv->act_user, ACT_USER_PASSWORD_MODE_NONE);
-  else
+  } else {
     act_user_set_password (priv->act_user, password, "");
+    gnome_keyring_create_sync ("login", password);
+  }
 
   language = gis_driver_get_user_language (GIS_PAGE (page)->driver);
   if (language)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]