From 6c7efa39b013f98a61d328acea40c04df55052a6 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Oct 07 2019 10:19:18 +0000 Subject: Update to 3.34.1 --- diff --git a/.gitignore b/.gitignore index 7db21bc..4c65157 100644 --- a/.gitignore +++ b/.gitignore @@ -126,3 +126,4 @@ gdm-2.30.2.tar.bz2 /gdm-3.33.90.tar.xz /gdm-3.33.92.tar.xz /gdm-3.34.0.tar.xz +/gdm-3.34.1.tar.xz diff --git a/0001-gdm-session-worker-Drop-login_vt-assuming-it-is-GDM_.patch b/0001-gdm-session-worker-Drop-login_vt-assuming-it-is-GDM_.patch deleted file mode 100644 index 4fbdb1f..0000000 --- a/0001-gdm-session-worker-Drop-login_vt-assuming-it-is-GDM_.patch +++ /dev/null @@ -1,141 +0,0 @@ -From fd6736eb357100ce121762c386592e7703db71e0 Mon Sep 17 00:00:00 2001 -From: Benjamin Berg -Date: Wed, 25 Sep 2019 14:51:40 +0200 -Subject: [PATCH] gdm-session-worker: Drop login_vt assuming it is - GDM_INITIAL_VT - -When a session ends, its "session worker" is closed. Since -3e8220921bb608afd06ed677104fd2244b901a28 (3.33.4), we uninitialise PAM -when this happens. As part of this procedure, we jump back to the login -screen, if the screen being killed is not itself the login screen. - -This has broken fast user switching. It goes like this - this -explanation is a bit complicated, bear with us: - -We want to jump back to the login screen when a normal user session -ends, so that people can log in again. We do not want to do this when a -login screen itself ends. When session workers start up, they query for -the *currently active VT* and save this in `login_vt`. Then later on, we -check if our session ID is the same as `login_vt`, and jump to -`login_vt` if they are different - this means that it was a user session -not a login session. Querying the currently active VT is fine for the -first greeter, but when initiating a user switch it's wrong as this -gives the user VT. - -GDM greeters are killed once they have spawned a session. They are -associated with a logind session, and therefore a PAM session. There are -some actions performed when unregistering PAM sessions, including the -previously mentioned VT jump. Before -3e8220921bb608afd06ed677104fd2244b901a28 we only uninitialised PAM when -the session itself exited so the bug was masked, but now (since this -commit), if the login screen's *worker* exits first - as happens in the -normal case when GDM kills it - we also do this uninitialisation. Since -we falsely recorded the login screen as the first user's VT, this means -that checking `login_vt != session_vt` returns `TRUE` and we jump back -to the previous user's session immediately after logging into the new -session: fast user switching is broken. - -Since the work on shutting down the GDM session has been finished, we -can assume that the login_vt is always on GDM_INITIAL_VT (see -example c71bc5d6c3bc2ec448b5c72ce9a811d9c0c7905e -"local-display-factory: Remove initial VT is in use check" and -39fb4ff64e6a0653e70a3bfab31da47b49227d59 "manager: don't run autologin -display on tty1"). So simply replace all usages of login_vt with -GDM_INITIAL_VT to solve the above problem. - -Note that in the case where ENABLE_USER_DISPLAY_SERVER is not enabled, -the login_vt is always the same as the session_vt. We can simply remove -the VT switching magic there and everything should be working as -expected. - -This is a simpler version of the patch by Iain Lane , -taking into account that we can make the assumption about the login_vt. - -Closes #515 ---- - daemon/gdm-session-worker.c | 43 +++++++------------------------------ - 1 file changed, 8 insertions(+), 35 deletions(-) - -diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c -index 0e854158..4f9083c3 100644 ---- a/daemon/gdm-session-worker.c -+++ b/daemon/gdm-session-worker.c -@@ -146,7 +146,6 @@ struct GdmSessionWorkerPrivate - char **extensions; - - int cred_flags; -- int login_vt; - int session_vt; - int session_tty_fd; - -@@ -1052,13 +1051,15 @@ gdm_session_worker_uninitialize_pam (GdmSessionWorker *worker, - - gdm_session_worker_stop_auditor (worker); - -+#ifdef ENABLE_USER_DISPLAY_SERVER - if (g_strcmp0 (worker->priv->display_seat_id, "seat0") == 0) { -- if (worker->priv->login_vt != worker->priv->session_vt) { -- jump_to_vt (worker, worker->priv->login_vt); -+ /* Switch to the login VT if we are not the login screen. */ -+ if (worker->priv->session_vt != GDM_INITIAL_VT) { -+ jump_to_vt (worker, GDM_INITIAL_VT); - } - } -+#endif - -- worker->priv->login_vt = 0; - worker->priv->session_vt = 0; - - g_debug ("GdmSessionWorker: state NONE"); -@@ -1107,32 +1108,6 @@ _get_xauth_for_pam (const char *x11_authority_file) - } - #endif - --static gboolean --ensure_login_vt (GdmSessionWorker *worker) --{ -- int fd; -- struct vt_stat vt_state = { 0 }; -- gboolean got_login_vt = FALSE; -- -- fd = open ("/dev/tty0", O_RDWR | O_NOCTTY); -- -- if (fd < 0) { -- g_debug ("GdmSessionWorker: couldn't open VT master: %m"); -- return FALSE; -- } -- -- if (ioctl (fd, VT_GETSTATE, &vt_state) < 0) { -- g_debug ("GdmSessionWorker: couldn't get current VT: %m"); -- goto out; -- } -- -- worker->priv->login_vt = vt_state.v_active; -- got_login_vt = TRUE; --out: -- close (fd); -- return got_login_vt; --} -- - static gboolean - gdm_session_worker_initialize_pam (GdmSessionWorker *worker, - const char *service, -@@ -1227,12 +1202,10 @@ gdm_session_worker_initialize_pam (GdmSessionWorker *worker, - g_debug ("GdmSessionWorker: state SETUP_COMPLETE"); - gdm_session_worker_set_state (worker, GDM_SESSION_WORKER_STATE_SETUP_COMPLETE); - -- /* Temporarily set PAM_TTY with the currently active VT (login screen) -+ /* Temporarily set PAM_TTY with the login VT, - PAM_TTY will be reset with the users VT right before the user session is opened */ -- if (ensure_login_vt (worker)) { -- g_snprintf (tty_string, 256, "/dev/tty%d", worker->priv->login_vt); -- pam_set_item (worker->priv->pam_handle, PAM_TTY, tty_string); -- } -+ g_snprintf (tty_string, 256, "/dev/tty%d", GDM_INITIAL_VT); -+ pam_set_item (worker->priv->pam_handle, PAM_TTY, tty_string); - if (!display_is_local) - worker->priv->password_is_required = TRUE; - --- -2.21.0 - diff --git a/gdm.spec b/gdm.spec index 41a4daf..d57cd61 100644 --- a/gdm.spec +++ b/gdm.spec @@ -9,8 +9,8 @@ Name: gdm Epoch: 1 -Version: 3.34.0 -Release: 2%{?dist} +Version: 3.34.1 +Release: 1%{?dist} Summary: The GNOME Display Manager License: GPLv2+ @@ -20,7 +20,6 @@ Source1: org.gnome.login-screen.gschema.override Patch0: 0001-Honor-initial-setup-being-disabled-by-distro-install.patch Patch10001: 0001-data-disable-wayland-if-modesetting-is-disabled.patch -Patch10002: 0001-gdm-session-worker-Drop-login_vt-assuming-it-is-GDM_.patch Patch99: system-dconf.patch @@ -312,6 +311,9 @@ fi %{_libdir}/pkgconfig/gdm-pam-extensions.pc %changelog +* Mon Oct 07 2019 Kalev Lember - 1:3.34.1-1 +- Update to 3.34.1 + * Wed Sep 25 2019 Benjamin Berg - 1:3.34.0-2 - Add patch to fix fast user switching https://gitlab.gnome.org/GNOME/gdm/merge_requests/86 diff --git a/sources b/sources index ed17a19..a154c77 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gdm-3.34.0.tar.xz) = 657edf8ad993f5ec2b0d2574d222aa5df639207d9e69446dc61fba46f9342d898a153e8f0345a72ecf219bc3362342fcc0414b759a1d6ab9dde0c1d3f89f9851 +SHA512 (gdm-3.34.1.tar.xz) = 71b71699e8e31643080d2af5dc54381592c0c6a2f7adbb0434a9957c8e59c67a20afaf48dce57139453157572c5bae617134420f36e8da68fbc74e95746d26fb