Requesting hard code freeze breakage
- From: Brian Cameron <brian cameron oracle com>
- To: gnome-release-team <release-team gnome org>
- Subject: Requesting hard code freeze breakage
- Date: Fri, 26 Mar 2010 17:51:38 -0500
I am the co-maintainer of GDM, and I would like to request that the fix
for this bug be approved for inclusion in GDM 2.30.0.
https://bugzilla.gnome.org/show_bug.cgi?id=614062
The patch is attached to the bug report, and this email. As you can
see, it does not change any strings, except adding some untranslated
debug messages.
This fixes a serious usability issue when using GDM timed login that
was not noticed until late testing. Without this fix, the GDM login
GUI acts oddly when the "timed login" feature is enabled. If the
user clicks on a user it will not show the PAM prompt to allow the
user to actually log in. If the user hits "Cancel" and tries again
then it will work, but this is non-obvious.
The fix is simple. It just adds a signal handler to ensure that the
code to set the timed login user is done after the users are actually
loaded, avoiding a race condition.
Thanks,
Brian
--- gdm-2.29.92/gui/simple-greeter/gdm-greeter-login-window.c-orig 2010-03-26 15:26:59.132139768 -0500
+++ gdm-2.29.92/gui/simple-greeter/gdm-greeter-login-window.c 2010-03-26 17:23:28.292896780 -0500
@@ -109,6 +109,7 @@ struct GdmGreeterLoginWindowPrivate
guint dialog_mode;
+ gboolean timed_login_already_enabled;
gboolean timed_login_enabled;
guint timed_login_delay;
char *timed_login_username;
@@ -683,34 +684,55 @@ gdm_greeter_login_window_problem (GdmGre
return TRUE;
}
+static void
+handle_request_timed_login (GdmGreeterLoginWindow *login_window)
+{
+ if (login_window->priv->dialog_mode != MODE_SELECTION) {
+ reset_dialog (login_window);
+ }
+ gdm_user_chooser_widget_set_show_user_auto (GDM_USER_CHOOSER_WIDGET (login_window->priv->user_chooser), TRUE);
+
+ if (!login_window->priv->timed_login_already_enabled) {
+ gdm_user_chooser_widget_set_chosen_user_name (GDM_USER_CHOOSER_WIDGET (login_window->priv->user_chooser),
+ GDM_USER_CHOOSER_USER_AUTO);
+ }
+}
+
+static void
+on_request_timed_login_after_users_loaded (GdmUserChooserWidget *user_chooser,
+ GdmGreeterLoginWindow *login_window)
+{
+ g_debug ("Users now loaded, handling timed login request");
+ handle_request_timed_login (login_window);
+}
+
void
gdm_greeter_login_window_request_timed_login (GdmGreeterLoginWindow *login_window,
const char *username,
int delay)
{
- static gboolean timed_login_already_enabled;
-
g_return_if_fail (GDM_IS_GREETER_LOGIN_WINDOW (login_window));
g_debug ("GdmGreeterLoginWindow: requested automatic login for user '%s' in %d seconds", username, delay);
if (login_window->priv->timed_login_username != NULL) {
- timed_login_already_enabled = TRUE;
+ login_window->priv->timed_login_already_enabled = TRUE;
g_free (login_window->priv->timed_login_username);
} else {
- timed_login_already_enabled = FALSE;
+ login_window->priv->timed_login_already_enabled = FALSE;
}
login_window->priv->timed_login_username = g_strdup (username);
login_window->priv->timed_login_delay = delay;
- if (login_window->priv->dialog_mode != MODE_SELECTION) {
- reset_dialog (login_window);
- }
- gdm_user_chooser_widget_set_show_user_auto (GDM_USER_CHOOSER_WIDGET (login_window->priv->user_chooser), TRUE);
-
- if (!timed_login_already_enabled) {
- gdm_user_chooser_widget_set_chosen_user_name (GDM_USER_CHOOSER_WIDGET (login_window->priv->user_chooser),
- GDM_USER_CHOOSER_USER_AUTO);
+ if (login_window->priv->user_chooser_loaded) {
+ g_debug ("Handling timed login request since users are already loaded.");
+ handle_request_timed_login (login_window);
+ } else {
+ g_debug ("Waiting to handle timed login request until users are loaded.");
+ g_signal_connect (login_window->priv->user_chooser,
+ "loaded",
+ G_CALLBACK (on_request_timed_login_after_users_loaded),
+ login_window);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]