summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorMarco Trevisan (TreviƱo) <mail@3v1n0.net>2021-07-09 18:09:08 +0200
committerMarco Trevisan <mail@3v1n0.net>2021-07-09 17:03:09 +0000
commitb0feff5fd2e2ac0bcadbac3e2e6e6d0e7cd40bb2 (patch)
tree268ea71865ed541a410f4e956267301ae152c66a /daemon
parenta97225675079fc349dadee65d843191fd4c05197 (diff)
downloadgdm-b0feff5fd2e2ac0bcadbac3e2e6e6d0e7cd40bb2.tar.gz
session: Only emit verification-complete on reauth or after session is opened
We're currently emitting verification-complete signal as soon as we got a positive authentication callback from the worker, however at this point we've not opened the session yet, and if that fails we'll end up in a scenario where gdm assumed that we're logging in, and so its greeter is shut down and never restarted on its VT until we manually switch back and forth from it. Meanwhile the session opening failure is never exposed to the user. So, do not emit verification-completed on logins, until we've opened the session. However, re-order the session-opened callback events so that we keep notifying verification-complete before than session-opened. This basically reverts commit c4292870 (again). Fixes: https://gitlab.gnome.org/GNOME/gdm/-/issues/712 (cherry picked from commit f65c681a469a2675d96012a77a563e50369b9e54)
Diffstat (limited to 'daemon')
-rw-r--r--daemon/gdm-session.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index ca7d98f1..5ef67fe5 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -319,18 +319,18 @@ on_establish_credentials_cb (GdmDBusWorker *proxy,
service_name = g_strdup (conversation->service_name);
if (worked) {
- if (self->user_verifier_interface != NULL) {
- gdm_dbus_user_verifier_emit_verification_complete (self->user_verifier_interface,
- service_name);
- g_signal_emit (self, signals[VERIFICATION_COMPLETE], 0, service_name);
- }
-
switch (self->verification_mode) {
case GDM_SESSION_VERIFICATION_MODE_LOGIN:
case GDM_SESSION_VERIFICATION_MODE_CHOOSER:
gdm_session_open_session (self, service_name);
break;
case GDM_SESSION_VERIFICATION_MODE_REAUTHENTICATE:
+ if (self->user_verifier_interface != NULL) {
+ gdm_dbus_user_verifier_emit_verification_complete (self->user_verifier_interface,
+ service_name);
+ g_signal_emit (self, signals[VERIFICATION_COMPLETE], 0, service_name);
+ }
+ break;
default:
break;
}
@@ -863,17 +863,17 @@ on_opened (GdmDBusWorker *worker,
conversation->session_id = g_strdup (session_id);
- if (self->greeter_interface != NULL) {
- gdm_dbus_greeter_emit_session_opened (self->greeter_interface,
- service_name);
- }
-
if (self->user_verifier_interface != NULL) {
gdm_dbus_user_verifier_emit_verification_complete (self->user_verifier_interface,
service_name);
g_signal_emit (self, signals[VERIFICATION_COMPLETE], 0, service_name);
}
+ if (self->greeter_interface != NULL) {
+ gdm_dbus_greeter_emit_session_opened (self->greeter_interface,
+ service_name);
+ }
+
g_debug ("GdmSession: Emitting 'session-opened' signal");
g_signal_emit (self, signals[SESSION_OPENED], 0, service_name, session_id);
} else {