[PATCH lib/libxtrans] Removing SUN specific code, let solaris create .X11-pipe with sticky bit on
Jeremy Huddleston
jeremyhu at apple.com
Thu Sep 15 00:38:58 PDT 2011
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
On Sep 14, 2011, at 12:05 PM, Arvind Umrao wrote:
> 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 */
> -#else
> #ifdef HAS_STICKY_DIR_BIT
> mode = 01777;
> #else
> mode = 0777;
> #endif
> -#endif
> if (trans_mkdir(X_STREAMS_DIR, mode) == -1) {
> PRMSG (1, "NAMEDOpenPipe: mkdir(%s) failed, errno = %d\n",
> X_STREAMS_DIR, errno, 0);
> --
> 1.7.6
>
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
More information about the xorg-devel
mailing list