diff --git a/gdm-2.25.2-dont-depend-on-hostname.patch b/gdm-2.25.2-dont-depend-on-hostname.patch index dcd6bfd..1f033e8 100644 --- a/gdm-2.25.2-dont-depend-on-hostname.patch +++ b/gdm-2.25.2-dont-depend-on-hostname.patch @@ -212,14 +212,18 @@ index 19432dc..a241f73 100644 } --- a/daemon/gdm-display-access-file.c (revision 6790) +++ b/daemon/gdm-display-access-file.c (working copy) -@@ -438,8 +438,9 @@ _get_auth_info_for_display (GdmDisplayAc +@@ -438,8 +438,13 @@ _get_auth_info_for_display (GdmDisplayAc gdm_display_is_local (display, &is_local, NULL); if (is_local) { + char localhost[HOST_NAME_MAX + 1] = ""; *family = FamilyLocal; - *address = g_strdup (g_get_host_name ()); -+ *address = g_strdup (gethostname (localhost, HOST_NAME_MAX)); ++ if (gethostname (localhost, HOST_NAME_MAX) == 0) { ++ *address = g_strdup (localhost); ++ } else { ++ *address = g_strdup ("localhost"); ++ } } else { *family = FamilyWild; gdm_display_get_remote_hostname (display, address, NULL); diff --git a/gdm.spec b/gdm.spec index 4c218a3..8088d87 100644 --- a/gdm.spec +++ b/gdm.spec @@ -15,7 +15,7 @@ Summary: The GNOME Display Manager Name: gdm Version: 2.26.0 -Release: 4%{?dist} +Release: 5%{?dist} Epoch: 1 License: GPLv2+ Group: User Interface/X @@ -350,6 +350,11 @@ fi %{_datadir}/gnome-2.0/ui/GNOME_FastUserSwitchApplet.xml %changelog +* Thu Mar 19 2009 Ray Strode - 1:2.26.0-5 +- Use gethostname() _properly_ instead of g_get_host_name() when writing + out xauth files, because the hostname may change out from + under us and glib caches it. + * Thu Mar 19 2009 Ray Strode - 1:2.26.0-4 - Use gethostname() instead of g_get_host_name() when writing out xauth files, because the hostname may change out from