diff options
author | anders <anders@FreeBSD.org> | 2011-08-16 06:12:16 +0800 |
---|---|---|
committer | anders <anders@FreeBSD.org> | 2011-08-16 06:12:16 +0800 |
commit | ea043f6bc0546786aec81af966c4d2547a045257 (patch) | |
tree | 0f7c599be5a80fa94d2b5b4462495a29955b6c9a /net | |
parent | 8a9eff63ff73dc95627a842e603994edd15a1749 (diff) | |
download | freebsd-ports-gnome-ea043f6bc0546786aec81af966c4d2547a045257.tar.gz freebsd-ports-gnome-ea043f6bc0546786aec81af966c4d2547a045257.tar.zst freebsd-ports-gnome-ea043f6bc0546786aec81af966c4d2547a045257.zip |
Update to 1.3.2.
PR: 158871
Submitted by: Ralf Wenk <IZ-FreeBSD0701@hs-karlsruhe.de> (with changes)
Diffstat (limited to 'net')
-rw-r--r-- | net/dante/Makefile | 12 | ||||
-rw-r--r-- | net/dante/distinfo | 4 | ||||
-rw-r--r-- | net/dante/files/patch-configure | 99 | ||||
-rw-r--r-- | net/dante/files/patch-ltmain.sh | 10 | ||||
-rw-r--r-- | net/dante/files/patch-sockd-getifa.c | 216 | ||||
-rw-r--r-- | net/dante/pkg-plist | 4 |
6 files changed, 26 insertions, 319 deletions
diff --git a/net/dante/Makefile b/net/dante/Makefile index 4293b8788167..b2c6414fd304 100644 --- a/net/dante/Makefile +++ b/net/dante/Makefile @@ -6,12 +6,12 @@ # PORTNAME= dante -PORTVERSION= 1.1.19 -PORTREVISION= 1 +PORTVERSION= 1.3.2 CATEGORIES= net security MASTER_SITES= ftp://ftp.inet.no/pub/socks/ \ ftp://ftp.nuug.no/pub/anders/distfiles/ \ - http://atreides.freenix.no/~anders/ + http://atreides.freenix.no/~anders/ \ + ftp://ftp.inet.no/pub/socks/old/ MAINTAINER= anders@FreeBSD.org COMMENT= A circuit-level firewall/proxy @@ -28,6 +28,9 @@ USE_LDCONFIG= yes USE_RC_SUBR= sockd.sh +LICENSE= BSD + +MAN1= socksify.1 MAN5= sockd.conf.5 socks.conf.5 MAN8= sockd.8 @@ -38,8 +41,7 @@ post-install: ${INSTALL} -d -m 555 ${DOCSDIR} @${INSTALL_DATA} ${WRKSRC}/doc/README* ${DOCSDIR} @${INSTALL_DATA} ${WRKSRC}/doc/rfc* ${DOCSDIR} - @${INSTALL_DATA} ${WRKSRC}/doc/SOCKS4.protocol ${DOCSDIR} - @${INSTALL_DATA} ${WRKSRC}/doc/faq.tex ${DOCSDIR} + @${INSTALL_DATA} ${WRKSRC}/doc/SOCKS4*.protocol ${DOCSDIR} .endif .include <bsd.port.mk> diff --git a/net/dante/distinfo b/net/dante/distinfo index 5de2b163f9a3..d7666074edfd 100644 --- a/net/dante/distinfo +++ b/net/dante/distinfo @@ -1,2 +1,2 @@ -SHA256 (dante-1.1.19.tar.gz) = b49f0936282a14c41a03cd70158d1a11e6af3564a18d4b3337f291fb6dae0936 -SIZE (dante-1.1.19.tar.gz) = 895713 +SHA256 (dante-1.3.2.tar.gz) = 6b736f32ec58b899c24cf14be02491a0631a778e385314370d5dea4baf482efb +SIZE (dante-1.3.2.tar.gz) = 949049 diff --git a/net/dante/files/patch-configure b/net/dante/files/patch-configure index befcb8bb260a..89180b1a4464 100644 --- a/net/dante/files/patch-configure +++ b/net/dante/files/patch-configure @@ -1,90 +1,11 @@ -Index: configure -diff -u configure.orig configure ---- configure.orig Mon Jan 16 20:49:45 2006 -+++ configure Sun Sep 3 20:35:01 2006 -@@ -25195,6 +25195,76 @@ - #include <unistd.h> +--- configure.orig 2011-06-20 18:01:06.000000000 +0200 ++++ configure 2011-07-12 15:49:45.602728013 +0200 +@@ -33876,7 +33876,7 @@ - struct hostent * -+gethostbyaddr( const void *, int, int -+); -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" -+ || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_PROT_GETHOSTBYADDR_0 struct hostent * -+_ACEOF -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_PROT_GETHOSTBYADDR_1 const void * -+_ACEOF -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_PROT_GETHOSTBYADDR_2 int -+_ACEOF -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_PROT_GETHOSTBYADDR_3 int -+_ACEOF -+ -+ echo "$as_me:$LINENO: result: ok" >&5 -+echo "${ECHO_T}ok" >&6 -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+cat >conftest.$ac_ext <<_ACEOF -+ -+ /* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+#include <sys/types.h> -+#include <sys/socket.h> -+#include <sys/uio.h> -+#include <netdb.h> -+#include <unistd.h> -+ -+struct hostent * - gethostbyaddr( const void *, socklen_t, int - ); - int -@@ -25253,6 +25323,8 @@ - echo "$as_me:$LINENO: result: failure" >&5 - echo "${ECHO_T}failure" >&6 - failproto=t -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi + + +-for ac_header in gssapi.h gssapi/gssapi.h gssapi/gssapi_ext.h ++for ac_header in gssapi/gssapi.h gssapi/gssapi_ext.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then diff --git a/net/dante/files/patch-ltmain.sh b/net/dante/files/patch-ltmain.sh index 8eef43cc6ed0..9c3b78292e8b 100644 --- a/net/dante/files/patch-ltmain.sh +++ b/net/dante/files/patch-ltmain.sh @@ -1,14 +1,14 @@ ---- ltmain.sh.orig Wed Mar 16 21:57:42 2005 -+++ ltmain.sh Wed Mar 16 21:59:55 2005 -@@ -5540,10 +5540,12 @@ +--- ltmain.sh.orig 2008-08-12 19:06:26.000000000 +0200 ++++ ltmain.sh 2011-07-12 16:01:37.595732703 +0200 +@@ -6115,10 +6115,12 @@ fi # Install the pseudo-library for information purposes. + if /usr/bin/false; then name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i - $show "$install_prog $instname $destdir/$name" - $run eval "$install_prog $instname $destdir/$name" || exit $? + $show "$install_prog $extra_mode $instname $destdir/$name" + $run eval "$install_prog $extra_mode $instname $destdir/$name" || exit $? + fi # Maybe install the static library, too. diff --git a/net/dante/files/patch-sockd-getifa.c b/net/dante/files/patch-sockd-getifa.c deleted file mode 100644 index d6c6eecf51a3..000000000000 --- a/net/dante/files/patch-sockd-getifa.c +++ /dev/null @@ -1,216 +0,0 @@ ---- sockd/getifa.c.orig 2003-07-01 13:21:40.000000000 +0000 -+++ sockd/getifa.c 2009-01-18 23:43:40.000000000 +0000 -@@ -58,6 +58,9 @@ - * that will be selected by the OS to connect to that destination address. - *==========================================================================*/ - #include <net/route.h> /* RTA_xxx constants */ -+#if HAVE_ROUTEINFO_BSD -+#include <net/if_dl.h> -+#endif /* HAVE_ROUTEINFO_BSD */ - #if HAVE_ROUTEINFO_LINUX - #include <asm/types.h> - #include <linux/netlink.h> -@@ -233,9 +236,11 @@ - pid_t pid; - struct rt_msghdr *rtm; - struct sockaddr *sa; -+ char *cp; -+ int i; - uid_t euid; - struct in_addr inaddr_none; -- struct in_addr gwaddr; -+ struct sockaddr ifa; - - inaddr_none.s_addr = htonl(INADDR_NONE); - -@@ -256,85 +261,123 @@ - } - - /*=================================================================== -- * Do until 2 consecutive RTM_GET return the same gateway address. -- * The first calls may return router addresses in RTA_GATEWAY and -- * those will not match any local external address. -+ * Do a RTM_GET to look up the gateway for the address. -+ * Extract the RTM_IFA from it, which is the source address used -+ * on that interface. -+ * The code is modeled after the code for route(8). - *==================================================================*/ -+ /*=========================================================== -+ * Build the necessary data structures to get routing info. -+ * The structures are: -+ * rt_msghdr - Specifies RTM_GET for getting routing table -+ * info -+ * sockaddr - contains the destination address -+ * sockaddr_dl - necessary for unkown reasons. -+ *==========================================================*/ -+#define ROUNDUP(a) \ -+ ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long)) -+#define ADVANCE(x, n) (x += ROUNDUP((n)->sa_len)) -+ -+ -+ bzero(buf, sizeof(buf)); -+ rtm = (struct rt_msghdr *) buf; -+ rtm->rtm_version = RTM_VERSION; -+ rtm->rtm_type = RTM_GET; -+ rtm->rtm_flags = RTF_UP | RTF_HOST | RTF_GATEWAY | RTF_STATIC; -+ rtm->rtm_addrs = RTA_DST | RTA_IFA; -+ rtm->rtm_pid = pid = getpid(); -+ rtm->rtm_seq = SEQ; -+ -+ cp = (char *) (rtm + 1); -+ sa = (struct sockaddr *) cp; -+ /* LINTED pointer casts may be troublesome */ -+ TOIN(sa)->sin_family = AF_INET; -+ /* LINTED pointer casts may be troublesome */ -+ TOIN(sa)->sin_addr = destaddr; -+ /* LINTED pointer casts may be troublesome */ -+ TOIN(sa)->sin_port = htons(0); -+ sa->sa_len = sizeof(struct sockaddr_in); -+ ADVANCE(cp, sa); -+ sa = (struct sockaddr *) cp; -+ /* add dummy link layer address */ -+ sa->sa_family = AF_LINK; -+ sa->sa_len = sizeof(struct sockaddr_dl); -+ ADVANCE(cp, sa); -+ sa = (struct sockaddr *) cp; -+ rtm->rtm_addrs |= RTA_IFP; -+ -+ rtm->rtm_msglen = cp - buf; -+ -+ /*=========================================================== -+ * Send the request and get the response. -+ *==========================================================*/ -+ if (write(sockfd, rtm, (size_t)rtm->rtm_msglen) != rtm->rtm_msglen) { -+ swarn("%s: write() to AF_ROUTE failed", function); -+ close(sockfd); -+ return inaddr_none; -+ } -+ - do { -- /*=========================================================== -- * Build the necessary data structures to get routing info. -- * The structures are: -- * rt_msghdr - Specifies RTM_GET for getting routing table -- * info -- * sockaddr - contains the destination address -- *==========================================================*/ -- -- bzero(buf, sizeof(buf)); -- rtm = (struct rt_msghdr *) buf; -- rtm->rtm_msglen = sizeof(struct rt_msghdr) + sizeof(struct sockaddr_in); -- rtm->rtm_version = RTM_VERSION; -- rtm->rtm_type = RTM_GET; -- rtm->rtm_addrs = RTA_DST; -- rtm->rtm_pid = pid = getpid(); -- rtm->rtm_seq = SEQ; -- -- sa = (struct sockaddr *) (rtm + 1); -- /* LINTED pointer casts may be troublesome */ -- TOIN(sa)->sin_family = AF_INET; -- /* LINTED pointer casts may be troublesome */ -- TOIN(sa)->sin_addr = destaddr; -- /* LINTED pointer casts may be troublesome */ -- TOIN(sa)->sin_port = htons(0); -- -- /*=========================================================== -- * Send the request and get the response. -- *==========================================================*/ -- if (write(sockfd, rtm, (size_t)rtm->rtm_msglen) != rtm->rtm_msglen) { -- swarn("%s: write() to AF_ROUTE failed", function); -+ if (read(sockfd, rtm, sizeof(buf)) == -1) { -+ swarn("%s: read from AF_ROUTE failed", function); - close(sockfd); - return inaddr_none; - } -+ } while (rtm->rtm_type != RTM_GET || rtm->rtm_seq != SEQ -+ || rtm->rtm_pid != pid); - -- do { -- if (read(sockfd, rtm, sizeof(buf)) == -1) { -- swarn("%s: read from AF_ROUTE failed", function); -+ /*================================================================ -+ * Iterate over the address structure extracting only the relevant -+ * addresses. -+ *===============================================================*/ -+ cp = (char *) (rtm + 1); -+ sa = (struct sockaddr *) cp; -+ -+ for (i=0; (i < RTAX_MAX) && (cp < buf + sizeof(buf)); i++) { -+ switch (i) { -+ case RTAX_GATEWAY: -+ if (!(rtm->rtm_addrs & RTA_GATEWAY)) { -+ slog(LOG_DEBUG, "%s: can't find gateway for %s, using defaultexternal", -+ function, inet_ntoa(destaddr)); - close(sockfd); -- return inaddr_none; -+ return getdefaultexternal(); - } -- } while (rtm->rtm_type != RTM_GET || rtm->rtm_seq != SEQ -- || rtm->rtm_pid != pid); -- -- /*============================================================ -- * Go straight to the RTA_GATEWAY entry for our info. -- *===========================================================*/ -- sa = (struct sockaddr *) (rtm + 1); -- -- if (!(rtm->rtm_addrs & RTA_GATEWAY) -- || (sa += RTAX_GATEWAY) == NULL -- || TOIN(sa)->sin_family != AF_INET) { -- slog(LOG_DEBUG, "%s: can't find gateway for %s, using defaultexternal", -- function, inet_ntoa(destaddr)); -- close(sockfd); -- return getdefaultexternal(); -+ break; -+ case RTAX_IFA: -+ if (!(rtm->rtm_addrs & RTA_IFA) -+ || TOIN(sa)->sin_family != AF_INET) { -+ slog(LOG_DEBUG, "%s: can't find ifa for %s, using defaultexternal", -+ function, inet_ntoa(destaddr)); -+ close(sockfd); -+ return getdefaultexternal(); -+ } -+ else { -+ memcpy((void*)&ifa, (void*)sa, sa->sa_len); -+ } -+ break; -+ } -+ if (rtm->rtm_addrs & (1<<i)) { -+ ADVANCE(cp, sa); -+ sa = (struct sockaddr *)cp; - } -+#undef ROUNDUP -+#undef ADVANCE - -- gwaddr.s_addr = destaddr.s_addr; -- destaddr.s_addr = TOIN(sa)->sin_addr.s_addr; -- } while (destaddr.s_addr != gwaddr.s_addr); -+ } - - close(sockfd); - -- if (!isonexternal(sa)) { -+ if (!isonexternal(&ifa)) { - char a[MAXSOCKADDRSTRING]; - - swarnx("%s: address %s selected, but not set for external interface", -- function, sockaddr2string(sa, a, sizeof(a))); -+ function, sockaddr2string(&ifa, a, sizeof(a))); - - return getdefaultexternal(); - } - - /* LINTED pointer casts may be troublesome */ -- return TOIN(sa)->sin_addr; -+ return TOIN(&ifa)->sin_addr; - } - - #else /* HAVE_ROUTEINFO_BSD */ -@@ -393,7 +436,7 @@ - struct sockaddr check; - int match = 0; - -- switch ((*sockscf.external.addrv).atype) { -+ switch (sockscf.external.addrv[i].atype) { - case SOCKS_ADDR_IFNAME: { - int ifi; - diff --git a/net/dante/pkg-plist b/net/dante/pkg-plist index 056eeb98a195..c7cb15122809 100644 --- a/net/dante/pkg-plist +++ b/net/dante/pkg-plist @@ -4,7 +4,6 @@ etc/sockd.conf.example etc/socks.conf.example include/socks.h lib/libdsocks.so -lib/libdsocks.so.1 lib/libsocks.a lib/libsocks.so lib/libsocks.so.1 @@ -13,7 +12,8 @@ sbin/sockd %%PORTDOCS%%%%DOCSDIR%%/README.survey %%PORTDOCS%%%%DOCSDIR%%/README.usage %%PORTDOCS%%%%DOCSDIR%%/SOCKS4.protocol +%%PORTDOCS%%%%DOCSDIR%%/SOCKS4A.protocol %%PORTDOCS%%%%DOCSDIR%%/rfc1928.txt %%PORTDOCS%%%%DOCSDIR%%/rfc1929.txt -%%PORTDOCS%%%%DOCSDIR%%/faq.tex +%%PORTDOCS%%%%DOCSDIR%%/rfc1961.txt %%PORTDOCS%%@dirrm %%DOCSDIR%% |