You do not need to mkdir for abstract sockets. Don't bail if it fails.

Heck, don't even try. (#445303)
This commit is contained in:
Bill Nottingham 2008-05-06 18:07:08 +00:00
parent 4e9f9c54c1
commit 64a2583809
2 changed files with 17 additions and 0 deletions

View File

@ -26,6 +26,7 @@ X.Org X11 developmental X transport library
%prep
%setup -q -n xtrans-%{version}
%patch1 -p1 -b .my-name-is-unix
%patch2 -p1 -b .abstract-doesn't-need-mkdir
%build
@ -59,6 +60,10 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/aclocal/xtrans.m4
%changelog
* Tue May 06 2008 Bill Nottingham <notting@redhat.com> 1.1-2
- xtrans-1.1-abstract.patch: Don't worry about making /tmp/.X11-unix
(or failure to do so) if you're using an abstract socket (#445303)
* Wed Mar 05 2008 Adam Jackson <ajax@redhat.com> 1.1-1
- xtrans 1.1

12
xtrans-1.1-abstract.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up xtrans-1.1/Xtranssock.c.foo xtrans-1.1/Xtranssock.c
--- xtrans-1.1/Xtranssock.c.foo 2008-05-06 13:48:07.000000000 -0400
+++ xtrans-1.1/Xtranssock.c 2008-05-06 13:47:51.000000000 -0400
@@ -1148,7 +1148,7 @@ TRANS(SocketUNIXCreateListener) (XtransC
#else
mode = 0777;
#endif
- if (trans_mkdir(UNIX_DIR, mode) == -1) {
+ if (!abstract && trans_mkdir(UNIX_DIR, mode) == -1) {
PRMSG (1, "SocketUNIXCreateListener: mkdir(%s) failed, errno = %d\n",
UNIX_DIR, errno, 0);
(void) umask (oldUmask);