--- gdm-2.30.7/daemon/gdm-simple-slave.c-orig 2011-07-25 20:06:08.148214824 -0500
+++ gdm-2.30.7/daemon/gdm-simple-slave.c 2011-07-25 20:21:45.963098376 -0500
@@ -1382,7 +1382,31 @@ gdm_simple_slave_stop (GdmSlave *slave)
*/
username = gdm_session_direct_get_username (GDM_SIMPLE_SLAVE (slave)->priv->session);
if (username != NULL) {
+ char *linc;
+ char *out;
+ int status;
+ gboolean res;
+ GError *error;
+
gdm_slave_run_script (GDM_SLAVE (slave), GDMCONFDIR "/PostSession", username);
+ linc = g_strdup_printf ("/usr/bin/su \"%s\" -c \"/usr/bin/linc-cleanup-sockets\"", username);
+ error = NULL;
+ out = NULL;
+ res = g_spawn_command_line_sync (linc,
+ &out,
+ NULL,
+ &status,
+ &error);
+ if (res) {
+ g_debug ("Ran linc-cleanup-sockets: %s", out);
+ } else if (error != NULL) {
+ g_debug ("Problem running linc-cleanup-sockets: %s", error->message);
+ g_error_free (error);
+ } else {
+ g_debug ("Problem running linc-cleanup-sockets");
+ }
+ g_free (out);
+ g_free (linc);
}
g_free (username);