[gdm] slave: fix user switching for consolekit users



commit 5ac221b9bca2c8bee747fbe6742466e1f473bfa8
Author: Ray Strode <rstrode redhat com>
Date:   Fri Sep 21 18:58:01 2012 -0400

    slave: fix user switching for consolekit users
    
    ConsoleKit has code to try to prevent switching to the same session
    that the slave is running on.  That code was important when we created
    a new throw-away session and slave as part of the user switching process.
    
    These days we connect to the already running slave instead of using a
    new one, and that vestigal code gets in the way, breaking user
    switching.
    
    This commit removes that harmful code.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=684594

 daemon/gdm-slave.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/daemon/gdm-slave.c b/daemon/gdm-slave.c
index 51162f3..7bbe831 100644
--- a/daemon/gdm-slave.c
+++ b/daemon/gdm-slave.c
@@ -1214,9 +1214,8 @@ x11_session_is_on_seat (GdmSlave        *slave,
         g_variant_get (reply, "(s)", &x11_display);
         g_variant_unref (reply);
 
-        /* don't try to switch to our own session */
-        if (x11_display == NULL || x11_display[0] == '\0'
-            || strcmp (slave->priv->display_name, x11_display) == 0) {
+        /* ignore tty sessions */
+        if (x11_display == NULL || x11_display[0] == '\0') {
                 goto out;
         }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]