summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2012-11-30 12:56:58 -0500
committerRay Strode <rstrode@redhat.com>2012-11-30 13:02:46 -0500
commit0fccf4e0671e49f6e57d0135c97344973c042b23 (patch)
treeae4773a5c41c331436040f388daba43d15020547
parent6c6e513923eb41ac7eed50faa24a2237ba6b4aa8 (diff)
downloadgdm-0fccf4e0671e49f6e57d0135c97344973c042b23.tar.gz
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
-rw-r--r--daemon/gdm-display-access-file.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/daemon/gdm-display-access-file.c b/daemon/gdm-display-access-file.c
index cff8b70b..02bd4141 100644
--- a/daemon/gdm-display-access-file.c
+++ b/daemon/gdm-display-access-file.c
@@ -438,13 +438,8 @@ _get_auth_info_for_display (GdmDisplayAccessFile *file,
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);