From 0cfcbe7f56aa9f9d3b461cc073276777cbaae521 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jan 04 2022 04:20:17 +0000 Subject: import gdm-40.0-22.el8 --- diff --git a/SOURCES/0001-daemon-Infer-session-type-from-desktop-file-if-user-.patch b/SOURCES/0001-daemon-Infer-session-type-from-desktop-file-if-user-.patch new file mode 100644 index 0000000..5c4e4c7 --- /dev/null +++ b/SOURCES/0001-daemon-Infer-session-type-from-desktop-file-if-user-.patch @@ -0,0 +1,87 @@ +From ff689b18fd0a5fd03e5941723cb2adff3b7e4b24 Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Wed, 29 Sep 2021 11:03:41 -0400 +Subject: [PATCH] daemon: Infer session type from desktop file if user has no + saved session type + +The accountsservice user cache file can specify a session type +associated with the saved session. This is optional though. If one +isn't specified GDM needs to figure out the session type based on the +list of preferred session types for the system and the session file +itself. + +It was failing to do the latter, though. This commit fixes that. +--- + daemon/gdm-session.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c +index 29459346..72afe7b2 100644 +--- a/daemon/gdm-session.c ++++ b/daemon/gdm-session.c +@@ -988,60 +988,62 @@ worker_on_saved_language_name_read (GdmDBusWorker *worker, + } + } + } + + static void + worker_on_saved_session_name_read (GdmDBusWorker *worker, + const char *session_name, + GdmSessionConversation *conversation) + { + GdmSession *self = conversation->session; + + if (! get_session_command_for_name (self, session_name, NULL)) { + /* ignore sessions that don't exist */ + g_debug ("GdmSession: not using invalid .dmrc session: %s", session_name); + g_free (self->saved_session); + self->saved_session = NULL; + update_session_type (self); + } else { + if (strcmp (session_name, + get_default_session_name (self)) != 0) { + g_free (self->saved_session); + self->saved_session = g_strdup (session_name); + + if (self->greeter_interface != NULL) { + gdm_dbus_greeter_emit_default_session_name_changed (self->greeter_interface, + session_name); + } + } + if (self->saved_session_type != NULL) + set_session_type (self, self->saved_session_type); ++ else ++ update_session_type (self); + } + + } + + static GdmSessionConversation * + find_conversation_by_pid (GdmSession *self, + GPid pid) + { + GHashTableIter iter; + gpointer key, value; + + g_hash_table_iter_init (&iter, self->conversations); + while (g_hash_table_iter_next (&iter, &key, &value)) { + GdmSessionConversation *conversation; + + conversation = (GdmSessionConversation *) value; + + if (conversation->worker_pid == pid) { + return conversation; + } + } + + return NULL; + } + + static gboolean + allow_worker_function (GDBusAuthObserver *observer, + GIOStream *stream, + GCredentials *credentials, + GdmSession *self) +-- +2.33.1 + diff --git a/SOURCES/0001-meson-Fix-detection-of-Xorg-versions-that-need-liste.patch b/SOURCES/0001-meson-Fix-detection-of-Xorg-versions-that-need-liste.patch new file mode 100644 index 0000000..1250e74 --- /dev/null +++ b/SOURCES/0001-meson-Fix-detection-of-Xorg-versions-that-need-liste.patch @@ -0,0 +1,144 @@ +From f101371f418bb0013af1e5e1ef522277011fd48d Mon Sep 17 00:00:00 2001 +From: Alan Coopersmith +Date: Thu, 7 Oct 2021 18:22:11 -0700 +Subject: [PATCH 1/2] meson: Fix detection of Xorg versions that need -listen + tcp + +Closes #704 +--- + meson.build | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/meson.build b/meson.build +index e6fcf4b8..06d09659 100644 +--- a/meson.build ++++ b/meson.build +@@ -42,60 +42,63 @@ udev_dep = dependency('udev') + glib_min_version = '2.56.0' + + glib_dep = dependency('glib-2.0', version: '>=' + glib_min_version) + gobject_dep = dependency('gobject-2.0', version: '>=' + glib_min_version) + gio_dep = dependency('gio-2.0', version: '>=' + glib_min_version) + gio_unix_dep = dependency('gio-unix-2.0', version: '>=' + glib_min_version) + gtk_dep = dependency('gtk+-3.0', version: '>= 2.91.1') + libcanberra_gtk_dep = dependency('libcanberra-gtk3', version: '>= 0.4') + accountsservice_dep = dependency('accountsservice', version: '>= 0.6.35') + xcb_dep = dependency('xcb') + keyutils_dep = dependency('libkeyutils', required: false) + libselinux_dep = dependency('libselinux', required: get_option('selinux')) + + # udev + if udev_dir == '' + if udev_dep.found() + udev_prefix = udev_dep.get_pkgconfig_variable('udevdir') + else + udev_prefix = gdm_prefix / 'lib' / 'udev' + endif + udev_dir = udev_prefix / 'rules.d' + endif + + # X11 + x_deps = declare_dependency( + dependencies: [ + dependency('x11'), + dependency('xau'), + ], + ) ++# Xserver 1.17 & later default to -nolisten and require -listen for remote access ++xserver_deps = dependency('xorg-server', version : '>=1.17', required : false) ++xserver_nolisten_default = xserver_deps.found() + find_x_server_script = find_program('build-aux/find-x-server.sh', native: true) + find_x_server_out = run_command(find_x_server_script).stdout().strip() + if find_x_server_out != '' + x_bin = find_x_server_out + x_bin_path_split = x_bin.split('/') + i = 0 + x_path = '/' + foreach dir : x_bin_path_split + if i < x_bin_path_split.length() - 1 + x_path = x_path / dir + endif + i = i + 1 + endforeach + else + # what to do, what to do, this is wrong, but this just sets the + # defaults, perhaps this user is cross compiling or some such + x_path = '/usr/bin/X11:/usr/X11R6/bin:/opt/X11R6/bin' + x_bin = '/usr/bin/X' + endif + xdmcp_dep = cc.find_library('Xdmcp', required: get_option('xdmcp')) + if xdmcp_dep.found() and get_option('tcp-wrappers') + libwrap_dep = cc.find_library('libwrap') + endif + # systemd + systemd_dep = dependency('systemd') + libsystemd_dep = dependency('libsystemd') + if meson.version().version_compare('>= 0.53') + systemd_multiseat_x = find_program('systemd-multi-seat-x', + required: false, + dirs: [ +@@ -197,60 +200,61 @@ conf.set_quoted('SYSCONFDIR', gdm_prefix / get_option('sysconfdir')) + conf.set_quoted('BINDIR', gdm_prefix / get_option('bindir')) + conf.set_quoted('LIBDIR', gdm_prefix / get_option('libdir')) + conf.set_quoted('LIBEXECDIR', gdm_prefix / get_option('libexecdir')) + conf.set_quoted('LOGDIR', get_option('log-dir')) + conf.set_quoted('DMCONFDIR', dmconfdir) + conf.set_quoted('GDMCONFDIR', gdmconfdir) + conf.set_quoted('GDM_SCREENSHOT_DIR', gdm_screenshot_dir) + conf.set_quoted('GDM_XAUTH_DIR', gdm_xauth_dir) + conf.set_quoted('GDM_RAN_ONCE_MARKER_DIR', ran_once_marker_dir) + conf.set_quoted('GDM_RUN_DIR', gdm_run_dir) + conf.set_quoted('GNOMELOCALEDIR', gdm_prefix / get_option('localedir')) + conf.set_quoted('AT_SPI_REGISTRYD_DIR', at_spi_registryd_dir) + conf.set_quoted('GDM_PID_FILE', gdm_pid_file) + conf.set_quoted('GNOME_SETTINGS_DAEMON_DIR', gnome_settings_daemon_dir) + conf.set_quoted('LANG_CONFIG_FILE', lang_config_file) + conf.set('HAVE_ADT', have_adt) + conf.set('HAVE_UTMP_H', have_utmp_header) + conf.set('HAVE_UTMPX_H', have_utmpx_header) + conf.set('HAVE_POSIX_GETPWNAM_R', have_posix_getpwnam_r) + conf.set('UTMP', utmp_struct) + conf.set('HAVE_GETUTXENT', cc.has_function('getutxent')) + conf.set('HAVE_UPDWTMP', cc.has_function('updwtmp')) + conf.set('HAVE_UPDWTMPX', cc.has_function('updwtmpx')) + conf.set('HAVE_LOGIN', cc.has_function('login', args: '-lutil')) + conf.set('HAVE_LOGOUT', cc.has_function('logout', args: '-lutil')) + conf.set('HAVE_LOGWTMP', cc.has_function('logwtmp', args: '-lutil')) + conf.set('HAVE_PAM_SYSLOG', have_pam_syslog) + conf.set('HAVE_KEYUTILS', keyutils_dep.found()) + conf.set('SUPPORTS_PAM_EXTENSIONS', pam_extensions_supported) + conf.set('HAVE_SELINUX', libselinux_dep.found()) ++conf.set('HAVE_XSERVER_THAT_DEFAULTS_TO_LOCAL_ONLY', xserver_nolisten_default) + conf.set('ENABLE_USER_DISPLAY_SERVER', get_option('user-display-server')) + conf.set('ENABLE_SYSTEMD_JOURNAL', get_option('systemd-journal')) + conf.set('ENABLE_WAYLAND_SUPPORT', get_option('wayland-support')) + conf.set('ENABLE_PROFILING', get_option('profiling')) + conf.set('GDM_INITIAL_VT', get_option('initial-vt')) + conf.set_quoted('GDM_DEFAULTS_CONF', gdm_defaults_conf) + conf.set_quoted('GDM_CUSTOM_CONF', gdm_custom_conf) + conf.set_quoted('GDM_RUNTIME_CONF', gdm_runtime_conf) + conf.set_quoted('GDM_SESSION_DEFAULT_PATH', get_option('default-path')) + conf.set_quoted('GDM_USERNAME', get_option('user')) + conf.set_quoted('GDM_GROUPNAME', get_option('group')) + conf.set('HAVE_LIBXDMCP', xdmcp_dep.found()) + conf.set_quoted('SYSTEMD_X_SERVER', systemd_x_server) + conf.set('WITH_PLYMOUTH', plymouth_dep.found()) + conf.set_quoted('X_SERVER', x_bin) + conf.set_quoted('X_PATH', x_path) + conf.set('HAVE_UT_UT_HOST', utmp_has_host_field) + conf.set('HAVE_UT_UT_PID', utmp_has_pid_field) + conf.set('HAVE_UT_UT_ID', utmp_has_id_field) + conf.set('HAVE_UT_UT_NAME', utmp_has_name_field) + conf.set('HAVE_UT_UT_TYPE', utmp_has_type_field) + conf.set('HAVE_UT_UT_EXIT_E_TERMINATION', utmp_has_exit_e_termination_field) + conf.set('HAVE_UT_UT_USER', utmp_has_user_field) + conf.set('HAVE_UT_UT_TIME', utmp_has_time_field) + conf.set('HAVE_UT_UT_TV', utmp_has_tv_field) + conf.set('HAVE_UT_UT_SYSLEN', utmp_has_syslen_field) + conf.set('ENABLE_IPV6', get_option('ipv6')) + configure_file(output: 'config.h', configuration: conf) + + # Subdirs +-- +2.33.1 + diff --git a/SOURCES/0001-worker-don-t-load-user-settings-for-program-sessions.patch b/SOURCES/0001-worker-don-t-load-user-settings-for-program-sessions.patch index 3d8c7ce..82ba705 100644 --- a/SOURCES/0001-worker-don-t-load-user-settings-for-program-sessions.patch +++ b/SOURCES/0001-worker-don-t-load-user-settings-for-program-sessions.patch @@ -1,4 +1,4 @@ -From 70eb29d5eedc2b66e617745be1dd145aac3e177e Mon Sep 17 00:00:00 2001 +From f0dce28fa02210caa445e96d9cbec1d150b79e80 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 15 Aug 2018 10:48:16 -0400 Subject: [PATCH 1/4] worker: don't load user settings for program sessions @@ -10,7 +10,7 @@ for its session name 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c -index 774298b9..88fe36c1 100644 +index 9b8e0d87..438348df 100644 --- a/daemon/gdm-session-worker.c +++ b/daemon/gdm-session-worker.c @@ -400,103 +400,108 @@ gdm_session_execute (const char *file, @@ -124,7 +124,7 @@ index 774298b9..88fe36c1 100644 worker->priv->service, question, answerp, -@@ -2600,87 +2605,89 @@ gdm_session_worker_get_property (GObject *object, +@@ -2598,87 +2603,89 @@ gdm_session_worker_get_property (GObject *object, g_value_set_boolean (value, self->priv->is_reauth_session); break; case PROP_STATE: @@ -218,7 +218,7 @@ index 774298b9..88fe36c1 100644 g_free (session_name); } -@@ -2758,110 +2765,113 @@ do_authorize (GdmSessionWorker *worker) +@@ -2756,110 +2763,113 @@ do_authorize (GdmSessionWorker *worker) g_dbus_method_invocation_take_error (worker->priv->pending_invocation, error); } worker->priv->pending_invocation = NULL; @@ -336,7 +336,7 @@ index 774298b9..88fe36c1 100644 } gdm_dbus_worker_complete_open (GDM_DBUS_WORKER (worker), worker->priv->pending_invocation, session_id); -@@ -3105,155 +3115,161 @@ gdm_session_worker_handle_initialize (GdmDBusWorker *object, +@@ -3103,155 +3113,161 @@ gdm_session_worker_handle_initialize (GdmDBusWorker *object, if (g_strcmp0 (key, "service") == 0) { worker->priv->service = g_variant_dup_string (value, NULL); } else if (g_strcmp0 (key, "extensions") == 0) { @@ -498,7 +498,7 @@ index 774298b9..88fe36c1 100644 GDBusMethodInvocation *invocation, const char *service, const char *username, -@@ -3591,61 +3607,60 @@ static void +@@ -3589,61 +3605,60 @@ static void reauthentication_request_free (ReauthenticationRequest *request) { @@ -561,5 +561,5 @@ index 774298b9..88fe36c1 100644 g_return_if_fail (worker->priv != NULL); -- -2.27.0 +2.33.1 diff --git a/SOURCES/0002-daemon-Support-X-servers-built-with-Dlisten_tcp-true.patch b/SOURCES/0002-daemon-Support-X-servers-built-with-Dlisten_tcp-true.patch new file mode 100644 index 0000000..e4bd561 --- /dev/null +++ b/SOURCES/0002-daemon-Support-X-servers-built-with-Dlisten_tcp-true.patch @@ -0,0 +1,327 @@ +From d3823a5084e12d8f342fd4cbec29e23bdb646de7 Mon Sep 17 00:00:00 2001 +From: Alan Coopersmith +Date: Thu, 7 Oct 2021 18:22:11 -0700 +Subject: [PATCH 2/2] daemon: Support X servers built with -Dlisten_tcp=true + +Xorg since version 1.17 doesn't listen to tcp sockets by default +unless it's explicitly built with -Dlisten_tcp=true. + +GDM currently assumes X servers 1.17 and later are always built +without specifying -Dlisten_tcp=true and doesn't work properly +otherwise. + +This commit enhances GDM to better handle these non-standard builds by +always passing '-nolisten tcp' on the command line when tcp should +be disabled, and likewise always passing '-listen tcp' on the command +line, assuming the X server is new enough to support it, when tcp +should be enabled. + +Related #704 +--- + daemon/gdm-server.c | 21 +++++++++++---------- + daemon/gdm-x-session.c | 12 ++++++------ + meson.build | 4 ++-- + 3 files changed, 19 insertions(+), 18 deletions(-) + +diff --git a/daemon/gdm-server.c b/daemon/gdm-server.c +index 1ba00d45..e5d23521 100644 +--- a/daemon/gdm-server.c ++++ b/daemon/gdm-server.c +@@ -290,72 +290,73 @@ gdm_server_resolve_command_line (GdmServer *server, + if (strcmp (arg, "-query") == 0 || + strcmp (arg, "-indirect") == 0) + query_in_arglist = TRUE; + } + + argv = g_renew (char *, argv, len + 12); + /* shift args down one */ + for (i = len - 1; i >= 1; i--) { + argv[i+1] = argv[i]; + } + + /* server number is the FIRST argument, before any others */ + argv[1] = g_strdup (server->display_name); + len++; + + if (server->auth_file != NULL) { + argv[len++] = g_strdup ("-auth"); + argv[len++] = g_strdup (server->auth_file); + } + + if (server->display_seat_id != NULL) { + argv[len++] = g_strdup ("-seat"); + argv[len++] = g_strdup (server->display_seat_id); + } + + /* If we were compiled with Xserver >= 1.17 we need to specify + * '-listen tcp' as the X server dosen't listen on tcp sockets + * by default anymore. In older versions we need to pass + * -nolisten tcp to disable listening on tcp sockets. + */ +-#ifdef HAVE_XSERVER_THAT_DEFAULTS_TO_LOCAL_ONLY +- if (!server->disable_tcp && ! query_in_arglist) { +- argv[len++] = g_strdup ("-listen"); +- argv[len++] = g_strdup ("tcp"); +- } +-#else +- if (server->disable_tcp && ! query_in_arglist) { +- argv[len++] = g_strdup ("-nolisten"); +- argv[len++] = g_strdup ("tcp"); +- } ++ if (!query_in_arglist) { ++ if (server->disable_tcp) { ++ argv[len++] = g_strdup ("-nolisten"); ++ argv[len++] = g_strdup ("tcp"); ++ } + ++#ifdef HAVE_XSERVER_WITH_LISTEN ++ if (!server->disable_tcp) { ++ argv[len++] = g_strdup ("-listen"); ++ argv[len++] = g_strdup ("tcp"); ++ } + #endif ++ } + + if (vtarg != NULL && ! gotvtarg) { + argv[len++] = g_strdup (vtarg); + } + + argv[len++] = NULL; + + *argvp = argv; + *argcp = len; + + return TRUE; + } + + static void + rotate_logs (const char *path, + guint n_copies) + { + int i; + + for (i = n_copies - 1; i > 0; i--) { + char *name_n; + char *name_n1; + + name_n = g_strdup_printf ("%s.%d", path, i); + if (i > 1) { + name_n1 = g_strdup_printf ("%s.%d", path, i - 1); + } else { + name_n1 = g_strdup (path); + } + +diff --git a/daemon/gdm-x-session.c b/daemon/gdm-x-session.c +index b1548361..d2a8aeb3 100644 +--- a/daemon/gdm-x-session.c ++++ b/daemon/gdm-x-session.c +@@ -233,70 +233,70 @@ spawn_x_server (State *state, + + if (g_getenv ("XDG_VTNR") != NULL) { + int vt; + + vt = atoi (g_getenv ("XDG_VTNR")); + + if (vt > 0 && vt < 64) { + vt_string = g_strdup_printf ("vt%d", vt); + } + } + + display_fd_string = g_strdup_printf ("%d", DISPLAY_FILENO); + + g_ptr_array_add (arguments, X_SERVER); + + if (vt_string != NULL) { + g_ptr_array_add (arguments, vt_string); + } + + g_ptr_array_add (arguments, "-displayfd"); + g_ptr_array_add (arguments, display_fd_string); + + g_ptr_array_add (arguments, "-auth"); + g_ptr_array_add (arguments, auth_file); + + /* If we were compiled with Xserver >= 1.17 we need to specify + * '-listen tcp' as the X server doesn't listen on tcp sockets + * by default anymore. In older versions we need to pass + * -nolisten tcp to disable listening on tcp sockets. + */ +-#ifdef HAVE_XSERVER_THAT_DEFAULTS_TO_LOCAL_ONLY +- if (allow_remote_connections) { +- g_ptr_array_add (arguments, "-listen"); +- g_ptr_array_add (arguments, "tcp"); +- } +-#else + if (!allow_remote_connections) { + g_ptr_array_add (arguments, "-nolisten"); + g_ptr_array_add (arguments, "tcp"); + } ++ ++#ifdef HAVE_XSERVER_WITH_LISTEN ++ if (allow_remote_connections) { ++ g_ptr_array_add (arguments, "-listen"); ++ g_ptr_array_add (arguments, "tcp"); ++ } + #endif + + g_ptr_array_add (arguments, "-background"); + g_ptr_array_add (arguments, "none"); + + g_ptr_array_add (arguments, "-noreset"); + g_ptr_array_add (arguments, "-keeptty"); + g_ptr_array_add (arguments, "-novtswitch"); + + g_ptr_array_add (arguments, "-verbose"); + if (state->debug_enabled) { + g_ptr_array_add (arguments, "7"); + } else { + g_ptr_array_add (arguments, "3"); + } + + if (state->debug_enabled) { + g_ptr_array_add (arguments, "-core"); + } + g_ptr_array_add (arguments, NULL); + + subprocess = g_subprocess_launcher_spawnv (launcher, + (const char * const *) arguments->pdata, + &error); + g_free (display_fd_string); + g_clear_object (&launcher); + g_ptr_array_free (arguments, TRUE); + + if (subprocess == NULL) { + g_debug ("could not start X server: %s", error->message); +diff --git a/meson.build b/meson.build +index 06d09659..8328dd97 100644 +--- a/meson.build ++++ b/meson.build +@@ -44,61 +44,61 @@ glib_min_version = '2.56.0' + glib_dep = dependency('glib-2.0', version: '>=' + glib_min_version) + gobject_dep = dependency('gobject-2.0', version: '>=' + glib_min_version) + gio_dep = dependency('gio-2.0', version: '>=' + glib_min_version) + gio_unix_dep = dependency('gio-unix-2.0', version: '>=' + glib_min_version) + gtk_dep = dependency('gtk+-3.0', version: '>= 2.91.1') + libcanberra_gtk_dep = dependency('libcanberra-gtk3', version: '>= 0.4') + accountsservice_dep = dependency('accountsservice', version: '>= 0.6.35') + xcb_dep = dependency('xcb') + keyutils_dep = dependency('libkeyutils', required: false) + libselinux_dep = dependency('libselinux', required: get_option('selinux')) + + # udev + if udev_dir == '' + if udev_dep.found() + udev_prefix = udev_dep.get_pkgconfig_variable('udevdir') + else + udev_prefix = gdm_prefix / 'lib' / 'udev' + endif + udev_dir = udev_prefix / 'rules.d' + endif + + # X11 + x_deps = declare_dependency( + dependencies: [ + dependency('x11'), + dependency('xau'), + ], + ) + # Xserver 1.17 & later default to -nolisten and require -listen for remote access + xserver_deps = dependency('xorg-server', version : '>=1.17', required : false) +-xserver_nolisten_default = xserver_deps.found() ++xserver_has_listen = xserver_deps.found() + find_x_server_script = find_program('build-aux/find-x-server.sh', native: true) + find_x_server_out = run_command(find_x_server_script).stdout().strip() + if find_x_server_out != '' + x_bin = find_x_server_out + x_bin_path_split = x_bin.split('/') + i = 0 + x_path = '/' + foreach dir : x_bin_path_split + if i < x_bin_path_split.length() - 1 + x_path = x_path / dir + endif + i = i + 1 + endforeach + else + # what to do, what to do, this is wrong, but this just sets the + # defaults, perhaps this user is cross compiling or some such + x_path = '/usr/bin/X11:/usr/X11R6/bin:/opt/X11R6/bin' + x_bin = '/usr/bin/X' + endif + xdmcp_dep = cc.find_library('Xdmcp', required: get_option('xdmcp')) + if xdmcp_dep.found() and get_option('tcp-wrappers') + libwrap_dep = cc.find_library('libwrap') + endif + # systemd + systemd_dep = dependency('systemd') + libsystemd_dep = dependency('libsystemd') + if meson.version().version_compare('>= 0.53') + systemd_multiseat_x = find_program('systemd-multi-seat-x', + required: false, + dirs: [ +@@ -200,61 +200,61 @@ conf.set_quoted('SYSCONFDIR', gdm_prefix / get_option('sysconfdir')) + conf.set_quoted('BINDIR', gdm_prefix / get_option('bindir')) + conf.set_quoted('LIBDIR', gdm_prefix / get_option('libdir')) + conf.set_quoted('LIBEXECDIR', gdm_prefix / get_option('libexecdir')) + conf.set_quoted('LOGDIR', get_option('log-dir')) + conf.set_quoted('DMCONFDIR', dmconfdir) + conf.set_quoted('GDMCONFDIR', gdmconfdir) + conf.set_quoted('GDM_SCREENSHOT_DIR', gdm_screenshot_dir) + conf.set_quoted('GDM_XAUTH_DIR', gdm_xauth_dir) + conf.set_quoted('GDM_RAN_ONCE_MARKER_DIR', ran_once_marker_dir) + conf.set_quoted('GDM_RUN_DIR', gdm_run_dir) + conf.set_quoted('GNOMELOCALEDIR', gdm_prefix / get_option('localedir')) + conf.set_quoted('AT_SPI_REGISTRYD_DIR', at_spi_registryd_dir) + conf.set_quoted('GDM_PID_FILE', gdm_pid_file) + conf.set_quoted('GNOME_SETTINGS_DAEMON_DIR', gnome_settings_daemon_dir) + conf.set_quoted('LANG_CONFIG_FILE', lang_config_file) + conf.set('HAVE_ADT', have_adt) + conf.set('HAVE_UTMP_H', have_utmp_header) + conf.set('HAVE_UTMPX_H', have_utmpx_header) + conf.set('HAVE_POSIX_GETPWNAM_R', have_posix_getpwnam_r) + conf.set('UTMP', utmp_struct) + conf.set('HAVE_GETUTXENT', cc.has_function('getutxent')) + conf.set('HAVE_UPDWTMP', cc.has_function('updwtmp')) + conf.set('HAVE_UPDWTMPX', cc.has_function('updwtmpx')) + conf.set('HAVE_LOGIN', cc.has_function('login', args: '-lutil')) + conf.set('HAVE_LOGOUT', cc.has_function('logout', args: '-lutil')) + conf.set('HAVE_LOGWTMP', cc.has_function('logwtmp', args: '-lutil')) + conf.set('HAVE_PAM_SYSLOG', have_pam_syslog) + conf.set('HAVE_KEYUTILS', keyutils_dep.found()) + conf.set('SUPPORTS_PAM_EXTENSIONS', pam_extensions_supported) + conf.set('HAVE_SELINUX', libselinux_dep.found()) +-conf.set('HAVE_XSERVER_THAT_DEFAULTS_TO_LOCAL_ONLY', xserver_nolisten_default) ++conf.set('HAVE_XSERVER_WITH_LISTEN', xserver_has_listen) + conf.set('ENABLE_USER_DISPLAY_SERVER', get_option('user-display-server')) + conf.set('ENABLE_SYSTEMD_JOURNAL', get_option('systemd-journal')) + conf.set('ENABLE_WAYLAND_SUPPORT', get_option('wayland-support')) + conf.set('ENABLE_PROFILING', get_option('profiling')) + conf.set('GDM_INITIAL_VT', get_option('initial-vt')) + conf.set_quoted('GDM_DEFAULTS_CONF', gdm_defaults_conf) + conf.set_quoted('GDM_CUSTOM_CONF', gdm_custom_conf) + conf.set_quoted('GDM_RUNTIME_CONF', gdm_runtime_conf) + conf.set_quoted('GDM_SESSION_DEFAULT_PATH', get_option('default-path')) + conf.set_quoted('GDM_USERNAME', get_option('user')) + conf.set_quoted('GDM_GROUPNAME', get_option('group')) + conf.set('HAVE_LIBXDMCP', xdmcp_dep.found()) + conf.set_quoted('SYSTEMD_X_SERVER', systemd_x_server) + conf.set('WITH_PLYMOUTH', plymouth_dep.found()) + conf.set_quoted('X_SERVER', x_bin) + conf.set_quoted('X_PATH', x_path) + conf.set('HAVE_UT_UT_HOST', utmp_has_host_field) + conf.set('HAVE_UT_UT_PID', utmp_has_pid_field) + conf.set('HAVE_UT_UT_ID', utmp_has_id_field) + conf.set('HAVE_UT_UT_NAME', utmp_has_name_field) + conf.set('HAVE_UT_UT_TYPE', utmp_has_type_field) + conf.set('HAVE_UT_UT_EXIT_E_TERMINATION', utmp_has_exit_e_termination_field) + conf.set('HAVE_UT_UT_USER', utmp_has_user_field) + conf.set('HAVE_UT_UT_TIME', utmp_has_time_field) + conf.set('HAVE_UT_UT_TV', utmp_has_tv_field) + conf.set('HAVE_UT_UT_SYSLEN', utmp_has_syslen_field) + conf.set('ENABLE_IPV6', get_option('ipv6')) + configure_file(output: 'config.h', configuration: conf) + + # Subdirs +-- +2.33.1 + diff --git a/SOURCES/0002-session-support-new-accountsservice-Session-and-Sess.patch b/SOURCES/0002-session-support-new-accountsservice-Session-and-Sess.patch index 21ea92a..6cb961e 100644 --- a/SOURCES/0002-session-support-new-accountsservice-Session-and-Sess.patch +++ b/SOURCES/0002-session-support-new-accountsservice-Session-and-Sess.patch @@ -1,4 +1,4 @@ -From 96e78f519a4d5ce2e5b708035ae1f43eb7c1bbd2 Mon Sep 17 00:00:00 2001 +From 22b08727980cefd665b8805376710e9244523fe3 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Tue, 14 Aug 2018 14:52:41 -0400 Subject: [PATCH 2/4] session: support new accountsservice Session and @@ -454,10 +454,10 @@ index 20946bff..db38ffc7 100644 G_END_DECLS #endif /* GDM_SESSION_SETTINGS_H */ diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c -index 88fe36c1..c1201b70 100644 +index 438348df..9cff53a5 100644 --- a/daemon/gdm-session-worker.c +++ b/daemon/gdm-session-worker.c -@@ -2664,60 +2664,74 @@ gdm_session_worker_handle_set_language_name (GdmDBusWorker *object, +@@ -2662,60 +2662,74 @@ gdm_session_worker_handle_set_language_name (GdmDBusWorker *object, gdm_dbus_worker_complete_set_language_name (object, invocation); return TRUE; } @@ -532,7 +532,7 @@ index 88fe36c1..c1201b70 100644 static void do_authenticate (GdmSessionWorker *worker) { -@@ -3127,158 +3141,172 @@ gdm_session_worker_handle_initialize (GdmDBusWorker *object, +@@ -3125,158 +3139,172 @@ gdm_session_worker_handle_initialize (GdmDBusWorker *object, } else if (g_strcmp0 (key, "x11-authority-file") == 0) { worker->priv->x11_authority_file = g_variant_dup_string (value, NULL); } else if (g_strcmp0 (key, "console") == 0) { @@ -754,7 +754,7 @@ index 4280fe09..a215779c 100644 diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c -index 29459346..43da024f 100644 +index 72afe7b2..f4d0bef9 100644 --- a/daemon/gdm-session.c +++ b/daemon/gdm-session.c @@ -61,60 +61,61 @@ @@ -1222,7 +1222,7 @@ index 29459346..43da024f 100644 static void set_pending_query (GdmSessionConversation *conversation, -@@ -969,83 +989,94 @@ worker_on_reauthenticated (GdmDBusWorker *worker, +@@ -969,85 +989,96 @@ worker_on_reauthenticated (GdmDBusWorker *worker, GdmSession *self = conversation->session; g_debug ("GdmSession: Emitting 'reauthenticated' signal "); g_signal_emit (self, signals[REAUTHENTICATED], 0, service_name); @@ -1273,6 +1273,8 @@ index 29459346..43da024f 100644 } if (self->saved_session_type != NULL) set_session_type (self, self->saved_session_type); + else + update_session_type (self); } } @@ -1318,7 +1320,7 @@ index 29459346..43da024f 100644 uid_t connecting_user; connecting_user = g_credentials_get_unix_user (credentials, NULL); -@@ -1125,60 +1156,63 @@ register_worker (GdmDBusWorkerManager *worker_manager_interface, +@@ -1127,60 +1158,63 @@ register_worker (GdmDBusWorkerManager *worker_manager_interface, g_dbus_method_invocation_return_value (invocation, NULL); conversation->worker_proxy = gdm_dbus_worker_proxy_new_sync (connection, @@ -1382,7 +1384,7 @@ index 29459346..43da024f 100644 g_debug ("GdmSession: Conversation started"); return TRUE; -@@ -1921,60 +1955,63 @@ free_conversation (GdmSessionConversation *conversation) +@@ -1923,60 +1957,63 @@ free_conversation (GdmSessionConversation *conversation) close_conversation (conversation); if (conversation->job != NULL) { @@ -1446,7 +1448,7 @@ index 29459346..43da024f 100644 error = NULL; if (!g_file_get_contents (config_file, &contents, &length, &error)) { g_debug ("Failed to parse '%s': %s", -@@ -2533,83 +2570,83 @@ gdm_session_send_environment (GdmSession *self, +@@ -2535,83 +2572,83 @@ gdm_session_send_environment (GdmSession *self, g_return_if_fail (GDM_IS_SESSION (self)); conversation = find_conversation_by_name (self, service_name); @@ -1532,7 +1534,7 @@ index 29459346..43da024f 100644 g_strdup (value)); } -@@ -3179,148 +3216,150 @@ gdm_session_get_conversation_session_id (GdmSession *self, +@@ -3181,148 +3218,150 @@ gdm_session_get_conversation_session_id (GdmSession *self, conversation = find_conversation_by_name (self, service_name); if (conversation == NULL) { @@ -1692,5 +1694,5 @@ index 29459346..43da024f 100644 self->display_seat_id); -- -2.27.0 +2.33.1 diff --git a/SOURCES/0003-daemon-save-os-release-in-accountsservice.patch b/SOURCES/0003-daemon-save-os-release-in-accountsservice.patch index b670407..e6dcb56 100644 --- a/SOURCES/0003-daemon-save-os-release-in-accountsservice.patch +++ b/SOURCES/0003-daemon-save-os-release-in-accountsservice.patch @@ -1,4 +1,4 @@ -From bd5153305b576f29ea3b8835bd2740a5eda2db0f Mon Sep 17 00:00:00 2001 +From de95917e0e9d142703a86f94961ef9fd4151739d Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 20 Aug 2018 14:30:59 -0400 Subject: [PATCH 3/4] daemon: save os-release in accountsservice @@ -401,7 +401,7 @@ index f2b1addd..a4b7f1a6 100644 return TRUE; } diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c -index 43da024f..c8e04c1b 100644 +index f4d0bef9..d1e2c301 100644 --- a/daemon/gdm-session.c +++ b/daemon/gdm-session.c @@ -351,72 +351,72 @@ supports_session_type (GdmSession *self, @@ -607,5 +607,5 @@ index 2e61b644..71c65039 100644 gdm_session_worker = executable('gdm-session-worker', -- -2.27.0 +2.33.1 diff --git a/SOURCES/0004-daemon-handle-upgrades-from-RHEL-7.patch b/SOURCES/0004-daemon-handle-upgrades-from-RHEL-7.patch index 6d56e3c..8b6fe88 100644 --- a/SOURCES/0004-daemon-handle-upgrades-from-RHEL-7.patch +++ b/SOURCES/0004-daemon-handle-upgrades-from-RHEL-7.patch @@ -1,4 +1,4 @@ -From b7c0541ffccf43994a3e418c4012b17a6dd8b630 Mon Sep 17 00:00:00 2001 +From 738a10ca78e154ad4c3df9a1298eaad01516457e Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 20 Aug 2018 14:30:59 -0400 Subject: [PATCH 4/4] daemon: handle upgrades from RHEL 7 @@ -135,10 +135,10 @@ index a4b7f1a6..a84b2ffa 100644 settings); } diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c -index c8e04c1b..3103e9df 100644 +index d1e2c301..d4a46d87 100644 --- a/daemon/gdm-session.c +++ b/daemon/gdm-session.c -@@ -3205,98 +3205,95 @@ gdm_session_get_session_id (GdmSession *self) +@@ -3207,98 +3207,95 @@ gdm_session_get_session_id (GdmSession *self) return conversation->session_id; } @@ -246,5 +246,5 @@ index c8e04c1b..3103e9df 100644 if (!session_registers && error != NULL && -- -2.27.0 +2.33.1 diff --git a/SPECS/gdm.spec b/SPECS/gdm.spec index f53b851..5e5cc2d 100644 --- a/SPECS/gdm.spec +++ b/SPECS/gdm.spec @@ -12,7 +12,7 @@ Name: gdm Epoch: 1 Version: 40.0 -Release: 20%{?dist} +Release: 22%{?dist} Summary: The GNOME Display Manager License: GPLv2+ @@ -45,6 +45,13 @@ Patch80001: 0001-local-display-factory-Don-t-try-to-respawn-displays-.patch # VT handling fix from upstream Patch90001: 0001-session-worker-Set-session_vt-0-out-of-pam-uninitial.patch +# Wayland fix from upstream +Patch100001: 0001-daemon-Infer-session-type-from-desktop-file-if-user-.patch + +# Fix DisallowTcp=false from upstream +Patch110001: 0001-meson-Fix-detection-of-Xorg-versions-that-need-liste.patch +Patch110002: 0002-daemon-Support-X-servers-built-with-Dlisten_tcp-true.patch + # Non-upstreamable workarounds Patch66620001: 0001-data-reap-gdm-sessions-on-shutdown.patch @@ -62,6 +69,7 @@ Patch99930001: 0001-data-add-system-dconf-databases-to-gdm-profile.patch Patch99940001: 0001-data-disable-wayland-on-certain-hardware.patch + BuildRequires: accountsservice-devel BuildRequires: audit-libs-devel >= %{libauditver} BuildRequires: dconf @@ -366,6 +374,14 @@ fi %{_libdir}/pkgconfig/gdm-pam-extensions.pc %changelog +* Wed Dec 22 2021 Ray Strode - 40.1-22 +- Fix DisallowTCP + Resolves: #2025768 + +* Tue Dec 21 2021 Ray Strode - 40.1-21 +- Fix Xorg/Wayland selection in some cases + Resolves: #2009045 + * Mon Oct 25 2021 Ray Strode - 40.1-20 - Remove module-rescue-stream from default.pa Resolves: #1969846