Accepting request 82624 from GNOME:Factory
Fix autologin OBS-URL: https://build.opensuse.org/request/show/82624 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdm?expand=0&rev=125
This commit is contained in:
commit
d3049134b5
103
gdm-fix-autologin.patch
Normal file
103
gdm-fix-autologin.patch
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
From aad28c8bce222e9d5461c3b35dbf5f9eb4a86e82 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
|
Date: Tue, 13 Sep 2011 14:26:59 +0000
|
||||||
|
Subject: daemon: fix autologin
|
||||||
|
|
||||||
|
In commit 6849f6f3b8a199bed5427b8d6f1e2dedbe035d6c
|
||||||
|
the code was changed to stop the greeter asynchronously
|
||||||
|
and start the session following its completion.
|
||||||
|
|
||||||
|
Autologin doesn't have a greeter though, so this broke
|
||||||
|
it.
|
||||||
|
|
||||||
|
This commit fixes autologin.
|
||||||
|
|
||||||
|
https://bugzilla.gnome.org/show_bug.cgi?id=658899
|
||||||
|
---
|
||||||
|
diff --git a/daemon/gdm-simple-slave.c b/daemon/gdm-simple-slave.c
|
||||||
|
index 2f38bf6..ab69194 100644
|
||||||
|
--- a/daemon/gdm-simple-slave.c
|
||||||
|
+++ b/daemon/gdm-simple-slave.c
|
||||||
|
@@ -108,6 +108,7 @@ G_DEFINE_TYPE (GdmSimpleSlave, gdm_simple_slave, GDM_TYPE_SLAVE)
|
||||||
|
static void create_new_session (GdmSimpleSlave *slave);
|
||||||
|
static void destroy_session (GdmSimpleSlave *slave);
|
||||||
|
static void start_greeter (GdmSimpleSlave *slave);
|
||||||
|
+static void start_session (GdmSimpleSlave *slave);
|
||||||
|
static void queue_start_session (GdmSimpleSlave *slave,
|
||||||
|
const char *service_name);
|
||||||
|
|
||||||
|
@@ -449,6 +450,29 @@ stop_greeter (GdmSimpleSlave *slave)
|
||||||
|
gdm_welcome_session_stop (GDM_WELCOME_SESSION (slave->priv->greeter));
|
||||||
|
}
|
||||||
|
|
||||||
|
+static void
|
||||||
|
+start_session (GdmSimpleSlave *slave)
|
||||||
|
+{
|
||||||
|
+ char *auth_file;
|
||||||
|
+ auth_file = NULL;
|
||||||
|
+ add_user_authorization (slave, &auth_file);
|
||||||
|
+
|
||||||
|
+ g_assert (auth_file != NULL);
|
||||||
|
+
|
||||||
|
+ g_object_set (slave->priv->session,
|
||||||
|
+ "user-x11-authority-file", auth_file,
|
||||||
|
+ NULL);
|
||||||
|
+
|
||||||
|
+ g_free (auth_file);
|
||||||
|
+
|
||||||
|
+ gdm_session_start_session (GDM_SESSION (slave->priv->session),
|
||||||
|
+ slave->priv->start_session_service_name);
|
||||||
|
+
|
||||||
|
+ slave->priv->start_session_id = 0;
|
||||||
|
+ g_free (slave->priv->start_session_service_name);
|
||||||
|
+ slave->priv->start_session_service_name = NULL;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static gboolean
|
||||||
|
start_session_timeout (GdmSimpleSlave *slave)
|
||||||
|
{
|
||||||
|
@@ -472,8 +496,13 @@ start_session_timeout (GdmSimpleSlave *slave)
|
||||||
|
g_free (slave->priv->start_session_service_name);
|
||||||
|
slave->priv->start_session_service_name = NULL;
|
||||||
|
} else {
|
||||||
|
- /* Session actually gets started from on_greeter_session_stopped */
|
||||||
|
- stop_greeter (slave);
|
||||||
|
+ if (slave->priv->greeter == NULL) {
|
||||||
|
+ /* auto login */
|
||||||
|
+ start_session (slave);
|
||||||
|
+ } else {
|
||||||
|
+ /* Session actually gets started from on_greeter_session_stop */
|
||||||
|
+ stop_greeter (slave);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
@@ -972,25 +1001,7 @@ on_greeter_session_stop (GdmGreeterSession *greeter,
|
||||||
|
gdm_slave_stopped (GDM_SLAVE (slave));
|
||||||
|
} else {
|
||||||
|
gdm_greeter_server_stop (slave->priv->greeter_server);
|
||||||
|
-
|
||||||
|
- char *auth_file;
|
||||||
|
- auth_file = NULL;
|
||||||
|
- add_user_authorization (slave, &auth_file);
|
||||||
|
-
|
||||||
|
- g_assert (auth_file != NULL);
|
||||||
|
-
|
||||||
|
- g_object_set (slave->priv->session,
|
||||||
|
- "user-x11-authority-file", auth_file,
|
||||||
|
- NULL);
|
||||||
|
-
|
||||||
|
- g_free (auth_file);
|
||||||
|
-
|
||||||
|
- gdm_session_start_session (GDM_SESSION (slave->priv->session),
|
||||||
|
- slave->priv->start_session_service_name);
|
||||||
|
-
|
||||||
|
- slave->priv->start_session_id = 0;
|
||||||
|
- g_free (slave->priv->start_session_service_name);
|
||||||
|
- slave->priv->start_session_service_name = NULL;
|
||||||
|
+ start_session (slave);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_object_unref (slave->priv->greeter);
|
||||||
|
--
|
||||||
|
cgit v0.9.0.2
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 16 13:29:15 UTC 2011 - vuntz@opensuse.org
|
||||||
|
|
||||||
|
- Add gdm-fix-autologin.patch: fix autologin, taken from git.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Sep 10 05:48:04 UTC 2011 - vuntz@opensuse.org
|
Sat Sep 10 05:48:04 UTC 2011 - vuntz@opensuse.org
|
||||||
|
|
||||||
|
4
gdm.spec
4
gdm.spec
@ -67,6 +67,8 @@ Patch34: gdm-default-wm.patch
|
|||||||
Patch35: gdm-xauthlocalhostname.patch
|
Patch35: gdm-xauthlocalhostname.patch
|
||||||
# PATCH-FIX-UPSTREAM gdm-look-at-runlevel.patch bnc540482 bgo599180 vuntz@opensuse.org -- Look at the current runlevel before managing the display again, so we don't do this when shutting down or rebooting
|
# PATCH-FIX-UPSTREAM gdm-look-at-runlevel.patch bnc540482 bgo599180 vuntz@opensuse.org -- Look at the current runlevel before managing the display again, so we don't do this when shutting down or rebooting
|
||||||
Patch40: gdm-look-at-runlevel.patch
|
Patch40: gdm-look-at-runlevel.patch
|
||||||
|
# PATCH-FIX-UPSTREAM gdm-fix-autologin.patch vuntz@opensuse.org -- Fix autologin, taken from git
|
||||||
|
Patch41: gdm-fix-autologin.patch
|
||||||
# PATCH-FIX-OPENSUSE gdm-selinux.patch -- Small changes to make it compile fine with SELinux
|
# PATCH-FIX-OPENSUSE gdm-selinux.patch -- Small changes to make it compile fine with SELinux
|
||||||
Patch60: gdm-selinux.patch
|
Patch60: gdm-selinux.patch
|
||||||
BuildRequires: check-devel
|
BuildRequires: check-devel
|
||||||
@ -155,7 +157,6 @@ providing graphical log-ins and managing local and remote displays.
|
|||||||
|
|
||||||
%package simple-greeter-extensions
|
%package simple-greeter-extensions
|
||||||
|
|
||||||
|
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Summary: GDM Simple Greeter Extensions -- Fingerprint and Smartcard Support
|
Summary: GDM Simple Greeter Extensions -- Fingerprint and Smartcard Support
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
@ -235,6 +236,7 @@ translation-update-upstream
|
|||||||
%patch34 -p1
|
%patch34 -p1
|
||||||
%patch35 -p0
|
%patch35 -p0
|
||||||
%patch40 -p1
|
%patch40 -p1
|
||||||
|
%patch41 -p1
|
||||||
%patch60
|
%patch60
|
||||||
#gnome-patch-translation-update
|
#gnome-patch-translation-update
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user