diff --git a/accountsservice.spec b/accountsservice.spec index ffaa5ba..8870e5c 100644 --- a/accountsservice.spec +++ b/accountsservice.spec @@ -1,7 +1,7 @@ Name: accountsservice Version: 0.6.9 -Release: 4%{?dist} +Release: 5%{?dist} Summary: D-Bus interfaces for querying and manipulating user account information Group: System Environment/Daemons @@ -91,6 +91,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/*.a %{_datadir}/gir-1.0/AccountsService-1.0.gir %changelog +* Wed Apr 27 2011 Ray Strode 0.6.9-5 +- Fix autologin (more bug 678236) + * Tue Apr 26 2011 Ray Strode 0.6.9-4 - more bug 678236 diff --git a/empty-user-list.patch b/empty-user-list.patch index 8f406cc..94d8b57 100644 --- a/empty-user-list.patch +++ b/empty-user-list.patch @@ -345,3 +345,134 @@ index 07c8e34..e98140e 100644 -- 1.7.4.4 +From c94351c10838daeafedf0c37cea41c7308799802 Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Wed, 27 Apr 2011 14:36:50 -0400 +Subject: [PATCH] lib: don't block loading for get_user() requests + +When an app does a get_user() request the user gets added to the +"new user" list while its loading up. + +We currently delaying loading until the "new user" list is empty, +but get_user() requests are deferred until initial loading is done, +so if a get_user() request comes in during initial load, load will +never complete. + +This commit differentiates new users resulting from the initial +ListCachedUsers call and new users resulting from get_user() requests. + +Only the first group inhibit the initial load from completing. +--- + src/libaccountsservice/act-user-manager.c | 33 ++++++++++++++++++++++++++-- + 1 files changed, 30 insertions(+), 3 deletions(-) + +diff --git a/src/libaccountsservice/act-user-manager.c b/src/libaccountsservice/act-user-manager.c +index e98140e..379c972 100644 +--- a/src/libaccountsservice/act-user-manager.c ++++ b/src/libaccountsservice/act-user-manager.c +@@ -140,6 +140,7 @@ struct ActUserManagerPrivate + + GSList *new_sessions; + GSList *new_users; ++ GSList *new_users_inhibiting_load; + GSList *fetch_user_requests; + + GSList *exclude_usernames; +@@ -771,11 +772,16 @@ on_new_user_loaded (ActUser *user, + ActUser *old_user; + + if (!act_user_is_loaded (user)) { ++ g_debug ("ActUserManager: user '%s' loaded function called when not loaded", ++ act_user_get_user_name (user)); + return; + } + g_signal_handlers_disconnect_by_func (user, on_new_user_loaded, manager); ++ + manager->priv->new_users = g_slist_remove (manager->priv->new_users, + user); ++ manager->priv->new_users_inhibiting_load = g_slist_remove (manager->priv->new_users_inhibiting_load, ++ user); + + username = act_user_get_user_name (user); + +@@ -818,9 +824,11 @@ on_new_user_loaded (ActUser *user, + g_object_unref (user); + + out: +- if (manager->priv->new_users == NULL) { ++ if (manager->priv->new_users_inhibiting_load == NULL) { + g_debug ("ActUserManager: no pending users, trying to set loaded property"); + maybe_set_is_loaded (manager); ++ } else { ++ g_debug ("ActUserManager: not all users loaded yet"); + } + } + +@@ -1165,6 +1173,19 @@ set_is_loaded (ActUserManager *manager, + } + + static void ++add_new_inhibiting_user_for_object_path (const char *object_path, ++ ActUserManager *manager) ++{ ++ ActUser *user; ++ ++ user = add_new_user_for_object_path (object_path, manager); ++ ++ if (!manager->priv->is_loaded) { ++ manager->priv->new_users_inhibiting_load = g_slist_prepend (manager->priv->new_users_inhibiting_load, user); ++ } ++} ++ ++static void + on_list_cached_users_finished (DBusGProxy *proxy, + DBusGProxyCall *call_id, + gpointer data) +@@ -1194,7 +1215,7 @@ on_list_cached_users_finished (DBusGProxy *proxy, + * (see on_new_user_loaded) + */ + g_debug ("ActUserManager: ListCachedUsers finished, will set loaded property after list is fully loaded"); +- g_ptr_array_foreach (paths, (GFunc)add_new_user_for_object_path, manager); ++ g_ptr_array_foreach (paths, (GFunc)add_new_inhibiting_user_for_object_path, manager); + + g_ptr_array_foreach (paths, (GFunc)g_free, NULL); + g_ptr_array_free (paths, TRUE); +@@ -1616,6 +1637,9 @@ on_user_manager_maybe_ready_for_request (ActUserManager *manager + return; + } + ++ g_debug ("ActUserManager: user manager now loaded, proceeding with fetch user request for user '%s'", ++ request->username); ++ + g_signal_handlers_disconnect_by_func (manager, on_user_manager_maybe_ready_for_request, request); + + request->state++; +@@ -1714,6 +1738,7 @@ act_user_manager_get_user (ActUserManager *manager, + + /* if we don't have it loaded try to load it now */ + if (user == NULL) { ++ g_debug ("ActUserManager: trying to track new user with username %s", username); + user = create_new_user (manager); + + if (manager->priv->accounts_proxy != NULL) { +@@ -1773,7 +1798,7 @@ maybe_set_is_loaded (ActUserManager *manager) + return; + } + +- if (manager->priv->new_users != NULL) { ++ if (manager->priv->new_users_inhibiting_load != NULL) { + g_debug ("ActUserManager: Loading new users, so not setting loaded property"); + return; + } +@@ -2186,6 +2211,8 @@ act_user_manager_finalize (GObject *object) + (GFunc) free_fetch_user_request, NULL); + g_slist_free (manager->priv->fetch_user_requests); + ++ g_slist_free (manager->priv->new_users_inhibiting_load); ++ + node = manager->priv->new_users; + while (node != NULL) { + ActUser *user; +-- +1.7.4.4 +