From 9ca2cbab692f1562e01ebe206f7932d18a3a794b Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 1 Oct 2007 19:41:46 +0000 Subject: [PATCH] - xtrans-1.0.3-avoid-gethostname.patch: Don't trust gethostname() output when building networkIds for AF_UNIX sockets. Fixes application launch delays and failures when dhclient changes your hostname from under you. --- xorg-x11-xtrans-devel.spec | 9 ++++++++- xtrans-1.0.3-avoid-gethostname.patch | 11 +++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 xtrans-1.0.3-avoid-gethostname.patch diff --git a/xorg-x11-xtrans-devel.spec b/xorg-x11-xtrans-devel.spec index 552f7dd..9bbcb8a 100644 --- a/xorg-x11-xtrans-devel.spec +++ b/xorg-x11-xtrans-devel.spec @@ -6,7 +6,7 @@ Summary: X.Org X11 developmental X transport library Name: xorg-x11-xtrans-devel Version: 1.0.3 -Release: 4%{?dist} +Release: 5%{?dist} License: MIT/X11 Group: System Environment/Libraries URL: http://www.x.org @@ -14,6 +14,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Source0: ftp://ftp.x.org/pub/individual/lib/xtrans-%{version}.tar.bz2 Patch0: xtrans-1.0.3-abstract-sockets.patch +Patch1: xtrans-1.0.3-avoid-gethostname.patch BuildRequires: pkgconfig BuildRequires: xorg-x11-util-macros @@ -26,6 +27,7 @@ X.Org X11 developmental X transport library %prep %setup -q -n xtrans-%{version} %patch0 -p1 -b .abstract +%patch1 -p1 -b .my-name-is-unix %build @@ -59,6 +61,11 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/aclocal/xtrans.m4 %changelog +* Mon Oct 01 2007 Adam Jackson 1.0.3-5 +- xtrans-1.0.3-avoid-gethostname.patch: Don't trust gethostname() output + when building networkIds for AF_UNIX sockets. Fixes application launch + delays and failures when dhclient changes your hostname from under you. + * Thu Sep 20 2007 Adam Jackson 1.0.3-4 - Fix a bug in automatic port generation for abstract sockets. Fixes fast user switching, among other things. diff --git a/xtrans-1.0.3-avoid-gethostname.patch b/xtrans-1.0.3-avoid-gethostname.patch new file mode 100644 index 0000000..5d474d5 --- /dev/null +++ b/xtrans-1.0.3-avoid-gethostname.patch @@ -0,0 +1,11 @@ +diff -up xtrans-1.0.3/Xtransutil.c.jx xtrans-1.0.3/Xtransutil.c +--- xtrans-1.0.3/Xtransutil.c.jx 2006-12-06 11:08:53.000000000 -0500 ++++ xtrans-1.0.3/Xtransutil.c 2007-10-01 14:53:43.000000000 -0400 +@@ -271,6 +271,7 @@ TRANS(GetMyNetworkId) (XtransConnInfo ci + case AF_UNIX: + { + struct sockaddr_un *saddr = (struct sockaddr_un *) addr; ++ strcpy(hostnamebuf, "unix"); + networkId = (char *) xalloc (3 + strlen (transName) + + strlen (hostnamebuf) + strlen (saddr->sun_path)); + sprintf (networkId, "%s/%s:%s", transName,