[gdm] daemon: bail if unable to get seat from pid



commit 5ebfd52b13b17b5b4bbfe2c6750d79ed06d3b8be
Author: Ray Strode <rstrode redhat com>
Date:   Wed Feb 20 11:15:04 2013 -0500

    daemon: bail if unable to get seat from pid
    
    If we can't get the seat from the pid during reauthentication,
    then we need to bail right away, or we'll end up failing
    on the next call and overwriting the already written error.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=690926

 daemon/gdm-manager.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 550f09d..5888f35 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -749,6 +749,12 @@ gdm_manager_handle_open_reauthentication_channel (GdmDBusManager        *manager
 
         seat_id = get_seat_id_for_pid (connection, pid, &error);
 
+        if (seat_id == NULL) {
+                g_dbus_method_invocation_return_gerror (invocation, error);
+                g_error_free (error);
+                return TRUE;
+        }
+
         session_id = get_session_id_for_user_on_seat (connection, username, seat_id, &error);
         if (session_id == NULL) {
                 g_dbus_method_invocation_return_gerror (invocation, error);


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