[gdm/f18] be more tolerant of hostname changes at boot up
Ray Strode
rstrode at fedoraproject.org
Mon Dec 10 19:37:16 UTC 2012
commit 6aaccd13d1a4428522ca73b7c9043f8ac13f918b
Author: Ray Strode <rstrode at redhat.com>
Date: Mon Dec 10 14:36:52 2012 -0500
be more tolerant of hostname changes at boot up
Related: #885217
gdm.spec | 9 ++++++-
usefamilywild.patch | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 72 insertions(+), 1 deletions(-)
---
diff --git a/gdm.spec b/gdm.spec
index a4bf4cd..da6fd0b 100644
--- a/gdm.spec
+++ b/gdm.spec
@@ -9,7 +9,7 @@
Summary: The GNOME Display Manager
Name: gdm
Version: 3.6.2
-Release: 2%{?dist}
+Release: 3%{?dist}
Epoch: 1
License: GPLv2+
Group: User Interface/X
@@ -91,6 +91,8 @@ Provides: gdm-plugin-smartcard = %{epoch}:%{version}-%{release}
Obsoletes: gdm-plugin-fingerprint < 1:3.2.1
Provides: gdm-plugin-fingerprint = %{epoch}:%{version}-%{release}
+Patch0: usefamilywild.patch
+
%package libs
Summary: Client-side library to talk to gdm
Group: Development/Libraries
@@ -118,6 +120,7 @@ Development files and headers for writing GDM greeters.
%prep
%setup -q
+%patch0 -p1 -b .usefamilywild
autoreconf -i -f
intltoolize -f
@@ -346,6 +349,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
%{_libdir}/girepository-1.0/Gdm-1.0.typelib
%changelog
+* Mon Dec 10 2012 Ray Strode <rstrode at redhat.com> 3.6.2-3
+- Make Xauthority file more hostname change resistant.
+ Related: #885217
+
* Tue Nov 20 2012 Matthias Clasen <mclasen at redhat.com> - 1:3.6.2-2
- Remove patch fuzz of 999
diff --git a/usefamilywild.patch b/usefamilywild.patch
new file mode 100644
index 0000000..fa3b7c3
--- /dev/null
+++ b/usefamilywild.patch
@@ -0,0 +1,64 @@
+From affb42aff901f407502e4d2c0eb65b4f30a1275d Mon Sep 17 00:00:00 2001
+From: Ray Strode <rstrode at redhat.com>
+Date: Fri, 30 Nov 2012 12:56:58 -0500
+Subject: [PATCH] access-file: don't use FamilyLocal for auth cookie
+
+FamilyLocal is really fragile to hostname changes, so
+avoid using it when creating the initial auth cookie for
+establishing access to the X server for the slave.
+
+This commit changes the Xauthority entry to use FamilyWild
+which makes the address of the entry unimportant.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=689370
+---
+ daemon/gdm-display-access-file.c | 9 ++-------
+ 1 file changed, 2 insertions(+), 7 deletions(-)
+
+diff --git a/daemon/gdm-display-access-file.c b/daemon/gdm-display-access-file.c
+index cff8b70..02bd414 100644
+--- a/daemon/gdm-display-access-file.c
++++ b/daemon/gdm-display-access-file.c
+@@ -425,37 +425,32 @@ static void
+ _get_auth_info_for_display (GdmDisplayAccessFile *file,
+ GdmDisplay *display,
+ unsigned short *family,
+ unsigned short *address_length,
+ char **address,
+ unsigned short *number_length,
+ char **number,
+ unsigned short *name_length,
+ char **name)
+ {
+ int display_number;
+ gboolean is_local;
+
+ gdm_display_is_local (display, &is_local, NULL);
+
+ if (is_local) {
+- char localhost[HOST_NAME_MAX + 1] = "";
+- *family = FamilyLocal;
+- if (gethostname (localhost, HOST_NAME_MAX) == 0) {
+- *address = g_strdup (localhost);
+- } else {
+- *address = g_strdup ("localhost");
+- }
++ *family = FamilyWild;
++ *address = g_strdup ("localhost");
+ } else {
+ *family = FamilyWild;
+ gdm_display_get_remote_hostname (display, address, NULL);
+ }
+ *address_length = strlen (*address);
+
+ gdm_display_get_x11_display_number (display, &display_number, NULL);
+ *number = g_strdup_printf ("%d", display_number);
+ *number_length = strlen (*number);
+
+ *name = g_strdup ("MIT-MAGIC-COOKIE-1");
+ *name_length = strlen (*name);
+ }
+
+--
+1.8.0
+
More information about the scm-commits
mailing list