[gdm/wip/wayland: 1/10] flexiserver: don't look at pam service name to find login screen



commit 55dac29022488a8893875e39b2cfe7b50621ecae
Author: Ray Strode <rstrode redhat com>
Date:   Wed Sep 18 15:04:17 2013 -0400

    flexiserver: don't look at pam service name to find login screen
    
    It changed a long time ago and we neglected to update it here, and
    checking the class is good enough anyway.

 utils/gdmflexiserver.c |   20 +++-----------------
 1 files changed, 3 insertions(+), 17 deletions(-)
---
diff --git a/utils/gdmflexiserver.c b/utils/gdmflexiserver.c
index cfeb175..5a4d1ea 100644
--- a/utils/gdmflexiserver.c
+++ b/utils/gdmflexiserver.c
@@ -511,7 +511,6 @@ get_login_window_session_id_for_systemd (const char  *seat_id,
         gboolean   ret;
         int        res, i;
         char     **sessions;
-        char      *service_id;
         char      *service_class;
         char      *state;
 
@@ -528,7 +527,6 @@ get_login_window_session_id_for_systemd (const char  *seat_id,
         }
 
         for (i = 0; sessions[i]; i ++) {
-
                 res = sd_session_get_class (sessions[i], &service_class);
                 if (res < 0) {
                         g_debug ("failed to determine class of session %s: %s", sessions[i], strerror 
(-res));
@@ -556,22 +554,10 @@ get_login_window_session_id_for_systemd (const char  *seat_id,
                 }
                 free (state);
 
-                res = sd_session_get_service (sessions[i], &service_id);
-                if (res < 0) {
-                        g_debug ("failed to determine service of session %s: %s", sessions[i], strerror 
(-res));
-                        ret = FALSE;
-                        goto out;
-                }
-
-                if (strcmp (service_id, "gdm-welcome") == 0) {
-                        *session_id = g_strdup (sessions[i]);
-                        ret = TRUE;
-
-                        free (service_id);
-                        goto out;
-                }
+                *session_id = g_strdup (sessions[i]);
+                ret = TRUE;
+                break;
 
-                free (service_id);
         }
 
         *session_id = NULL;


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