summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2017-09-11 16:44:15 -0400
committerRay Strode <rstrode@redhat.com>2017-09-12 10:16:35 -0400
commit16f646db418aff5b22984b1ea22f05d6e70e072d (patch)
treeca8b13c8afe39f565b7463af7713b8735985fbee
parent1463e06afa57210274025ea907a8a528e08a16bb (diff)
downloadgdm-16f646db418aff5b22984b1ea22f05d6e70e072d.tar.gz
manager: don't allow autologin from transient displays
In theory, we're only only supposed to allow autologin the first time a session is run, but we only count a session run, once it's finished. This means that if a user creates a transient session to user switch, before they've logged out the first time at boot up, that transient session will begin autologin as well (which actually gets treated as an auto unlock). This commit makes sure autologin is only ever run on the initial display. https://bugzilla.gnome.org/show_bug.cgi?id=783779
-rw-r--r--daemon/gdm-manager.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index d080b308..6ef75bd6 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -1573,10 +1573,13 @@ set_up_session (GdmManager *manager,
ActUserManager *user_manager;
ActUser *user;
gboolean loaded;
+ gboolean is_initial_display = FALSE;
gboolean autologin_enabled = FALSE;
char *username = NULL;
- if (!manager->priv->ran_once && display_is_on_seat0 (display))
+ g_object_get (G_OBJECT (display), "is-initial", &is_initial_display, NULL);
+
+ if (!manager->priv->ran_once && is_initial_display)
autologin_enabled = get_automatic_login_details (manager, &username);
if (!autologin_enabled) {