diff --git a/SOURCES/0001-manager-allow-multiple-xdmcp-logins-for-the-same-use.patch b/SOURCES/0001-manager-allow-multiple-xdmcp-logins-for-the-same-use.patch new file mode 100644 index 0000000..eb47abb --- /dev/null +++ b/SOURCES/0001-manager-allow-multiple-xdmcp-logins-for-the-same-use.patch @@ -0,0 +1,94 @@ +From ef789e1e30c8682ac04e9ed29d40352992bf8aa9 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Thu, 20 Dec 2018 14:51:38 -0500 +Subject: [PATCH] manager: allow multiple xdmcp logins for the same user + +--- + common/gdm-settings-keys.h | 1 + + daemon/gdm-manager.c | 27 +++++++++++++++++++++++++++ + data/gdm.schemas | 5 +++++ + data/gdm.schemas.in.in | 5 +++++ + 4 files changed, 38 insertions(+) + +diff --git a/common/gdm-settings-keys.h b/common/gdm-settings-keys.h +index f0059b5..33676a8 100644 +--- a/common/gdm-settings-keys.h ++++ b/common/gdm-settings-keys.h +@@ -55,6 +55,7 @@ G_BEGIN_DECLS + #define GDM_KEY_MAX_WAIT_INDIRECT "xdmcp/MaxWaitIndirect" + #define GDM_KEY_PING_INTERVAL "xdmcp/PingIntervalSeconds" + #define GDM_KEY_WILLING "xdmcp/Willing" ++#define GDM_KEY_ALLOW_MULTIPLE_SESSIONS_PER_USER "xdmcp/AllowMultipleSessionsPerUser" + + #define GDM_KEY_MULTICAST "chooser/Multicast" + #define GDM_KEY_MULTICAST_ADDR "chooser/MulticastAddr" +diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c +index 031c61c..225de1d 100644 +--- a/daemon/gdm-manager.c ++++ b/daemon/gdm-manager.c +@@ -612,6 +612,11 @@ switch_to_compatible_user_session (GdmManager *manager, + username = gdm_session_get_username (session); + seat_id = gdm_session_get_display_seat_id (session); + ++ if (!seat_id || !sd_seat_can_multi_session (seat_id)) { ++ g_debug ("GdmManager: unable to activate existing sessions unless on seat0"); ++ goto out; ++ } ++ + if (!fail_if_already_switched) { + session = NULL; + } +@@ -1091,6 +1096,20 @@ open_temporary_reauthentication_channel (GdmManager *self, + } + + static gboolean ++remote_users_can_log_in_more_than_once (GdmManager *manager) ++{ ++ gboolean enabled; ++ ++ enabled = FALSE; ++ ++ gdm_settings_direct_get_boolean (GDM_KEY_ALLOW_MULTIPLE_SESSIONS_PER_USER, &enabled); ++ ++ g_debug ("GdmDisplay: Remote users allowed to log in more than once: %s", enabled? "yes" : "no"); ++ ++ return enabled; ++} ++ ++static gboolean + gdm_manager_handle_open_reauthentication_channel (GdmDBusManager *manager, + GDBusMethodInvocation *invocation, + const char *username) +@@ -1122,6 +1141,14 @@ gdm_manager_handle_open_reauthentication_channel (GdmDBusManager *manager + return TRUE; + } + ++ if (is_login_screen && is_remote && remote_users_can_log_in_more_than_once (self)) { ++ g_dbus_method_invocation_return_error_literal (invocation, ++ G_DBUS_ERROR, ++ G_DBUS_ERROR_ACCESS_DENIED, ++ "Login screen creates new sessions for remote connections"); ++ return TRUE; ++ } ++ + if (is_login_screen) { + session = find_session_for_user_on_seat (self, + username, +diff --git a/data/gdm.schemas.in.in b/data/gdm.schemas.in.in +index 8ad2031..003f92c 100644 +--- a/data/gdm.schemas.in.in ++++ b/data/gdm.schemas.in.in +@@ -129,5 +129,10 @@ + s + @gdmconfdir@/Xwilling + ++ ++ xdmcp/AllowMultipleSessionsPerUser ++ b ++ false ++ + + +-- +1.8.3.1 + diff --git a/SPECS/gdm.spec b/SPECS/gdm.spec index eb277d0..dd8af48 100644 --- a/SPECS/gdm.spec +++ b/SPECS/gdm.spec @@ -10,7 +10,7 @@ Name: gdm Epoch: 1 Version: 3.28.2 -Release: 11%{?dist} +Release: 12%{?dist} Summary: The GNOME Display Manager License: GPLv2+ @@ -41,6 +41,8 @@ Patch66: 0007-local-display-factory-try-even-harder-to-get-to-a-lo.patch Patch70: 0001-daemon-gdm-session-record.c-open-close-the-utmp-data.patch +Patch81: 0001-manager-allow-multiple-xdmcp-logins-for-the-same-use.patch + Patch90: audit-4.patch Patch91: clear-screen.patch Patch92: 0001-gdm.conf-custom.in-strip-out-reference-to-wayland.patch @@ -359,6 +361,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_libdir}/pkgconfig/gdm-pam-extensions.pc %changelog +* Thu Dec 20 2018 Ray Strode 3.28.2-12 +- Allow multiple simultaneous XDMCP logins for a user if + xdmcp/AllowMultipleSessionsPerUser=true + Resolves: #1679914 + * Mon Dec 03 2018 Ray Strode - 3.28.2-11 - Don't assume X server defaults to local only Resolves: #1647621