diff options
author | Ray Strode <rstrode@redhat.com> | 2012-11-30 12:43:54 -0500 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2012-11-30 12:45:56 -0500 |
commit | 6c6e513923eb41ac7eed50faa24a2237ba6b4aa8 (patch) | |
tree | fddaf41fea150a0e5fe6e3f87069983fc7c45db9 | |
parent | 4596c9579d9d70d28d2120cc3770782d84a4b671 (diff) | |
download | gdm-6c6e513923eb41ac7eed50faa24a2237ba6b4aa8.tar.gz |
slave: cancel start session request if slave gets stopped
If the slave gets stopped right before we start the user's session,
then we'll have a queued start session in flight, and variable set
to the session name to be started duplicated. This gunks up the
stopping logic and leads to infinite recursion.
This commit cancels the start session operation to correct the bug.
https://bugzilla.gnome.org/show_bug.cgi?id=689367
-rw-r--r-- | daemon/gdm-simple-slave.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/daemon/gdm-simple-slave.c b/daemon/gdm-simple-slave.c index 412f5153..1beebe97 100644 --- a/daemon/gdm-simple-slave.c +++ b/daemon/gdm-simple-slave.c @@ -1471,6 +1471,14 @@ gdm_simple_slave_stop (GdmSlave *slave) self->priv->greeter_environment = NULL; } + if (self->priv->start_session_id > 0) { + g_source_remove (self->priv->start_session_id); + self->priv->start_session_id = 0; + } + + g_clear_pointer (&self->priv->start_session_service_name, + (GDestroyNotify) g_free); + if (self->priv->session_is_running) { char *username; |