[PATCH lib/libxtrans] Removing SUN specific code,let solaris create .X11-pipe with sticky bit on

Arvind Umrao arvind.umrao at oracle.com
Wed Sep 14 10:05:30 PDT 2011

In solaris, /tmp/.X11-unix/ is already created with privilege 
drwxrwxrwt(01777), there is no reason to restrict /tmp/.X11-pipe with 
drwxrwxr-x (0775). So I have removed unwanted sun specific code.

Alan told me, named pipe support was added around Solaris 2.6 when that was a much better performing transport than Unix sockets on the Solaris kernels of the time. By Solaris 10, Unix sockets had been reimplemented in the kernel to be faster, so they became the default again. In Solaris 11, we don't even have named pipe support in the libxcb library that implements X client connection code now, so the named pipes would only be accessed by code with a different libX11 or a statically linked libX11 from Solaris 2.6-9

Signed-off-by: Arvind Umrao<arvind.umrao at oracle.com>
  Xtranslcl.c |    4 ----
  1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/Xtranslcl.c b/Xtranslcl.c
index ca04e7f..239d8d2 100644
--- a/Xtranslcl.c
+++ b/Xtranslcl.c
@@ -742,15 +742,11 @@ TRANS(NAMEDOpenPipe)(const char *server_path)
      struct stat		sbuf;
      int			mode;

-#if defined(sun)&&  defined(X11_t)
-    mode = 0775;	/* Solaris requires uid or gid 0 to create X11 pipes */
      mode = 01777;
      mode = 0777;
      if (trans_mkdir(X_STREAMS_DIR, mode) == -1) {
  	PRMSG (1, "NAMEDOpenPipe: mkdir(%s) failed, errno = %d\n",
  	       X_STREAMS_DIR, errno, 0);

More information about the xorg-devel mailing list