Author: pebender
Date: Tue Jun 23 15:01:54 2009
New Revision: 5033

Added:
     
trunk/gar-minimyth/script/net/openssh/files/openssh-5.2p1-abstract_socket.patch
Modified:
    trunk/gar-minimyth/html/minimyth/document-changelog.txt
    trunk/gar-minimyth/script/net/openssh/Makefile
    trunk/gar-minimyth/script/net/openssh/checksums

Log:
- Patched net/openssh so that it uses an abstract namespace socket when
   attempting to connect to the X server.



Modified: trunk/gar-minimyth/html/minimyth/document-changelog.txt
==============================================================================
--- trunk/gar-minimyth/html/minimyth/document-changelog.txt     (original)
+++ trunk/gar-minimyth/html/minimyth/document-changelog.txt     Tue Jun 23  
15:01:54 2009
@@ -91,6 +91,8 @@
      - Patched emulators/jzintv so that the names of its debug print macros
        don't clash with some glibc extensions to posix.
      - Patched net/ntp so that it builds with glibc 2.10.
+    - Patched net/openssh so that it uses an abstract namespace socket when
+      attempting to connect to the X server.

  Removed packages
      Removed kernel-2.6.26/linux.

Modified: trunk/gar-minimyth/script/net/openssh/Makefile
==============================================================================
--- trunk/gar-minimyth/script/net/openssh/Makefile      (original)
+++ trunk/gar-minimyth/script/net/openssh/Makefile      Tue Jun 23 15:01:54 2009
@@ -4,7 +4,7 @@
  MASTER_SITES  = ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/
  MASTER_SITES += ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/old/
  DISTFILES = $(DISTNAME).tar.gz
-PATCHFILES = $(DISTNAME).patch
+PATCHFILES = $(DISTNAME)-abstract_socket.patch $(DISTNAME).patch
  LICENSE = $(GARNAME)
  $(GARNAME)_LICENSE_TEXT = $(WORKSRC)/LICENCE

@@ -31,6 +31,10 @@
        --without-pam

  include ../../gar.mk
+
+#CPPFLAGS   += -DX_UNIX_PATH=\\\"@/tmp/.X11-unix/X%u\\\"
+#CFLAGS     += -DX_UNIX_PATH=\\\"@/tmp/.X11-unix/X%u\\\"
+#CXXFLAGS   += -DX_UNIX_PATH=\\\"@/tmp/.X11-unix/X%u\\\"

  LD         := $(CC)
  LDFLAGS    := $(CFLAGS)

Modified: trunk/gar-minimyth/script/net/openssh/checksums
==============================================================================
--- trunk/gar-minimyth/script/net/openssh/checksums     (original)
+++ trunk/gar-minimyth/script/net/openssh/checksums     Tue Jun 23 15:01:54 2009
@@ -1,2 +1,3 @@
  ada79c7328a8551bdf55c95e631e7dad  download/openssh-5.2p1.tar.gz
+03b065a810047ab6b07013e7e910dff5   
download/openssh-5.2p1-abstract_socket.patch
  5ecf5a1d448ec48e73e2d2afe14c537d  download/openssh-5.2p1.patch

Added:  
trunk/gar-minimyth/script/net/openssh/files/openssh-5.2p1-abstract_socket.patch
==============================================================================
--- (empty file)
+++  
trunk/gar-minimyth/script/net/openssh/files/openssh-5.2p1-abstract_socket.patch 
 
Tue Jun 23 15:01:54 2009
@@ -0,0 +1,49 @@
+diff -Naur openssh-5.2p1-old/channels.c openssh-5.2p1-new/channels.c
+--- openssh-5.2p1-old/channels.c       2009-02-13 21:28:21.000000000 -0800
++++ openssh-5.2p1-new/channels.c       2009-06-23 14:31:45.000000000 -0700
+@@ -60,6 +60,7 @@
+ #include <termios.h>
+ #include <unistd.h>
+ #include <stdarg.h>
++#include <stddef.h>
+
+ #include "openbsd-compat/sys-queue.h"
+ #include "xmalloc.h"
+@@ -3170,6 +3171,8 @@
+ {
+       int sock;
+       struct sockaddr_un addr;
++      int abstract = 0;
++      int addrsize = 0;
+
+       sock = socket(AF_UNIX, SOCK_STREAM, 0);
+       if (sock < 0)
+@@ -3177,8 +3180,15 @@
+       memset(&addr, 0, sizeof(addr));
+       addr.sun_family = AF_UNIX;
+       strlcpy(addr.sun_path, pathname, sizeof addr.sun_path);
+-      if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) == 0)
++      addrsize = offsetof(struct sockaddr_un, sun_path) +  
strlen(addr.sun_path);
++      if (addr.sun_path[0] = '@')
++              abstract = 1;
++      if (abstract)
++              addr.sun_path[0] = '\0';
++      if (connect(sock, (struct sockaddr *)&addr, addrsize) == 0)
+               return sock;
++      if (abstract)
++              addr.sun_path[0] = '@';
+       close(sock);
+       error("connect %.100s: %.100s", addr.sun_path, strerror(errno));
+       return -1;
+diff -Naur openssh-5.2p1-old/defines.h openssh-5.2p1-new/defines.h
+--- openssh-5.2p1-old/defines.h        2009-02-01 03:19:54.000000000 -0800
++++ openssh-5.2p1-new/defines.h        2009-06-23 14:31:24.000000000 -0700
+@@ -367,7 +367,7 @@
+ #  ifdef __hpux
+ #    define X_UNIX_PATH "/var/spool/sockets/X11/%u"
+ #  else
+-#    define X_UNIX_PATH "/tmp/.X11-unix/X%u"
++#    define X_UNIX_PATH "@/tmp/.X11-unix/X%u"
+ #  endif
+ #endif /* X_UNIX_PATH */
+ #define _PATH_UNIX_X X_UNIX_PATH

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"minimyth-commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/minimyth-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to