[gdm] manager: don't try to activate session if session not on seat



commit 5395600e428ce93d6c54fe95404c631fbe3b3538
Author: Ray Strode <rstrode redhat com>
Date:   Mon Aug 1 11:25:47 2016 -0400

    manager: don't try to activate session if session not on seat
    
    If a session is not associated with a seat (because it's remote),
    then we shouldn't try to activate the session.  Activating sessions,
    really only means anything on seat0 (where it means to change
    the active VT).
    
    This prevents premature failure before unlock on XDMCP.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=779500

 daemon/gdm-manager.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 0cd5a91..35a7a0f 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -618,10 +618,12 @@ switch_to_compatible_user_session (GdmManager *manager,
 
         if (existing_session != NULL) {
                 ssid_to_activate = gdm_session_get_session_id (existing_session);
-                res = activate_session_id (manager, seat_id, ssid_to_activate);
-                if (! res) {
-                        g_debug ("GdmManager: unable to activate session: %s", ssid_to_activate);
-                        goto out;
+                if (seat_id != NULL) {
+                        res = activate_session_id (manager, seat_id, ssid_to_activate);
+                        if (! res) {
+                                g_debug ("GdmManager: unable to activate session: %s", ssid_to_activate);
+                                goto out;
+                        }
                 }
 
                 res = session_unlock (manager, ssid_to_activate);


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