Commit 0514ef59 authored by Jasper St. Pierre's avatar Jasper St. Pierre

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.
parent 64210ac9
......@@ -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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment