Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package gdm for openSUSE:Factory checked in at 2026-11-27 19:40:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gdm (Old) and /work/SRC/openSUSE:Factory/.gdm.new.1340718 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gdm" Fri Nov 27 19:40:35 2026 rev:308 rq:1400516 version:51.2 Changes: -------- --- /work/SRC/openSUSE:Factory/gdm/gdm.changes 2026-10-30 18:13:36.750563209 +0100 +++ /work/SRC/openSUSE:Factory/.gdm.new.1340718/gdm.changes 2026-11-27 19:41:14.393311321 +0100 @@ -1,0 +2,20 @@ +Tue Nov 24 22:29:01 UTC 2026 - Bjørn Lie <[email protected]> + +- Update to version 51.2: + * Fixed authentication bypass (CVE-2026-132858) + * Fixed reauthentication privilege escalation (CVE-2026-133445) + * Fixed remote display creation during direct login + * Fixed an authorization memory leak + * Fixed smartcard login not switching to an existing user session when the + username becomes known during authentication + * Notify the greeter when PAM changes the selected user + * Fixed D-Bus startup races and reconnect handling + * Fixed reauthentication session cleanup + * Fixed PAM rules not skipping both keyring modules when pam_gdm fails + * Stop GDM before accounts-daemon at shutdown + * Fixed a memory leak in PAM environment handling + * Search XDG_DATA_DIRS for GNOME session files, fixing initial setup with + non-standard installation paths +- Refresh patches with quilt. + +------------------------------------------------------------------- Old: ---- gdm-51.1.1.tar.xz New: ---- gdm-51.2.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gdm.spec ++++++ --- /var/tmp/diff_new_pack.ha5GmV/_old 2026-11-27 19:41:16.774410376 +0100 +++ /var/tmp/diff_new_pack.ha5GmV/_new 2026-11-27 19:41:16.781410667 +0100 @@ -27,7 +27,7 @@ %endif Name: gdm -Version: 51.1.1 +Version: 51.2 Release: 0 Summary: The GNOME Display Manager License: GPL-2.0-or-later ++++++ _scmsync.obsinfo ++++++ --- /var/tmp/diff_new_pack.ha5GmV/_old 2026-11-27 19:41:16.907415909 +0100 +++ /var/tmp/diff_new_pack.ha5GmV/_new 2026-11-27 19:41:16.912416117 +0100 @@ -1,7 +1,7 @@ -mtime: 1793148584 -commit: 37688664575c3990d62a80e809f72c4facec980cc011b39cafa8a3c0c5a4ef44 +mtime: 1795559898 +commit: f27a9b3e68f52307c0f78e208d08f99037bd95f4986134f057f3880b3b0692e5 url: https://src.opensuse.org/GNOME/gdm -revision: 37688664575c3990d62a80e809f72c4facec980cc011b39cafa8a3c0c5a4ef44 +revision: f27a9b3e68f52307c0f78e208d08f99037bd95f4986134f057f3880b3b0692e5 trackingbranch: factory projectscmsync: https://src.opensuse.org/GNOME/_ObsPrj ++++++ _service ++++++ --- /var/tmp/diff_new_pack.ha5GmV/_old 2026-11-27 19:41:16.945417490 +0100 +++ /var/tmp/diff_new_pack.ha5GmV/_new 2026-11-27 19:41:16.952417782 +0100 @@ -3,7 +3,7 @@ <service name="obs_scm" mode="manual"> <param name="scm">git</param> <param name="url">https://gitlab.gnome.org/GNOME/gdm.git</param> - <param name="revision">51.1.1</param> + <param name="revision">51.2</param> <param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param> <param name="versionrewrite-pattern">(.*)\+0</param> <param name="versionrewrite-replacement">\1</param> ++++++ build.specials.obscpio ++++++ ++++++ build.specials.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/.gitignore 2026-11-24 23:38:18.000000000 +0100 @@ -0,0 +1,5 @@ +*.obscpio +*.osc +_build.* +.pbuild +osc-collab.* ++++++ gdm-51.1.1.tar.xz -> gdm-51.2.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gdm-51.1.1/NEWS new/gdm-51.2/NEWS --- old/gdm-51.1.1/NEWS 2026-10-20 11:36:36.000000000 +0200 +++ new/gdm-51.2/NEWS 2026-11-24 19:11:15.000000000 +0100 @@ -1,3 +1,21 @@ +51.2 +==== + +* Fixed authentication bypass (CVE-2026-132858) +* Fixed reauthentication privilege escalation (CVE-2026-133445) +* Fixed remote display creation during direct login +* Fixed an authorization memory leak +* Fixed smartcard login not switching to an existing user session when the + username becomes known during authentication +* Notify the greeter when PAM changes the selected user +* Fixed D-Bus startup races and reconnect handling +* Fixed reauthentication session cleanup +* Fixed PAM rules not skipping both keyring modules when pam_gdm fails +* Stop GDM before accounts-daemon at shutdown +* Fixed a memory leak in PAM environment handling +* Search XDG_DATA_DIRS for GNOME session files, fixing initial setup with + non-standard installation paths + 51.1.1 ==== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gdm-51.1.1/daemon/gdm-display-factory.c new/gdm-51.2/daemon/gdm-display-factory.c --- old/gdm-51.1.1/daemon/gdm-display-factory.c 2026-10-20 11:36:36.000000000 +0200 +++ new/gdm-51.2/daemon/gdm-display-factory.c 2026-11-24 19:11:15.000000000 +0100 @@ -176,6 +176,7 @@ g_autoptr (PolkitSubject) subject = NULL; g_autoptr (PolkitDetails) details = NULL; g_autoptr (GError) local_error = NULL; + g_autoptr (GVariant) properties = NULL; const char *user = NULL; const char *action; const char *method; @@ -187,8 +188,9 @@ g_return_val_if_fail (GDM_IS_DISPLAY_FACTORY (factory), FALSE); method = g_dbus_method_invocation_get_method_name (invocation); - if (g_strcmp0 (method, "CreateUserDisplay") != 0 && - g_strcmp0 (method, "DestroyUserDisplay") != 0) + if (!g_str_equal (method, "CreateUserDisplay") && + !g_str_equal (method, "DestroyUserDisplay") && + !g_str_equal (method, "CreateRemoteDisplay")) return TRUE; if (!ensure_polkit_authority (factory, &local_error)) { @@ -201,9 +203,17 @@ priv = gdm_display_factory_get_instance_private (factory); parameters = g_dbus_method_invocation_get_parameters (invocation); - g_variant_get (parameters, "(s)", &user); details = polkit_details_new (); - polkit_details_insert (details, "user", user); + + if (g_str_equal (method, "CreateRemoteDisplay")) { + g_variant_get (parameters, "(@a{sv})", &properties); + g_variant_lookup (properties, "preauthenticated-user", "&s", &user); + } else { + g_variant_get (parameters, "(&s)", &user); + } + + if (user != NULL && !g_str_equal (user, "")) + polkit_details_insert (details, "user", user); sender = g_dbus_method_invocation_get_sender (invocation); subject = polkit_system_bus_name_new (sender); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gdm-51.1.1/daemon/gdm-display.c new/gdm-51.2/daemon/gdm-display.c --- old/gdm-51.1.1/daemon/gdm-display.c 2026-10-20 11:36:36.000000000 +0200 +++ new/gdm-51.2/daemon/gdm-display.c 2026-11-24 19:11:15.000000000 +0100 @@ -46,8 +46,6 @@ #include "gdm-launch-environment.h" #include "gdm-dbus-util.h" -#define GNOME_SESSION_SESSIONS_PATH DATADIR "/gnome-session/sessions" - typedef struct _GdmDisplayPrivate { GObject parent; @@ -1108,13 +1106,25 @@ static gboolean can_create_environment (const char *session_id) { - g_autofree char *path = NULL; - gboolean session_exists; - - path = g_strdup_printf (GNOME_SESSION_SESSIONS_PATH "/%s.session", session_id); - session_exists = g_file_test (path, G_FILE_TEST_EXISTS); + const char * const *system_data_dirs = NULL; + g_autofree char *session_filename = NULL; + int i; + + session_filename = g_strdup_printf ("%s.session", session_id); + system_data_dirs = g_get_system_data_dirs (); + for (i = 0; system_data_dirs[i]; i++) { + g_autofree char *candidate_path = NULL; + + candidate_path = g_build_filename (system_data_dirs[i], + "gnome-session", + "sessions", + session_filename, + NULL); + if (g_file_test (candidate_path, G_FILE_TEST_EXISTS)) + return TRUE; + } - return session_exists; + return FALSE; } #define ALREADY_RAN_INITIAL_SETUP_ON_THIS_BOOT GDM_RUN_DIR "/gdm.ran-initial-setup" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gdm-51.1.1/daemon/gdm-manager.c new/gdm-51.2/daemon/gdm-manager.c --- old/gdm-51.1.1/daemon/gdm-manager.c 2026-10-20 11:36:36.000000000 +0200 +++ new/gdm-51.2/daemon/gdm-manager.c 2026-11-24 19:11:15.000000000 +0100 @@ -137,6 +137,7 @@ static void start_user_session (GdmManager *manager, StartUserSessionOperation *operation); static void clean_user_session (GdmSession *session); +static void register_manager (GdmManager *manager); static gpointer manager_object = NULL; @@ -592,6 +593,12 @@ g_free (session_id); } +static gboolean are_sessions_compatible (GdmSession *session_a, + GdmSession *session_b); +static GdmDisplay *get_display_for_user_session (GdmSession *session); +static void update_remote_id_for_existing_session (GdmDisplay *login_display, + GdmSession *existing_session); + static gboolean switch_to_compatible_user_session (GdmManager *manager, GdmSession *session, @@ -616,6 +623,9 @@ existing_session = find_session_for_user (manager, username, session); if (existing_session != NULL) { + if (session != NULL && !are_sessions_compatible (existing_session, session)) + goto out; + ssid_to_activate = gdm_session_get_session_id (existing_session); if (seat_id != NULL) { res = gdm_activate_session_by_id (manager->connection, NULL, seat_id, ssid_to_activate); @@ -630,6 +640,11 @@ /* this isn't fatal */ g_debug ("GdmManager: unable to unlock session: %s", ssid_to_activate); } + + if (session != NULL) { + update_remote_id_for_existing_session ( + get_display_for_user_session (session), existing_session); + } } else { goto out; } @@ -646,6 +661,32 @@ return g_object_get_qdata (G_OBJECT (session), gdm_session_display_quark); } +static void +update_remote_id_for_existing_session (GdmDisplay *login_display, + GdmSession *existing_session) +{ + GdmDisplay *existing_display; + + if (!GDM_IS_REMOTE_DISPLAY (login_display)) + return; + + existing_display = get_display_for_user_session (existing_session); + + if (existing_display == NULL || !GDM_IS_REMOTE_DISPLAY (existing_display)) { + g_warning ("GdmManager: Couldn't find remote display associated with existing user session"); + return; + } + + /* Transferring the remote id from the new login screen display to the + * preexisting user session display, notifies the remoting software to redirect + * the connection. That same software will also ensure after the redirection has + * happened that the login screen session is closed, so we don't have to manage that + * ourselves. + */ + g_autofree char *remote_id = gdm_remote_display_get_remote_id (GDM_REMOTE_DISPLAY (login_display)); + gdm_remote_display_set_remote_id (GDM_REMOTE_DISPLAY (existing_display), remote_id); +} + static GdmSession * get_user_session_for_display (GdmDisplay *display) { @@ -1012,7 +1053,7 @@ gdm_session_user_session_quark, user_session? g_object_ref (user_session) : NULL, (GDestroyNotify) - g_object_unref); + clear_user_session); g_object_set_qdata (G_OBJECT (session), gdm_session_caller_pid_quark, GUINT_TO_POINTER (pid)); @@ -1598,31 +1639,12 @@ on_start_user_session (StartUserSessionOperation *operation) { GdmManager *self = operation->manager; - gboolean migrated; - gboolean fail_if_already_switched = TRUE; GdmDisplay *display; const char *session_id; gboolean doing_initial_setup = FALSE; uid_t allowed_uid; - g_debug ("GdmManager: start or jump to session"); - - /* If there's already a session running, jump to it. - * If the only session running is the one we just opened, - * start a session on it. - */ - migrated = switch_to_compatible_user_session (operation->manager, operation->session, fail_if_already_switched); - - g_debug ("GdmManager: migrated: %d", migrated); - if (migrated) { - /* We don't stop the manager here because - when Xorg exits it switches to the VT it was - started from. That interferes with fast - user switching. */ - gdm_session_reset (operation->session); - destroy_start_user_session_operation (operation); - goto out; - } + g_debug ("GdmManager: start session"); display = get_display_for_user_session (operation->session); @@ -1680,7 +1702,6 @@ start_user_session (operation->manager, operation); - out: return G_SOURCE_REMOVE; } @@ -1731,7 +1752,9 @@ GdmManager *manager) { GdmDisplay *display; + const char *username; gboolean doing_initial_setup = FALSE; + gboolean switched; display = get_display_for_user_session (session); if (display == NULL) { @@ -1747,6 +1770,27 @@ NULL); if (doing_initial_setup) export_initial_setup_home_dir (session); + + /* The username may only have become known partway through this + * conversation, e.g. when it's auto-selected by a PAM service like + * gdm-smartcard. If it turns out a compatible session for that user + * is already running, this login attempt is redundant: jump to the + * existing session instead and discard this conversation. + */ + username = gdm_session_get_username (session); + if (username == NULL) + return; + + switched = switch_to_compatible_user_session (manager, session, TRUE); + if (switched) { + g_debug ("GdmManager: user %s already has a compatible session running, " + "switching to it instead of completing this login attempt", + username); + gdm_session_reset (session); + } else { + g_debug ("GdmManager: unable to switch to session, " + "letting this conversation finish normally"); + } } static void @@ -1860,42 +1904,18 @@ int pid_of_caller, GdmManager *manager) { - gboolean fail_if_already_switched = FALSE; GdmDisplay *login_display = gdm_display_store_find (manager->display_store, lookup_by_reauth_pid, GINT_TO_POINTER (pid_of_caller)); - if (login_display != NULL) { - if (GDM_IS_REMOTE_DISPLAY (login_display)) { - const char *session_id; - GdmDisplay *user_display; - - session_id = gdm_session_get_session_id (session); - user_display = gdm_display_store_find (manager->display_store, - lookup_by_session_id, - (gpointer) session_id); - - if (user_display != NULL && GDM_IS_REMOTE_DISPLAY (user_display)) { - /* Transferring the remote id from the new login screen display to the - * preexisting user session display, notifies the remoting software to redirect - * the connection. That same software will also ensure after the redirection has - * happened that the login screen session is closed, so we don't have to manage that - * ourselves. - */ - g_autofree char *remote_id = gdm_remote_display_get_remote_id (GDM_REMOTE_DISPLAY (login_display)); - gdm_remote_display_set_remote_id (GDM_REMOTE_DISPLAY (user_display), remote_id); - } else { - g_warning ("GdmManager: Couldn't find remote display associated with reauthenticated user session"); - } - } - } + update_remote_id_for_existing_session (login_display, session); /* There should already be a session running, so jump to its * VT. In the event we're already on the right VT, (i.e. user * used an unlock screen instead of a user switched login screen), * then silently succeed and unlock the session. */ - switch_to_compatible_user_session (manager, session, fail_if_already_switched); + switch_to_compatible_user_session (manager, session, FALSE); } static void @@ -2381,6 +2401,11 @@ { g_return_if_fail (GDM_IS_MANAGER (manager)); + register_manager (manager); + + if (manager->started) + return; + g_debug ("GdmManager: GDM starting to manage displays"); #ifdef WITH_PLYMOUTH @@ -2413,13 +2438,18 @@ manager->started = TRUE; } -static gboolean +static void register_manager (GdmManager *manager) { GError *error = NULL; - GDBusObjectManagerServer *object_server; - error = NULL; + if (manager->connection != NULL) { + if (!g_dbus_connection_is_closed (manager->connection)) + return; + + g_clear_object (&manager->connection); + } + manager->connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error); @@ -2429,9 +2459,10 @@ exit (EXIT_FAILURE); } - object_server = g_dbus_object_manager_server_new (GDM_MANAGER_DISPLAYS_PATH); - g_dbus_object_manager_server_set_connection (object_server, manager->connection); - manager->object_manager = object_server; + if (manager->object_manager == NULL) + manager->object_manager = g_dbus_object_manager_server_new (GDM_MANAGER_DISPLAYS_PATH); + + g_dbus_object_manager_server_set_connection (manager->object_manager, manager->connection); if (!g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (manager), manager->connection, @@ -2443,8 +2474,6 @@ g_error_free (error); exit (EXIT_FAILURE); } - - return TRUE; } void @@ -2713,16 +2742,9 @@ if (manager_object != NULL) { g_object_ref (manager_object); } else { - gboolean res; - manager_object = g_object_new (GDM_TYPE_MANAGER, NULL); g_object_add_weak_pointer (manager_object, (gpointer *) &manager_object); - res = register_manager (manager_object); - if (! res) { - g_object_unref (manager_object); - return NULL; - } } return GDM_MANAGER (manager_object); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gdm-51.1.1/daemon/gdm-remote-display-factory.c new/gdm-51.2/daemon/gdm-remote-display-factory.c --- old/gdm-51.1.1/daemon/gdm-remote-display-factory.c 2026-10-20 11:36:36.000000000 +0200 +++ new/gdm-51.2/daemon/gdm-remote-display-factory.c 2026-11-24 19:11:15.000000000 +0100 @@ -49,6 +49,22 @@ G_DEFINE_TYPE (GdmRemoteDisplayFactory, gdm_remote_display_factory, GDM_TYPE_DISPLAY_FACTORY) static gboolean +lookup_by_remote_id (const char *id, + GdmDisplay *display, + gpointer user_data) +{ + const char *remote_id = user_data; + g_autofree char *display_remote_id = NULL; + + if (!GDM_IS_REMOTE_DISPLAY (display)) + return FALSE; + + display_remote_id = gdm_remote_display_get_remote_id (GDM_REMOTE_DISPLAY (display)); + + return g_strcmp0 (remote_id, display_remote_id) == 0; +} + +static gboolean lookup_by_autologin_user (const char *id, GdmDisplay *display, gpointer user_data) @@ -107,46 +123,97 @@ return display; } +typedef struct +{ + GDBusMethodInvocation *invocation; + GdmRemoteDisplayFactory *factory; + char *remote_id; +} PendingCreateDisplay; + +static void complete_invocation_when_exported (GdmRemoteDisplayFactory *factory, + GdmDisplay *display, + GDBusMethodInvocation *invocation); + +static void +pending_create_display_free (PendingCreateDisplay *pending) +{ + g_clear_object (&pending->factory); + g_free (pending->remote_id); + g_free (pending); +} + static void on_display_disposed (gpointer data, GObject *display) { - GDBusMethodInvocation *invocation = data; + PendingCreateDisplay *pending = data; + GDBusMethodInvocation *invocation = pending->invocation; + GdmRemoteDisplayFactory *factory = pending->factory; + const char *remote_id = pending->remote_id; + GdmDisplay *replacement; + GdmDisplayStore *store; + + /* Direct login replaces the prepared display with a user display. */ + if (remote_id != NULL) { + store = gdm_display_factory_get_display_store (GDM_DISPLAY_FACTORY (factory)); + replacement = gdm_display_store_find (store, + lookup_by_remote_id, + (gpointer) remote_id); + if (replacement != NULL && replacement != (GdmDisplay *) display) { + complete_invocation_when_exported (factory, + replacement, + invocation); + pending_create_display_free (pending); + return; + } + } g_dbus_method_invocation_return_error_literal (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Display destroyed before being exported"); + pending_create_display_free (pending); } static void on_display_exported (GdmDisplay *display, GParamSpec *pspec, - GDBusMethodInvocation *invocation) + PendingCreateDisplay *pending) { + g_autofree char *id = NULL; + if (!gdm_display_is_exported (display)) return; - g_signal_handlers_disconnect_by_func (display, on_display_exported, invocation); - g_object_weak_unref (G_OBJECT (display), on_display_disposed, invocation); + g_signal_handlers_disconnect_by_func (display, on_display_exported, pending); + g_object_weak_unref (G_OBJECT (display), on_display_disposed, pending); - g_dbus_method_invocation_return_value (invocation, NULL); + gdm_display_get_id (display, &id, NULL); + g_dbus_method_invocation_return_value (pending->invocation, NULL); + pending_create_display_free (pending); } static void -complete_invocation_when_exported (GdmDisplay *display, - GDBusMethodInvocation *invocation) +complete_invocation_when_exported (GdmRemoteDisplayFactory *factory, + GdmDisplay *display, + GDBusMethodInvocation *invocation) { + PendingCreateDisplay *pending; + if (gdm_display_is_exported (display)) { g_dbus_method_invocation_return_value (invocation, NULL); return; } - g_signal_connect_object (display, "notify::is-exported", - G_CALLBACK (on_display_exported), - invocation, - 0); - g_object_weak_ref (G_OBJECT (display), on_display_disposed, invocation); + pending = g_new0 (PendingCreateDisplay, 1); + pending->invocation = invocation; + pending->factory = g_object_ref (factory); + pending->remote_id = gdm_remote_display_get_remote_id (GDM_REMOTE_DISPLAY (display)); + + g_signal_connect (display, "notify::is-exported", + G_CALLBACK (on_display_exported), + pending); + g_object_weak_ref (G_OBJECT (display), on_display_disposed, pending); } static gboolean @@ -184,7 +251,7 @@ return G_DBUS_METHOD_INVOCATION_HANDLED; } - complete_invocation_when_exported (display, invocation); + complete_invocation_when_exported (factory, display, invocation); return G_DBUS_METHOD_INVOCATION_HANDLED; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gdm-51.1.1/daemon/gdm-session-worker.c new/gdm-51.2/daemon/gdm-session-worker.c --- old/gdm-51.1.1/daemon/gdm-session-worker.c 2026-10-20 11:36:36.000000000 +0200 +++ new/gdm-51.2/daemon/gdm-session-worker.c 2026-11-24 19:11:15.000000000 +0100 @@ -1807,10 +1807,60 @@ return ret; } -static const char * const * +static GStrv gdm_session_worker_get_environment (GdmSessionWorker *worker) { - return (const char * const *) pam_getenvlist (worker->pam_handle); + return pam_getenvlist (worker->pam_handle); +} + +static gboolean +is_reauth_environment_variable_allowed (const char *name, + const char *value, + uid_t uid) +{ + g_autofree char *runtime_dir = NULL; + + if (g_str_equal (name, "LANG") || + g_str_equal (name, "LANGUAGE") || + g_str_equal (name, "KRB5CCNAME") || + g_str_equal (name, "PKCS11_LOGIN_TOKEN_NAME") || + g_str_has_prefix (name, "LC_")) + return TRUE; + + if (!g_str_equal (name, "XDG_RUNTIME_DIR")) + return FALSE; + + runtime_dir = g_strdup_printf ("/run/user/%u", (guint) uid); + return g_str_equal (value, runtime_dir); +} + +static GStrv +gdm_session_worker_get_reauth_environment (GdmSessionWorker *worker, + uid_t uid) +{ + g_autoptr(GStrvBuilder) builder = g_strv_builder_new (); + g_auto(GStrv) pam_environment = NULL; + gsize i; + + pam_environment = gdm_session_worker_get_environment (worker); + + for (i = 0; pam_environment != NULL && pam_environment[i] != NULL; i++) { + char *entry = pam_environment[i]; + char *equals = strchr (entry, '='); + + if (equals == NULL) + continue; + + *equals = '\0'; + + if (!is_reauth_environment_variable_allowed (entry, equals + 1, uid)) + continue; + + *equals = '='; + g_strv_builder_add (builder, entry); + } + + return g_strv_builder_end (builder); } static void @@ -2093,7 +2143,7 @@ if (session_pid == 0) { g_autofree char *home_dir = NULL; - const char * const * environment; + g_auto(GStrv) environment = NULL; int stdin_fd = -1, stdout_fd = -1, stderr_fd = -1; gboolean has_journald = FALSE, needs_controlling_terminal = FALSE; /* Leak the TTY into the session as stdin so that it stays open @@ -2224,10 +2274,11 @@ gdm_session_execute (worker->arguments[0], worker->arguments, - (char **) environment, TRUE); + g_clear_pointer (&environment, g_strfreev); + gdm_log_init (); g_debug ("GdmSessionWorker: child '%s' could not be started: %s", worker->arguments[0], @@ -3145,10 +3196,12 @@ GDBusMethodInvocation *invocation) { ReauthenticationRequest *request; - const char * const * environment; + g_auto(GStrv) environment = NULL; const char *address; - environment = gdm_session_worker_get_environment (worker); + /* The reauth worker runs as root, so only forward what it actually needs + * from the user session's PAM environment. */ + environment = gdm_session_worker_get_reauth_environment (worker, uid_of_caller); request = g_slice_new (ReauthenticationRequest); @@ -3161,7 +3214,7 @@ worker->display_device, worker->display_seat_id, worker->display_is_local, - environment); + (const char * const *) environment); if (session_id_of_caller != NULL && session_id_of_caller[0] != '\0') g_object_set (request->session, "session-id-of-caller", session_id_of_caller, NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gdm-51.1.1/daemon/gdm-session.c new/gdm-51.2/daemon/gdm-session.c --- old/gdm-51.1.1/daemon/gdm-session.c 2026-10-20 11:36:36.000000000 +0200 +++ new/gdm-51.2/daemon/gdm-session.c 2026-11-24 19:11:15.000000000 +0100 @@ -334,19 +334,21 @@ service_name, conversation->worker_pid); - switch (self->verification_mode) { - case GDM_SESSION_VERIFICATION_MODE_LOGIN: - gdm_session_open_session (self, service_name); - break; - case GDM_SESSION_VERIFICATION_MODE_REAUTHENTICATE: - if (self->user_verifier_interface != NULL) { - gdm_dbus_user_verifier_emit_verification_complete (self->user_verifier_interface, - service_name); - g_signal_emit (self, signals[VERIFICATION_COMPLETE], 0, service_name); + if (g_hash_table_lookup (self->conversations, service_name) == conversation) { + switch (self->verification_mode) { + case GDM_SESSION_VERIFICATION_MODE_LOGIN: + gdm_session_open_session (self, service_name); + break; + case GDM_SESSION_VERIFICATION_MODE_REAUTHENTICATE: + if (self->user_verifier_interface != NULL) { + gdm_dbus_user_verifier_emit_verification_complete (self->user_verifier_interface, + service_name); + g_signal_emit (self, signals[VERIFICATION_COMPLETE], 0, service_name); + } + break; + default: + break; } - break; - default: - break; } } else { report_and_stop_conversation (self, service_name, error); @@ -1031,6 +1033,11 @@ gdm_session_select_user (self, (strlen (username) > 0) ? g_strdup (username) : NULL); gdm_session_defaults_changed (self); + + if (self->greeter_interface != NULL) { + gdm_dbus_greeter_emit_selected_user_changed (self->greeter_interface, + username); + } } static void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gdm-51.1.1/daemon/main.c new/gdm-51.2/daemon/main.c --- old/gdm-51.1.1/daemon/main.c 2026-10-20 11:36:36.000000000 +0200 +++ new/gdm-51.2/daemon/main.c 2026-11-24 19:11:15.000000000 +0100 @@ -315,26 +315,7 @@ const char *name, gpointer user_data) { - gboolean remote_login_enabled; - gboolean show_local_greeter; - - manager = gdm_manager_new (); - if (manager == NULL) { - g_warning ("Could not construct manager object"); - exit (EXIT_FAILURE); - } - g_debug ("Successfully connected to D-Bus"); - - show_local_greeter = TRUE; - gdm_settings_direct_get_boolean (GDM_KEY_SHOW_LOCAL_GREETER, &show_local_greeter); - gdm_manager_set_show_local_greeter (manager, show_local_greeter); - - remote_login_enabled = FALSE; - gdm_settings_direct_get_boolean (GDM_KEY_REMOTE_LOGIN_ENABLE, &remote_login_enabled); - gdm_manager_set_remote_login_enabled (manager, remote_login_enabled); - - gdm_manager_start (manager); } static void @@ -352,6 +333,8 @@ { GDBusConnection *bus; gboolean ret; + gboolean remote_login_enabled; + gboolean show_local_greeter; ret = TRUE; @@ -360,6 +343,22 @@ goto out; } + manager = gdm_manager_new (); + if (manager == NULL) { + g_warning ("Could not construct manager object"); + exit (EXIT_FAILURE); + } + + show_local_greeter = TRUE; + gdm_settings_direct_get_boolean (GDM_KEY_SHOW_LOCAL_GREETER, &show_local_greeter); + gdm_manager_set_show_local_greeter (manager, show_local_greeter); + + remote_login_enabled = FALSE; + gdm_settings_direct_get_boolean (GDM_KEY_REMOTE_LOGIN_ENABLE, &remote_login_enabled); + gdm_manager_set_remote_login_enabled (manager, remote_login_enabled); + + gdm_manager_start (manager); + name_id = g_bus_own_name_on_connection (bus, GDM_DBUS_NAME, G_BUS_NAME_OWNER_FLAGS_NONE, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gdm-51.1.1/data/gdm.service.in new/gdm-51.2/data/gdm.service.in --- old/gdm-51.1.1/data/gdm.service.in 2026-10-20 11:36:36.000000000 +0200 +++ new/gdm-51.2/data/gdm.service.in 2026-11-24 19:11:15.000000000 +0100 @@ -15,6 +15,10 @@ # plymouth is quit, which we do) After=rc-local.service plymouth-start.service systemd-user-sessions.service +# GDM lists users through accountsservice, so stop it before +# accounts-daemon at shutdown +After=accounts-daemon.service + # GDM takes responsibility for stopping plymouth, so if it fails # for any reason, make sure plymouth still stops OnFailure=plymouth-quit.service diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gdm-51.1.1/data/pam-arch/gdm-autologin.pam new/gdm-51.2/data/pam-arch/gdm-autologin.pam --- old/gdm-51.1.1/data/pam-arch/gdm-autologin.pam 2026-10-20 11:36:36.000000000 +0200 +++ new/gdm-51.2/data/pam-arch/gdm-autologin.pam 2026-11-24 19:11:15.000000000 +0100 @@ -4,7 +4,7 @@ auth requisite pam_nologin.so auth optional pam_permit.so auth required pam_env.so -auth [success=ok default=1] pam_gdm.so +auth [success=ok default=2] pam_gdm.so -auth optional pam_gnome_keyring.so -auth optional pam_oo7.so diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gdm-51.1.1/data/pam-arch/gdm-fingerprint.pam new/gdm-51.2/data/pam-arch/gdm-fingerprint.pam --- old/gdm-51.1.1/data/pam-arch/gdm-fingerprint.pam 2026-10-20 11:36:36.000000000 +0200 +++ new/gdm-51.2/data/pam-arch/gdm-fingerprint.pam 2026-11-24 19:11:15.000000000 +0100 @@ -6,7 +6,7 @@ auth required pam_fprintd.so auth optional pam_permit.so auth required pam_env.so -auth [success=ok default=1] pam_gdm.so +auth [success=ok default=2] pam_gdm.so -auth optional pam_gnome_keyring.so -auth optional pam_oo7.so diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gdm-51.1.1/data/pam-arch/gdm-smartcard.pam new/gdm-51.2/data/pam-arch/gdm-smartcard.pam --- old/gdm-51.1.1/data/pam-arch/gdm-smartcard.pam 2026-10-20 11:36:36.000000000 +0200 +++ new/gdm-51.2/data/pam-arch/gdm-smartcard.pam 2026-11-24 19:11:15.000000000 +0100 @@ -6,7 +6,7 @@ auth required pam_shells.so auth optional pam_permit.so auth required pam_env.so -auth [success=ok default=1] pam_gdm.so +auth [success=ok default=2] pam_gdm.so -auth optional pam_gnome_keyring.so -auth optional pam_oo7.so diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gdm-51.1.1/data/pam-redhat/gdm-autologin.pam new/gdm-51.2/data/pam-redhat/gdm-autologin.pam --- old/gdm-51.1.1/data/pam-redhat/gdm-autologin.pam 2026-10-20 11:36:36.000000000 +0200 +++ new/gdm-51.2/data/pam-redhat/gdm-autologin.pam 2026-11-24 19:11:15.000000000 +0100 @@ -1,5 +1,5 @@ #%PAM-1.0 -auth [success=ok default=1] pam_gdm.so +auth [success=ok default=2] pam_gdm.so -auth optional pam_gnome_keyring.so -auth optional pam_oo7.so auth sufficient pam_permit.so diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gdm-51.1.1/meson.build new/gdm-51.2/meson.build --- old/gdm-51.1.1/meson.build 2026-10-20 11:36:36.000000000 +0200 +++ new/gdm-51.2/meson.build 2026-11-24 19:11:15.000000000 +0100 @@ -1,5 +1,5 @@ project('gdm', 'c', - version: '51.1.1', + version: '51.2', license: 'GPL2+', meson_version: '>= 0.57', ) ++++++ gdm-fix-tty1-mode.patch ++++++ --- /var/tmp/diff_new_pack.ha5GmV/_old 2026-11-27 19:41:17.557442951 +0100 +++ /var/tmp/diff_new_pack.ha5GmV/_new 2026-11-27 19:41:17.566443325 +0100 @@ -1,8 +1,8 @@ -diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c -index ac6bf69..18c412f 100644 ---- a/daemon/gdm-session-worker.c -+++ b/daemon/gdm-session-worker.c -@@ -1013,9 +1013,37 @@ fix_terminal_vt_mode (GdmSessionWorker *worker, +Index: gdm-51.2/daemon/gdm-session-worker.c +=================================================================== +--- gdm-51.2.orig/daemon/gdm-session-worker.c ++++ gdm-51.2/daemon/gdm-session-worker.c +@@ -1060,9 +1060,37 @@ fix_terminal_vt_mode (GdmSessionWorker int tty_fd) { struct vt_mode getmode_reply = { 0 }; @@ -37,7 +37,7 @@ + mode_fixed = TRUE; + goto out; + } - + if (ioctl (tty_fd, VT_GETMODE, &getmode_reply) < 0) { g_debug ("GdmSessionWorker: couldn't query VT mode: %m"); ++++++ gdm-initial-setup-hardening.patch ++++++ --- /var/tmp/diff_new_pack.ha5GmV/_old 2026-11-27 19:41:17.592444407 +0100 +++ /var/tmp/diff_new_pack.ha5GmV/_new 2026-11-27 19:41:17.600444740 +0100 @@ -1,14 +1,14 @@ -Index: gdm-51.0/daemon/gdm-display.c +Index: gdm-51.2/daemon/gdm-display.c =================================================================== ---- gdm-51.0.orig/daemon/gdm-display.c -+++ gdm-51.0/daemon/gdm-display.c -@@ -1083,12 +1083,12 @@ can_create_environment (const char *sess - return session_exists; +--- gdm-51.2.orig/daemon/gdm-display.c ++++ gdm-51.2/daemon/gdm-display.c +@@ -1127,12 +1127,12 @@ can_create_environment (const char *sess + return FALSE; } - + -#define ALREADY_RAN_INITIAL_SETUP_ON_THIS_BOOT GDM_RUN_DIR "/gdm.ran-initial-setup" +#define BLOCK_INITIAL_SETUP LOCALSTATEDIR "/lib/gdm/block-initial-setup" - + static gboolean -already_done_initial_setup_on_this_boot (void) +already_done_initial_setup (void) @@ -16,42 +16,42 @@ - if (g_file_test (ALREADY_RAN_INITIAL_SETUP_ON_THIS_BOOT, G_FILE_TEST_EXISTS)) + if (g_file_test (BLOCK_INITIAL_SETUP, G_FILE_TEST_EXISTS)) return TRUE; - + return FALSE; -@@ -1170,7 +1170,7 @@ wants_initial_setup (GdmDisplay *self) - +@@ -1214,7 +1214,7 @@ wants_initial_setup (GdmDisplay *self) + priv = gdm_display_get_instance_private (self); - + - if (already_done_initial_setup_on_this_boot ()) { + if (already_done_initial_setup ()) { return FALSE; } - -Index: gdm-51.0/daemon/gdm-manager.c + +Index: gdm-51.2/daemon/gdm-manager.c =================================================================== ---- gdm-51.0.orig/daemon/gdm-manager.c -+++ gdm-51.0/daemon/gdm-manager.c +--- gdm-51.2.orig/daemon/gdm-manager.c ++++ gdm-51.2/daemon/gdm-manager.c @@ -61,7 +61,7 @@ #define GDM_MANAGER_PATH GDM_DBUS_PATH "/Manager" #define GDM_MANAGER_DISPLAYS_PATH GDM_DBUS_PATH "/Displays" - + -#define ALREADY_RAN_INITIAL_SETUP_ON_THIS_BOOT GDM_RUN_DIR "/gdm.ran-initial-setup" +#define BLOCK_INITIAL_SETUP LOCALSTATEDIR "/lib/gdm/block-initial-setup" #define INITIAL_SETUP_EXPORT_DIR GDM_RUN_DIR "/gnome-initial-setup" - + static GQuark gdm_display_user_session_quark; -@@ -1605,6 +1605,7 @@ on_start_user_session (StartUserSessionO +@@ -1643,6 +1643,7 @@ on_start_user_session (StartUserSessionO const char *session_id; gboolean doing_initial_setup = FALSE; uid_t allowed_uid; + int fd = -1; - - g_debug ("GdmManager: start or jump to session"); - -@@ -1634,22 +1635,20 @@ on_start_user_session (StartUserSessionO + + g_debug ("GdmManager: start session"); + +@@ -1655,22 +1656,20 @@ on_start_user_session (StartUserSessionO "doing-initial-setup", &doing_initial_setup, NULL); - + + fd = open(BLOCK_INITIAL_SETUP, O_RDONLY|O_CREAT|O_EXCL|O_NOFOLLOW|O_CLOEXEC, 0644); + if (fd == -1 && errno != EEXIST) { + g_warning ("GdmDisplay: Could not write initial-setup-done marker to %s: %s", @@ -81,12 +81,12 @@ } else { g_debug ("GdmManager: session has its display server, reusing our server for another login screen"); } -Index: gdm-51.0/daemon/meson.build +Index: gdm-51.2/daemon/meson.build =================================================================== ---- gdm-51.0.orig/daemon/meson.build -+++ gdm-51.0/daemon/meson.build +--- gdm-51.2.orig/daemon/meson.build ++++ gdm-51.2/daemon/meson.build @@ -215,6 +215,7 @@ endif - + gdm_daemon = executable('gdm', [ gdm_daemon_sources, gdm_daemon_gen_sources ], + c_args: '-DLOCALSTATEDIR="'+get_option('localstatedir')+'"', ++++++ gdm-service-keytable.patch ++++++ --- /var/tmp/diff_new_pack.ha5GmV/_old 2026-11-27 19:41:17.644446570 +0100 +++ /var/tmp/diff_new_pack.ha5GmV/_new 2026-11-27 19:41:17.652446903 +0100 @@ -1,10 +1,10 @@ -Index: gdm-48.0/data/gdm.service.in +Index: gdm-51.2/data/gdm.service.in =================================================================== ---- gdm-48.0.orig/data/gdm.service.in -+++ gdm-48.0/data/gdm.service.in -@@ -20,6 +20,7 @@ After=rc-local.service plymouth-start.se +--- gdm-51.2.orig/data/gdm.service.in ++++ gdm-51.2/data/gdm.service.in +@@ -24,6 +24,7 @@ After=accounts-daemon.service OnFailure=plymouth-quit.service - + [Service] +ExecStartPre=-/usr/libexec/gdm/keytable ExecStart=${sbindir}/gdm ++++++ gdm-sysconfig-settings.patch ++++++ --- /var/tmp/diff_new_pack.ha5GmV/_old 2026-11-27 19:41:17.762451479 +0100 +++ /var/tmp/diff_new_pack.ha5GmV/_new 2026-11-27 19:41:17.768451729 +0100 @@ -1,7 +1,7 @@ -Index: gdm-50.beta/common/gdm-settings-system-backend.c +Index: gdm-51.2/common/gdm-settings-system-backend.c =================================================================== --- /dev/null -+++ gdm-50.beta/common/gdm-settings-system-backend.c ++++ gdm-51.2/common/gdm-settings-system-backend.c @@ -0,0 +1,339 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * @@ -342,10 +342,10 @@ + + return GDM_SETTINGS_BACKEND (object); +} -Index: gdm-50.beta/common/gdm-settings-system-backend.h +Index: gdm-51.2/common/gdm-settings-system-backend.h =================================================================== --- /dev/null -+++ gdm-50.beta/common/gdm-settings-system-backend.h ++++ gdm-51.2/common/gdm-settings-system-backend.h @@ -0,0 +1,56 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * @@ -403,22 +403,22 @@ +G_END_DECLS + +#endif /* __GDM_SETTINGS_SYSTEM_BACKEND_H */ -Index: gdm-50.beta/common/gdm-settings.c +Index: gdm-51.2/common/gdm-settings.c =================================================================== ---- gdm-50.beta.orig/common/gdm-settings.c -+++ gdm-50.beta/common/gdm-settings.c +--- gdm-51.2.orig/common/gdm-settings.c ++++ gdm-51.2/common/gdm-settings.c @@ -38,6 +38,7 @@ #include "gdm-settings.h" - + #include "gdm-settings-desktop-backend.h" +#include "gdm-settings-system-backend.h" - + struct _GdmSettings { -@@ -203,6 +204,10 @@ gdm_settings_reload (GdmSettings *settin +@@ -205,6 +206,10 @@ gdm_settings_reload (GdmSettings *settin if (backend) settings->backends = g_list_prepend (NULL, backend); - + + backend = gdm_settings_system_backend_new (); + if (backend) + settings->backends = g_list_prepend (settings->backends, backend); @@ -426,10 +426,10 @@ backend = gdm_settings_desktop_backend_new (GDM_RUNTIME_CONF); if (backend) settings->backends = g_list_prepend (settings->backends, backend); -Index: gdm-50.beta/common/gdm-sysconfig.c +Index: gdm-51.2/common/gdm-sysconfig.c =================================================================== --- /dev/null -+++ gdm-50.beta/common/gdm-sysconfig.c ++++ gdm-51.2/common/gdm-sysconfig.c @@ -0,0 +1,509 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * @@ -940,10 +940,10 @@ + g_strfreev (lines); + return result; +} -Index: gdm-50.beta/common/gdm-sysconfig.h +Index: gdm-51.2/common/gdm-sysconfig.h =================================================================== --- /dev/null -+++ gdm-50.beta/common/gdm-sysconfig.h ++++ gdm-51.2/common/gdm-sysconfig.h @@ -0,0 +1,43 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * @@ -988,22 +988,22 @@ +G_END_DECLS + +#endif /* __GDM_SYSCONFIG_H */ -Index: gdm-50.beta/data/gdm.conf-custom.in +Index: gdm-51.2/data/gdm.conf-custom.in =================================================================== ---- gdm-50.beta.orig/data/gdm.conf-custom.in -+++ gdm-50.beta/data/gdm.conf-custom.in +--- gdm-51.2.orig/data/gdm.conf-custom.in ++++ gdm-51.2/data/gdm.conf-custom.in @@ -1,4 +1,7 @@ # GDM configuration storage +# +# Note: settings from /etc/sysconfig/displaymanager have a higher priority +# - + [daemon] - -Index: gdm-50.beta/common/meson.build + +Index: gdm-51.2/common/meson.build =================================================================== ---- gdm-50.beta.orig/common/meson.build -+++ gdm-50.beta/common/meson.build +--- gdm-51.2.orig/common/meson.build ++++ gdm-51.2/common/meson.build @@ -5,9 +5,11 @@ libgdmcommon_src = files( 'gdm-profile.c', 'gdm-settings-backend.c', @@ -1014,6 +1014,6 @@ 'gdm-settings.c', + 'gdm-sysconfig.c', ) - + libgdmcommon_deps = [ ++++++ gdm-timeout-for-plymouth-quit.patch ++++++ --- /var/tmp/diff_new_pack.ha5GmV/_old 2026-11-27 19:41:17.800453060 +0100 +++ /var/tmp/diff_new_pack.ha5GmV/_new 2026-11-27 19:41:17.807453352 +0100 @@ -1,18 +1,18 @@ -Index: gdm-51.1.1/daemon/gdm-manager.c +Index: gdm-51.2/daemon/gdm-manager.c =================================================================== ---- gdm-51.1.1.orig/daemon/gdm-manager.c -+++ gdm-51.1.1/daemon/gdm-manager.c +--- gdm-51.2.orig/daemon/gdm-manager.c ++++ gdm-51.2/daemon/gdm-manager.c @@ -64,6 +64,8 @@ #define BLOCK_INITIAL_SETUP LOCALSTATEDIR "/lib/gdm/block-initial-setup" #define INITIAL_SETUP_EXPORT_DIR GDM_RUN_DIR "/gnome-initial-setup" - + +#define PLYMOUTH_QUIT_TIMEOUT 20 + static GQuark gdm_display_user_session_quark; static GQuark gdm_display_reauth_pid_of_caller_quark; static GQuark gdm_session_remote_id_quark; -@@ -762,7 +764,7 @@ gdm_manager_handle_register_session (Gdm - +@@ -803,7 +805,7 @@ gdm_manager_handle_register_session (Gdm + if (display_is_local && self->plymouth_quit_timeout_id == 0) { self->plymouth_quit_timeout_id = - g_timeout_add_seconds_once (REGISTER_DISPLAY_TIMEOUT, ++++++ gdm.obsinfo ++++++ --- /var/tmp/diff_new_pack.ha5GmV/_old 2026-11-27 19:41:17.846454974 +0100 +++ /var/tmp/diff_new_pack.ha5GmV/_new 2026-11-27 19:41:17.850455140 +0100 @@ -1,5 +1,5 @@ name: gdm -version: 51.1.1 -mtime: 1792488996 -commit: d643e68963ab74564955025b554ec23cd794770d +version: 51.2 +mtime: 1795543875 +commit: 601a9510f0eba432903cf36d9c862f33041a7422
