From 1dc72abeb4419027f649d67fd95b302c8233335d Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 31 Mar 2017 14:59:05 -0400 Subject: [PATCH 09/13] xdmcp-display-factory: explicitly stop greeter session on disconnect If the client disconnects, we should kill off the necessary processes. --- daemon/gdm-xdmcp-display-factory.c | 1 + 1 file changed, 1 insertion(+) diff --git a/daemon/gdm-xdmcp-display-factory.c b/daemon/gdm-xdmcp-display-factory.c index c5f7ddb4..3a8506ce 100644 --- a/daemon/gdm-xdmcp-display-factory.c +++ b/daemon/gdm-xdmcp-display-factory.c @@ -2029,60 +2029,61 @@ on_hostname_selected (GdmXdmcpChooserDisplay *display, g_warning ("Unable to get address: %s", gai_strerror (gaierr)); g_free (xdmcp_port); return; } g_free (xdmcp_port); /* just take the first one */ ai = ai_list; if (ai != NULL) { char *ip; ic->chosen_address = gdm_address_new_from_sockaddr (ai->ai_addr, ai->ai_addrlen); ip = NULL; gdm_address_get_numeric_info (ic->chosen_address, &ip, NULL); g_debug ("GdmXdmcpDisplayFactory: hostname resolves to %s", ip ? ip : "(null)"); g_free (ip); } freeaddrinfo (ai_list); } static void on_client_disconnected (GdmSession *session, GdmDisplay *display) { if (gdm_display_get_status (display) != GDM_DISPLAY_MANAGED) return; + gdm_display_stop_greeter_session (display); gdm_display_unmanage (display); gdm_display_finish (display); } static void on_display_status_changed (GdmDisplay *display, GParamSpec *arg1, GdmXdmcpDisplayFactory *factory) { int status; GdmDisplayStore *store; GdmLaunchEnvironment *launch_environment; GdmSession *session; GdmAddress *address; gint32 session_number; int display_number; store = gdm_display_factory_get_display_store (GDM_DISPLAY_FACTORY (factory)); launch_environment = NULL; g_object_get (display, "launch-environment", &launch_environment, NULL); session = NULL; if (launch_environment != NULL) { session = gdm_launch_environment_get_session (launch_environment); } status = gdm_display_get_status (display); g_debug ("GdmXdmcpDisplayFactory: xdmcp display status changed: %d", status); -- 2.12.0