[gdm/gnome-2-32] Fix bug #621581, so that PostSession is called when GDM shuts down or when the main GDM daemon is ki



commit 6e1858d3c4a51373da425a5240acc452397ea02b
Author: Brian Cameron <Brian Cameron sun com>
Date:   Fri Dec 17 16:34:30 2010 -0600

    Fix bug #621581, so that PostSession is called when GDM shuts down or when the
    main GDM daemon is killed.
    (cherry picked from commit 42e04f909b1eadc85793417c18f1aa9cfa143271)

 daemon/gdm-simple-slave.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gdm-simple-slave.c b/daemon/gdm-simple-slave.c
index 51573d9..4924947 100644
--- a/daemon/gdm-simple-slave.c
+++ b/daemon/gdm-simple-slave.c
@@ -1318,6 +1318,17 @@ gdm_simple_slave_stop (GdmSlave *slave)
         }
 
         if (GDM_SIMPLE_SLAVE (slave)->priv->session != NULL) {
+                char *username;
+
+                /* Run the PostSession script. gdmslave suspends until script
+                 * has terminated
+                 */
+                username = gdm_session_direct_get_username (GDM_SIMPLE_SLAVE (slave)->priv->session);
+                if (username != NULL) {
+                        gdm_slave_run_script (GDM_SLAVE (slave), GDMCONFDIR "/PostSession", username);
+                }
+                g_free (username);
+
 #ifdef  HAVE_LOGINDEVPERM
                 gdm_simple_slave_revoke_console_permissions (GDM_SIMPLE_SLAVE (slave));
 #endif



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