[gdm] greeter: don't tank if accounts service removes user we don't know about



commit 9ec8f69ce6b225702c4f6bc0475f16d3bc0ef2fa
Author: Ray Strode <rstrode redhat com>
Date:   Mon Mar 7 16:44:39 2011 -0500

    greeter: don't tank if accounts service removes user we don't know about
    
    The chooser right now will throw a critical if we try to remove an item
    that doesn't exist.
    
    There are some situations where users get removed from the account
    service that we never added to the user list.  In those cases, we
    need to be careful not to try to remove them to prevent crash-inducing
    criticals.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=644149

 gui/simple-greeter/gdm-user-chooser-widget.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/gui/simple-greeter/gdm-user-chooser-widget.c b/gui/simple-greeter/gdm-user-chooser-widget.c
index 59fee40..9551eca 100644
--- a/gui/simple-greeter/gdm-user-chooser-widget.c
+++ b/gui/simple-greeter/gdm-user-chooser-widget.c
@@ -826,6 +826,18 @@ on_user_removed (ActUserManager       *manager,
 
         user_name = act_user_get_user_name (user);
 
+        /* Ignore removals we aren't interested in */
+        if (!gdm_chooser_widget_lookup_item (GDM_CHOOSER_WIDGET (widget),
+                                             user_name,
+                                             NULL,
+                                             NULL,
+                                             NULL,
+                                             NULL,
+                                             NULL,
+                                             NULL)) {
+                return;
+        }
+
         gdm_chooser_widget_remove_item (GDM_CHOOSER_WIDGET (widget),
                                         user_name);
 



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