summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2016-09-21 15:38:02 -0400
committerRay Strode <rstrode@redhat.com>2016-09-21 15:54:52 -0400
commit3d2aa559a4a7decc8b6568de6b41cf9f94170613 (patch)
tree1a42b777e89e655e05d265a4724dba44c5c6333a
parent2bfe227e1f0eb14f42d9137ddeb4337e278121d4 (diff)
downloadgdm-3d2aa559a4a7decc8b6568de6b41cf9f94170613.tar.gz
wayland-session: don't start new session with stale session env vars
commit 448134d3cdbc54e5359ea33d387993b0defdaefa changed gdm to import the session from systemd --user. Unfortunately, it broke log in after log out. The problem is, certain session specific environment variables from the previous session were getting leaked into the new session. This commit wipes the ones causing the most problems on the GDM side, but gnome-session should also probably purge them from the systemd --user environment when it exits. https://bugzilla.gnome.org/show_bug.cgi?id=771786
-rw-r--r--daemon/gdm-wayland-session.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/daemon/gdm-wayland-session.c b/daemon/gdm-wayland-session.c
index 503c398a..8b0e56aa 100644
--- a/daemon/gdm-wayland-session.c
+++ b/daemon/gdm-wayland-session.c
@@ -318,6 +318,13 @@ spawn_session (State *state,
if (state->bus_address != NULL) {
g_subprocess_launcher_setenv (launcher, "DBUS_SESSION_BUS_ADDRESS", state->bus_address, TRUE);
}
+
+ /* Don't allow session specific environment variables from earlier sessions to leak through */
+ g_subprocess_launcher_unsetenv (launcher, "DISPLAY");
+ g_subprocess_launcher_unsetenv (launcher, "XAUTHORITY");
+ g_subprocess_launcher_unsetenv (launcher, "WAYLAND_DISPLAY");
+ g_subprocess_launcher_unsetenv (launcher, "WAYLAND_SOCKET");
+
subprocess = g_subprocess_launcher_spawnv (launcher,
(const char * const *) argv,
&error);