|
|
400dab |
From b773eb570d8c5f9d2222ee39eecbc6a622d108d8 Mon Sep 17 00:00:00 2001
|
|
|
400dab |
From: Ray Strode <rstrode@redhat.com>
|
|
|
400dab |
Date: Thu, 30 Aug 2018 16:04:41 -0400
|
|
|
400dab |
Subject: [PATCH 26/51] manager: don't set ran_once after running initial-setup
|
|
|
400dab |
|
|
|
400dab |
GdmManager tracks whether or not the user session has ran
|
|
|
400dab |
once, so it won't autologin a user again after logout.
|
|
|
400dab |
|
|
|
400dab |
Unfortunately the initial-setup session was counting toward the
|
|
|
400dab |
ran_once count preventing initial-setup from logging the user
|
|
|
400dab |
in afterward.
|
|
|
400dab |
|
|
|
400dab |
This commit prevents ran_once from getting set in that case.
|
|
|
400dab |
---
|
|
|
400dab |
daemon/gdm-manager.c | 4 +++-
|
|
|
400dab |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
400dab |
|
|
|
400dab |
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
|
|
|
400dab |
index 367a731cc..c8197a043 100644
|
|
|
400dab |
--- a/daemon/gdm-manager.c
|
|
|
400dab |
+++ b/daemon/gdm-manager.c
|
|
|
400dab |
@@ -1519,105 +1519,107 @@ set_up_session (GdmManager *manager,
|
|
|
400dab |
operation->username = username;
|
|
|
400dab |
|
|
|
400dab |
g_signal_connect (user,
|
|
|
400dab |
"notify::is-loaded",
|
|
|
400dab |
G_CALLBACK (on_user_is_loaded_changed),
|
|
|
400dab |
operation);
|
|
|
400dab |
}
|
|
|
400dab |
}
|
|
|
400dab |
|
|
|
400dab |
static void
|
|
|
400dab |
greeter_display_started (GdmManager *manager,
|
|
|
400dab |
GdmDisplay *display)
|
|
|
400dab |
{
|
|
|
400dab |
if (manager->priv->ran_once) {
|
|
|
400dab |
return;
|
|
|
400dab |
}
|
|
|
400dab |
|
|
|
400dab |
maybe_start_pending_initial_login (manager, display);
|
|
|
400dab |
}
|
|
|
400dab |
|
|
|
400dab |
static void
|
|
|
400dab |
on_display_status_changed (GdmDisplay *display,
|
|
|
400dab |
GParamSpec *arg1,
|
|
|
400dab |
GdmManager *manager)
|
|
|
400dab |
{
|
|
|
400dab |
int status;
|
|
|
400dab |
int display_number = -1;
|
|
|
400dab |
char *session_type = NULL;
|
|
|
400dab |
#ifdef WITH_PLYMOUTH
|
|
|
400dab |
gboolean display_is_local = FALSE;
|
|
|
400dab |
+ gboolean doing_initial_setup = FALSE;
|
|
|
400dab |
gboolean quit_plymouth = FALSE;
|
|
|
400dab |
|
|
|
400dab |
g_object_get (display,
|
|
|
400dab |
"is-local", &display_is_local,
|
|
|
400dab |
+ "doing-initial-setup", &doing_initial_setup,
|
|
|
400dab |
NULL);
|
|
|
400dab |
quit_plymouth = display_is_local && manager->priv->plymouth_is_running;
|
|
|
400dab |
#endif
|
|
|
400dab |
|
|
|
400dab |
g_object_get (display,
|
|
|
400dab |
"x11-display-number", &display_number,
|
|
|
400dab |
"session-type", &session_type,
|
|
|
400dab |
NULL);
|
|
|
400dab |
|
|
|
400dab |
status = gdm_display_get_status (display);
|
|
|
400dab |
|
|
|
400dab |
switch (status) {
|
|
|
400dab |
case GDM_DISPLAY_PREPARED:
|
|
|
400dab |
case GDM_DISPLAY_MANAGED:
|
|
|
400dab |
if ((display_number == -1 && status == GDM_DISPLAY_PREPARED) ||
|
|
|
400dab |
(display_number != -1 && status == GDM_DISPLAY_MANAGED)) {
|
|
|
400dab |
char *session_class;
|
|
|
400dab |
|
|
|
400dab |
g_object_get (display,
|
|
|
400dab |
"session-class", &session_class,
|
|
|
400dab |
NULL);
|
|
|
400dab |
if (g_strcmp0 (session_class, "greeter") == 0)
|
|
|
400dab |
set_up_session (manager, display);
|
|
|
400dab |
g_free (session_class);
|
|
|
400dab |
}
|
|
|
400dab |
|
|
|
400dab |
if (status == GDM_DISPLAY_MANAGED) {
|
|
|
400dab |
greeter_display_started (manager, display);
|
|
|
400dab |
}
|
|
|
400dab |
break;
|
|
|
400dab |
case GDM_DISPLAY_FAILED:
|
|
|
400dab |
case GDM_DISPLAY_UNMANAGED:
|
|
|
400dab |
case GDM_DISPLAY_FINISHED:
|
|
|
400dab |
#ifdef WITH_PLYMOUTH
|
|
|
400dab |
if (quit_plymouth) {
|
|
|
400dab |
plymouth_quit_without_transition ();
|
|
|
400dab |
manager->priv->plymouth_is_running = FALSE;
|
|
|
400dab |
}
|
|
|
400dab |
#endif
|
|
|
400dab |
|
|
|
400dab |
- if (status == GDM_DISPLAY_FINISHED || g_strcmp0 (session_type, "x11") == 0) {
|
|
|
400dab |
+ if (!doing_initial_setup && (status == GDM_DISPLAY_FINISHED || g_strcmp0 (session_type, "x11") == 0)) {
|
|
|
400dab |
manager->priv->ran_once = TRUE;
|
|
|
400dab |
}
|
|
|
400dab |
maybe_start_pending_initial_login (manager, display);
|
|
|
400dab |
break;
|
|
|
400dab |
default:
|
|
|
400dab |
break;
|
|
|
400dab |
}
|
|
|
400dab |
|
|
|
400dab |
}
|
|
|
400dab |
|
|
|
400dab |
static void
|
|
|
400dab |
on_display_removed (GdmDisplayStore *display_store,
|
|
|
400dab |
GdmDisplay *display,
|
|
|
400dab |
GdmManager *manager)
|
|
|
400dab |
{
|
|
|
400dab |
char *id;
|
|
|
400dab |
|
|
|
400dab |
gdm_display_get_id (display, &id, NULL);
|
|
|
400dab |
g_dbus_object_manager_server_unexport (manager->priv->object_manager, id);
|
|
|
400dab |
g_free (id);
|
|
|
400dab |
|
|
|
400dab |
g_signal_handlers_disconnect_by_func (display, G_CALLBACK (on_display_status_changed), manager);
|
|
|
400dab |
|
|
|
400dab |
g_signal_emit (manager, signals[DISPLAY_REMOVED], 0, display);
|
|
|
400dab |
}
|
|
|
400dab |
|
|
|
400dab |
static void
|
|
|
400dab |
destroy_start_user_session_operation (StartUserSessionOperation *operation)
|
|
|
400dab |
{
|
|
|
400dab |
g_object_set_data (G_OBJECT (operation->session),
|
|
|
400dab |
--
|
|
|
400dab |
2.27.0
|
|
|
400dab |
|