Accepting request 41961 from GNOME:Factory

Copy from GNOME:Factory/gdm based on submit request 41961 from user vuntz

OBS-URL: https://build.opensuse.org/request/show/41961
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdm?expand=0&rev=97
This commit is contained in:
OBS User autobuild 2010-06-28 09:28:39 +00:00 committed by Git OBS Bridge
commit b28cbb99dd
3 changed files with 89 additions and 1 deletions

View File

@ -0,0 +1,77 @@
Index: gdm-2.30.2/gui/simple-greeter/gdm-greeter-login-window.c
===================================================================
--- gdm-2.30.2.orig/gui/simple-greeter/gdm-greeter-login-window.c
+++ gdm-2.30.2/gui/simple-greeter/gdm-greeter-login-window.c
@@ -406,6 +406,13 @@ set_log_in_button_mode (GdmGreeterLoginW
}
}
+static gboolean
+user_chooser_has_no_user (GdmGreeterLoginWindow *login_window)
+{
+ return (login_window->priv->user_chooser_loaded &&
+ gdm_chooser_widget_get_number_of_items (GDM_CHOOSER_WIDGET (login_window->priv->user_chooser)) == 0);
+}
+
static void
adjust_other_login_visibility(GdmGreeterLoginWindow *login_window)
{
@@ -565,7 +572,7 @@ reset_dialog (GdmGreeterLoginWindow *log
label = GTK_WIDGET (gtk_builder_get_object (GDM_GREETER_LOGIN_WINDOW (login_window)->priv->builder, "auth-prompt-label"));
gtk_label_set_text (GTK_LABEL (label), "");
- if (login_window->priv->user_list_disabled) {
+ if (login_window->priv->user_list_disabled || user_chooser_has_no_user (login_window)) {
switch_mode (login_window, MODE_AUTHENTICATION);
} else {
switch_mode (login_window, MODE_SELECTION);
@@ -603,8 +610,8 @@ gdm_greeter_login_window_ready (GdmGreet
set_focus (GDM_GREETER_LOGIN_WINDOW (login_window));
/* If the user list is disabled, then start the PAM conversation */
- if (login_window->priv->user_list_disabled) {
- g_debug ("Starting PAM conversation since user list disabled");
+ if (login_window->priv->user_list_disabled || user_chooser_has_no_user (login_window)) {
+ g_debug ("Starting PAM conversation since user list disabled or no local users");
g_signal_emit (G_OBJECT (login_window), signals[USER_SELECTED],
0, GDM_USER_CHOOSER_USER_OTHER);
g_signal_emit (login_window, signals[BEGIN_VERIFICATION], 0);
@@ -901,7 +908,16 @@ on_users_loaded (GdmUserChooserWidget *
update_banner_message (login_window);
adjust_other_login_visibility (login_window);
- gdm_chooser_widget_activate_if_one_item (GDM_CHOOSER_WIDGET (login_window->priv->user_chooser));
+ if (user_chooser_has_no_user (login_window)) {
+ /* There's no face browser to show */
+ login_window->priv->show_cancel_button = FALSE;
+ switch_mode (login_window, MODE_AUTHENTICATION);
+
+ g_debug ("Starting PAM conversation since no local users");
+ g_signal_emit (G_OBJECT (login_window), signals[USER_SELECTED],
+ 0, GDM_USER_CHOOSER_USER_OTHER);
+ g_signal_emit (login_window, signals[BEGIN_VERIFICATION], 0);
+ }
}
static void
@@ -1255,7 +1271,7 @@ update_banner_message (GdmGreeterLoginWi
} else {
char *message = NULL;
error = NULL;
- if (login_window->priv->user_chooser_loaded && gdm_chooser_widget_get_number_of_items (GDM_CHOOSER_WIDGET (login_window->priv->user_chooser)) == 0) {
+ if (user_chooser_has_no_user (login_window)) {
message = gconf_client_get_string (login_window->priv->client, KEY_BANNER_MESSAGE_TEXT_NOCHOOSER, &error);
if (error != NULL) {
g_debug("GdmGreeterLoginWindow: unable to get nochooser banner text: %s", error->message);
Index: gdm-2.30.2/gui/simple-greeter/gdm-chooser-widget.c
===================================================================
--- gdm-2.30.2.orig/gui/simple-greeter/gdm-chooser-widget.c
+++ gdm-2.30.2/gui/simple-greeter/gdm-chooser-widget.c
@@ -1915,6 +1915,7 @@ gdm_chooser_widget_init (GdmChooserWidge
add_separator (widget);
queue_column_visibility_update (widget);
+ update_chooser_visibility (widget);
}
static void

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Jun 22 02:39:36 CEST 2010 - vuntz@opensuse.org
- Add gdm-greeter-no-local-user.patch to fix the greeter to work
when there's no local user on the machine; this is useful with
NIS for example. Fix bnc#615044; the patch was committed
upstream.
-------------------------------------------------------------------
Thu Jun 17 23:07:12 CEST 2010 - captain.magnus@opensuse.org

View File

@ -42,7 +42,7 @@ BuildRequires: zenity
License: GPLv2+
Group: System/GUI/GNOME
Version: 2.30.2
Release: 4
Release: 5
Summary: The GNOME 2.x Display Manager
Source: %{name}-%{version}.tar.bz2
Source1: gdm.pamd
@ -87,6 +87,8 @@ Patch40: gdm-look-at-runlevel.patch
Patch41: gdm-add-missing-locale.patch
# PATCH-FIX-UPSTREAM gdm-xdmcp-uninitialized.patch captain.magnus@opensuse.org -- Fix an uninitialized variable. Patch taken from git upstream and can be removed with the next update
Patch42: gdm-xdmcp-uninitialized.patch
# PATCH-FIX-UPSTREAM gdm-greeter-no-local-user.patch bnc615044 bgo622069 vuntz@opensuse.org -- Fix greeter to work when there's no local user on the machine. Patch was committed upstream.
Patch43: gdm-greeter-no-local-user.patch
# PATCH-FIX-OPENSUSE gdm-selinux.patch -- Small changes to make it compile fine with SELinux
Patch60: gdm-selinux.patch
Url: http://www.gnome.org/
@ -166,6 +168,7 @@ gnome-patch-translation-prepare
%patch40 -p1
%patch41 -p1
%patch42 -p1
%patch43 -p1
%patch60
gnome-patch-translation-update