[gdm] slave: Don't set envvars in the slave



commit 0514ef59f1179486680c7aba171d661a88964de4
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Feb 14 14:34:42 2014 -0500

    slave: Don't set envvars in the slave
    
    All the APIs we use take things explicitly, so we don't need these
    envvars. At the same time, lose the signal manipulation. The goal
    here is to integrate the slave back into the daemon process.

 daemon/gdm-slave.c |   13 -------------
 1 files changed, 0 insertions(+), 13 deletions(-)
---
diff --git a/daemon/gdm-slave.c b/daemon/gdm-slave.c
index fa7bfe0..cd2b301 100644
--- a/daemon/gdm-slave.c
+++ b/daemon/gdm-slave.c
@@ -31,7 +31,6 @@
 #include <errno.h>
 #include <pwd.h>
 #include <grp.h>
-#include <signal.h>
 
 #include <glib.h>
 #include <glib/gstdio.h>
@@ -484,8 +483,6 @@ gboolean
 gdm_slave_connect_to_x11_display (GdmSlave *slave)
 {
         gboolean ret;
-        sigset_t mask;
-        sigset_t omask;
 
         ret = FALSE;
 
@@ -494,13 +491,6 @@ gdm_slave_connect_to_x11_display (GdmSlave *slave)
 
         g_debug ("GdmSlave: Server is ready - opening display %s", slave->priv->display_name);
 
-        g_setenv ("DISPLAY", slave->priv->display_name, TRUE);
-        g_setenv ("XAUTHORITY", slave->priv->display_x11_authority_file, TRUE);
-
-        sigemptyset (&mask);
-        sigaddset (&mask, SIGCHLD);
-        sigprocmask (SIG_BLOCK, &mask, &omask);
-
         /* Give slave access to the display independent of current hostname */
         if (slave->priv->display_x11_cookie != NULL) {
                 XSetAuthorization ("MIT-MAGIC-COOKIE-1",
@@ -512,9 +502,6 @@ gdm_slave_connect_to_x11_display (GdmSlave *slave)
 
         slave->priv->server_display = XOpenDisplay (slave->priv->display_name);
 
-        sigprocmask (SIG_SETMASK, &omask, NULL);
-
-
         if (slave->priv->server_display == NULL) {
                 g_warning ("Unable to connect to display %s", slave->priv->display_name);
                 ret = FALSE;


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