[gdm] wayland-session: don't start new session with stale session env vars
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] wayland-session: don't start new session with stale session env vars
- Date: Wed, 21 Sep 2016 19:58:27 +0000 (UTC)
commit 3d2aa559a4a7decc8b6568de6b41cf9f94170613
Author: Ray Strode <rstrode redhat com>
Date: Wed Sep 21 15:38:02 2016 -0400
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
daemon/gdm-wayland-session.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gdm-wayland-session.c b/daemon/gdm-wayland-session.c
index 503c398..8b0e56a 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]