parent
03535e0fe3
commit
2e152e7208
@ -0,0 +1,95 @@
|
|||||||
|
From e39d4dacfab25ff4500cbd4dae89d1882d7491dd Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
|
Date: Wed, 21 Sep 2016 15:38:02 -0400
|
||||||
|
Subject: [PATCH] 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.
|
||||||
|
---
|
||||||
|
daemon/gdm-wayland-session.c | 7 +++++++
|
||||||
|
1 file changed, 7 insertions(+)
|
||||||
|
|
||||||
|
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
|
||||||
|
@@ -291,60 +291,67 @@ spawn_session (State *state,
|
||||||
|
if (!ret) {
|
||||||
|
g_debug ("could not parse session arguments: %s", error->message);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
launcher = g_subprocess_launcher_new (G_SUBPROCESS_FLAGS_NONE);
|
||||||
|
|
||||||
|
if (state->environment != NULL) {
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
for (i = 0; state->environment[i] != NULL; i++) {
|
||||||
|
g_auto(GStrv) environment_entry = NULL;
|
||||||
|
|
||||||
|
if (state->environment[i] == '\0') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
environment_entry = g_strsplit (state->environment[i], "=", 2);
|
||||||
|
|
||||||
|
if (environment_entry[0] == NULL || environment_entry[1] == NULL) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_subprocess_launcher_setenv (launcher, environment_entry[0], environment_entry[1], FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
g_strfreev (argv);
|
||||||
|
|
||||||
|
if (subprocess == NULL) {
|
||||||
|
g_debug ("could not start session: %s", error->message);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
state->session_subprocess = g_object_ref (subprocess);
|
||||||
|
|
||||||
|
g_subprocess_wait_async (state->session_subprocess,
|
||||||
|
cancellable,
|
||||||
|
(GAsyncReadyCallback)
|
||||||
|
on_session_finished,
|
||||||
|
state);
|
||||||
|
|
||||||
|
is_running = TRUE;
|
||||||
|
out:
|
||||||
|
g_clear_object (&subprocess);
|
||||||
|
return is_running;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
signal_subprocesses (State *state)
|
||||||
|
{
|
||||||
|
if (state->session_subprocess != NULL) {
|
||||||
|
g_subprocess_send_signal (state->session_subprocess, SIGTERM);
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.9.3
|
||||||
|
|
9
gdm.spec
9
gdm.spec
@ -10,7 +10,7 @@
|
|||||||
Summary: The GNOME Display Manager
|
Summary: The GNOME Display Manager
|
||||||
Name: gdm
|
Name: gdm
|
||||||
Version: 3.22.0
|
Version: 3.22.0
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: User Interface/X
|
Group: User Interface/X
|
||||||
@ -87,6 +87,8 @@ Provides: gdm-plugin-smartcard = %{epoch}:%{version}-%{release}
|
|||||||
Obsoletes: gdm-plugin-fingerprint < 1:3.2.1
|
Obsoletes: gdm-plugin-fingerprint < 1:3.2.1
|
||||||
Provides: gdm-plugin-fingerprint = %{epoch}:%{version}-%{release}
|
Provides: gdm-plugin-fingerprint = %{epoch}:%{version}-%{release}
|
||||||
|
|
||||||
|
Patch0: 0001-wayland-session-don-t-start-new-session-with-stale-s.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
GDM provides the graphical login screen, shown shortly after boot up,
|
GDM provides the graphical login screen, shown shortly after boot up,
|
||||||
log out, and when user-switching.
|
log out, and when user-switching.
|
||||||
@ -102,6 +104,7 @@ files needed to build custom greeters.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1 -b .fix-login-after-logout
|
||||||
|
|
||||||
autoreconf -i -f
|
autoreconf -i -f
|
||||||
intltoolize -f
|
intltoolize -f
|
||||||
@ -296,6 +299,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
|
|||||||
%{_libdir}/pkgconfig/gdm.pc
|
%{_libdir}/pkgconfig/gdm.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Sep 21 2016 Ray Strode <rstrode@redhat.com> - 3.22.0-2
|
||||||
|
- Fix log in after log out
|
||||||
|
Resolves: #1373169
|
||||||
|
|
||||||
* Tue Sep 20 2016 Kalev Lember <klember@redhat.com> - 1:3.22.0-1
|
* Tue Sep 20 2016 Kalev Lember <klember@redhat.com> - 1:3.22.0-1
|
||||||
- Update to 3.22.0
|
- Update to 3.22.0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user