aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2009-12-18 15:48:20 +0000
committerPav Lucistnik <pav@FreeBSD.org>2009-12-18 15:48:20 +0000
commit56657c6492e1545a43467feb812f8b2168fc2218 (patch)
tree718373ca42eb9af6500c2187e92d53740b7ce671
parentad47657b790aa1f6bf4c6974e21cffc481997c50 (diff)
downloadports-56657c6492e1545a43467feb812f8b2168fc2218.tar.gz
ports-56657c6492e1545a43467feb812f8b2168fc2218.zip
Notes
-rw-r--r--net/torsocks/Makefile4
-rw-r--r--net/torsocks/distinfo6
-rw-r--r--net/torsocks/files/patch-configure.in52
-rw-r--r--net/torsocks/files/patch-src-dead_pool.c11
-rw-r--r--net/torsocks/files/patch-tsocks.c99
-rw-r--r--net/torsocks/files/patch-usewithtor.in126
6 files changed, 39 insertions, 259 deletions
diff --git a/net/torsocks/Makefile b/net/torsocks/Makefile
index ac44b60ec1e7..3c0a4f02f7f7 100644
--- a/net/torsocks/Makefile
+++ b/net/torsocks/Makefile
@@ -6,11 +6,11 @@
PORTNAME= torsocks
PORTVERSION= 1.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net security
MASTER_SITES= GOOGLE_CODE \
http://tor.reactor-xg.kiev.ua/files/
-DISTNAME= ${PORTNAME}-${PORTVERSION}-gamma
+DISTNAME= ${PORTNAME}-${PORTVERSION}-epsilon
MAINTAINER= andy.lavr@gmail.com
COMMENT= Most SOCKS-friendly applications way with Tor
diff --git a/net/torsocks/distinfo b/net/torsocks/distinfo
index 0991e629f985..c864038296db 100644
--- a/net/torsocks/distinfo
+++ b/net/torsocks/distinfo
@@ -1,3 +1,3 @@
-MD5 (torsocks-1.0-gamma.tar.gz) = a55f99cf78654a990d0646fc767567ca
-SHA256 (torsocks-1.0-gamma.tar.gz) = d13dbd7d97745ecac6cf3ecc3800535faa3c08f5b9b33f214e210afd7658aae6
-SIZE (torsocks-1.0-gamma.tar.gz) = 482415
+MD5 (torsocks-1.0-epsilon.tar.gz) = 5f00676da97f198f95614db6e2804f35
+SHA256 (torsocks-1.0-epsilon.tar.gz) = e5aad7362462e8f76b6de6d9e6321e2e16ad8895e1a300b6ca19d49730890814
+SIZE (torsocks-1.0-epsilon.tar.gz) = 669553
diff --git a/net/torsocks/files/patch-configure.in b/net/torsocks/files/patch-configure.in
index e8186208da7d..46a1849ca97f 100644
--- a/net/torsocks/files/patch-configure.in
+++ b/net/torsocks/files/patch-configure.in
@@ -1,5 +1,5 @@
---- configure.in.orig 2009-09-07 18:59:08.000000000 +0200
-+++ configure.in 2009-09-07 18:58:52.000000000 +0200
+--- configure.in.orig 2009-11-08 14:35:11.000000000 +0200
++++ configure.in 2009-11-13 16:49:06.984178608 +0200
@@ -123,11 +123,9 @@
dnl Checks for libraries.
dnl Replace `main' with a function in -ldl:
@@ -15,7 +15,7 @@
AC_CHECK_LIB(resolv, res_query, [ tempres="no" ],tempres="yes")
if test "$tempres" = "no"; then
-@@ -356,11 +354,13 @@
+@@ -356,8 +354,8 @@
dnl Find the correct res_querydomain prototype on this machine
AC_MSG_CHECKING(for correct res_querydomain prototype)
PROTO=
@@ -26,29 +26,20 @@
do
if test "${PROTO}" = ""; then
AC_TRY_COMPILE([
-+ #include <sys/types.h>
-+ #include <netinet/in.h>
- #include <resolv.h>
- int res_querydomain($testproto);
- ],,[PROTO="$testproto";],)
-@@ -376,12 +376,14 @@
+@@ -378,9 +376,9 @@
AC_MSG_CHECKING(for correct res_send prototype)
PROTO=
PROTO1='const char *msg, int msglen, char *answer, int anslen'
-PROTO2='const unsigned char *msg, int msglen, unsigned char *answer, int anslen'
-for testproto in "${PROTO1}" \
+- "${PROTO2}"
+PROTO2='const u_char *msg, int msglen, u_char *answer, int anslen'
+for PROTO in "${PROTO1}" \
- "${PROTO2}"
++ "${PROTO2}"
do
if test "${PROTO}" = ""; then
AC_TRY_COMPILE([
-+ #include <sys/types.h>
-+ #include <netinet/in.h>
- #include <resolv.h>
- int res_send($testproto);
- ],,[PROTO="$testproto";],)
-@@ -397,11 +399,13 @@
+@@ -401,8 +399,8 @@
dnl Find the correct res_search prototype on this machine
AC_MSG_CHECKING(for correct res_search prototype)
PROTO=
@@ -59,12 +50,7 @@
do
if test "${PROTO}" = ""; then
AC_TRY_COMPILE([
-+ #include <sys/types.h>
-+ #include <netinet/in.h>
- #include <resolv.h>
- int res_search($testproto);
- ],,[PROTO="$testproto";],)
-@@ -417,11 +421,13 @@
+@@ -423,8 +421,8 @@
dnl Find the correct res_query prototype on this machine
AC_MSG_CHECKING(for correct res_query prototype)
PROTO=
@@ -75,28 +61,12 @@
do
if test "${PROTO}" = ""; then
AC_TRY_COMPILE([
-+ #include <sys/types.h>
-+ #include <netinet/in.h>
- #include <resolv.h>
- int res_query($testproto);
- ],,[PROTO="$testproto";],)
-@@ -447,6 +453,7 @@
- do
- if test "${PROTO}" = ""; then
- AC_TRY_COMPILE([
-+ #include <sys/types.h>
- #include <sys/socket.h>
- int getpeername($testproto);
- ],,[PROTO="$testproto";],)
-@@ -462,8 +469,9 @@
+@@ -471,7 +469,7 @@
dnl Find the correct poll prototype on this machine
AC_MSG_CHECKING(for correct poll prototype)
PROTO=
-for testproto in 'struct pollfd *ufds, unsigned long nfds, int timeout' \
-- 'struct pollfd *ufds, nfds_t nfds, int timeout'
+for testproto in 'struct pollfd *ufds, u_long nfds, int timeout' \
-+ 'struct pollfd *ufds, nfds_t nfds, int timeout' \
-+ 'struct pollfd *pfd, unsigned int nfds, int timeout'
+ 'struct pollfd *ufds, nfds_t nfds, int timeout' \
+ 'struct pollfd *pfd, unsigned int nfds, int timeout'
do
- if test "${PROTO}" = ""; then
- AC_TRY_COMPILE([
diff --git a/net/torsocks/files/patch-src-dead_pool.c b/net/torsocks/files/patch-src-dead_pool.c
deleted file mode 100644
index cd67aaf51b09..000000000000
--- a/net/torsocks/files/patch-src-dead_pool.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/dead_pool.c 2009-02-07 12:00:03.000000000 +0100
-+++ src/dead_pool.c 2009-08-18 07:35:08.000000000 +0200
-@@ -725,7 +721,7 @@
- /* TODO: work out what to do with AF_INET6 requests */
-
- #ifdef HAVE_INET_ATON
-- if(inet_aton(node, &addr) == 0) {
-+ if(node && inet_aton(node, &addr) == 0 && memcmp(node,"*",1)) {
- #elif defined(HAVE_INET_ADDR)
- /* If we're stuck with inet_addr, then getaddrinfo() won't work
- properly with 255.255.255.255 (= -1). There's not much we can
diff --git a/net/torsocks/files/patch-tsocks.c b/net/torsocks/files/patch-tsocks.c
index db78500f4274..6e640a13dddd 100644
--- a/net/torsocks/files/patch-tsocks.c
+++ b/net/torsocks/files/patch-tsocks.c
@@ -1,5 +1,5 @@
---- src/tsocks.c 2009-02-07 11:48:12.000000000 +0100
-+++ src/tsocks.c 2009-08-18 07:35:08.000000000 +0200
+--- src/tsocks.c.orig 2009-11-08 14:35:11.000000000 +0200
++++ src/tsocks.c 2009-11-13 17:00:10.412574127 +0200
@@ -54,6 +54,13 @@
#define _GNU_SOURCE
#endif
@@ -14,15 +14,15 @@
/* Global configuration variables */
const char *progname = "libtorsocks"; /* Name used in err msgs */
-@@ -66,7 +73,6 @@
+@@ -62,7 +69,6 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <dlfcn.h>
+-#include <sys/types.h>
#include <sys/socket.h>
#include <string.h>
#include <strings.h>
--#include <sys/types.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
- #include <sys/poll.h>
-@@ -164,7 +164,7 @@
+@@ -163,7 +169,7 @@
void tsocks_init(void) {
#define LOAD_ERROR(s,l) { \
@@ -31,86 +31,3 @@
error = dlerror(); \
show_msg(l, "The symbol %s() was not found in any shared " \
"library. The error reported was: %s!\n", s, \
-@@ -278,9 +284,9 @@
- #ifndef ALLOW_MSG_OUTPUT
- set_log_options(-1, (char *)stderr, 0);
- #else
-- if ((env = getenv("TSOCKS_DEBUG")))
-+ if ((env = getenv("TORSOCKS_DEBUG")))
- loglevel = atoi(env);
-- if (((env = getenv("TSOCKS_DEBUG_FILE"))) && !suid)
-+ if (((env = getenv("TORSOCKS_DEBUG_FILE"))) && !suid)
- logfile = env;
- set_log_options(loglevel, logfile, 1);
- #endif
-@@ -299,7 +305,7 @@
- /* Determine the location of the config file */
- #ifdef ALLOW_ENV_CONFIG
- if (!suid)
-- conffile = getenv("TSOCKS_CONF_FILE");
-+ conffile = getenv("TORSOCKS_CONF_FILE");
- #endif
-
- /* Read in the config file */
-@@ -367,8 +373,8 @@
- /* If this a UDP socket */
- /* then we refuse it, since it is probably a DNS request */
- if ((sock_type != SOCK_STREAM)) {
-- show_msg(MSGERR, "Connection is a UDP stream, may be a "
-- "DNS request: rejecting.\n");
-+ show_msg(MSGERR, "connect: Connection is a UDP or ICMP stream, may be a "
-+ "DNS request or other form of leak: rejecting.\n");
- return -1;
- }
- #endif
-@@ -1331,20 +1337,20 @@
- nixuser = getpwuid(getuid());
-
- if (((uname = conn->path->defuser) == NULL) &&
-- ((uname = getenv("TSOCKS_USERNAME")) == NULL) &&
-+ ((uname = getenv("TORSOCKS_USERNAME")) == NULL) &&
- ((uname = (nixuser == NULL ? NULL : nixuser->pw_name)) == NULL)) {
- show_msg(MSGERR, "Could not get SOCKS username from "
- "local passwd file, torsocks.conf "
-- "or $TSOCKS_USERNAME to authenticate "
-+ "or $TORSOCKS_USERNAME to authenticate "
- "with");
- conn->state = FAILED;
- return(ECONNREFUSED);
- }
-
-- if (((upass = getenv("TSOCKS_PASSWORD")) == NULL) &&
-+ if (((upass = getenv("TORSOCKS_PASSWORD")) == NULL) &&
- ((upass = conn->path->defpass) == NULL)) {
- show_msg(MSGERR, "Need a password in torsocks.conf or "
-- "$TSOCKS_PASSWORD to authenticate with");
-+ "$TORSOCKS_PASSWORD to authenticate with");
- conn->state = FAILED;
- return(ECONNREFUSED);
- }
-@@ -1695,11 +1701,12 @@
- /* If this a UDP socket */
- /* then we refuse it, since it is probably a DNS request */
- if ((sock_type != SOCK_STREAM)) {
-- show_msg(MSGERR, "Connection is a UDP stream, may be a "
-- "DNS request: rejecting.\n");
-+ show_msg(MSGERR, "sendto: Connection is a UDP or ICMP stream, may be a "
-+ "DNS request or other form of leak: rejecting.\n");
- return -1;
- }
- #endif
-+
- return (ssize_t) realsendto(s, buf, len, flags, to, tolen);
-
- }
-@@ -1748,8 +1755,8 @@
- /* If this a UDP socket */
- /* then we refuse it, since it is probably a DNS request */
- if ((sock_type != SOCK_STREAM)) {
-- show_msg(MSGERR, "Connection is a UDP stream, may be a "
-- "DNS request: rejecting.\n");
-+ show_msg(MSGERR, "sendmsg: Connection is a UDP or ICMP stream, may be a "
-+ "DNS request or other form of leak: rejecting.\n");
- return -1;
- }
- #endif
diff --git a/net/torsocks/files/patch-usewithtor.in b/net/torsocks/files/patch-usewithtor.in
index dcd117c140ba..5b8bd331e448 100644
--- a/net/torsocks/files/patch-usewithtor.in
+++ b/net/torsocks/files/patch-usewithtor.in
@@ -1,124 +1,28 @@
---- src/usewithtor.in 2008-10-26 22:51:20.000000000 +0100
-+++ src/usewithtor.in 2009-08-18 07:35:08.000000000 +0200
-@@ -1,3 +1,4 @@
-+#! /bin/sh
+--- src/usewithtor.in.orig 2009-11-08 14:35:11.000000000 +0200
++++ src/usewithtor.in 2009-11-13 17:10:26.726475549 +0200
+@@ -1,4 +1,4 @@
+-#! /bin/sh
++#!/bin/sh
# ***************************************************************************
# * *
# * $Id: usewithtor.in,v 1.3 2008-07-06 15:17:35 hoganrobert Exp $*
-@@ -25,50 +26,84 @@
+@@ -26,8 +26,8 @@
# * Original copyright notice from tsocks source file follows: *
# ***************************************************************************
--
--#! /bin/sh
--
--# Wrapper script for use of the torsocks(8) transparent socksification library
--# See the torsocks(1) and usewithtor(1) manpages.
-+# Wrapper script for use of the tsocks(8) transparent socksification library
-+# See the tsocks(1) and torify(1) manpages.
+-# Wrapper script for use of the tsocks(8) transparent socksification library
+-# See the tsocks(1) and torify(1) manpages.
++# Wrapper script for use of the torsocks(8) transparent socksification library
++# See the torsocks(1) and torify(1) manpages.
# Copyright (c) 2004, 2006 Peter Palfrader
# Modified by Jacob Appelbaum <jacob@appelbaum.net> April 16th 2006
--# Modified by Robert Hogan <robert@roberthogan.net> March 2007
-+# Modified by Marcus Griep <marcus@griep.us> June 16 2009
+@@ -35,7 +35,7 @@
# May be distributed under the same terms as Tor itself
--# Define and ensure we have torsocks
-+# Define and ensure we have tsocks
+-# Define and ensure we have tsocks
++# Define and ensure we have torsocks
# XXX: what if we don't have which?
--TSOCKS="`which torsocks`"
--if [ ! -x "$TSOCKS" ]
--then
-- echo "$0: Can't find torsocks in PATH. Perhaps you haven't installed it?" >&2
-- exit 1
--fi
-+TORSOCKS="`which torsocks`"
-+PROG=
-+VERBOSE=
-+
-+usage () {
-+ echo "Usage: $0 [-hv] <command> [<options>...]"
-+}
-+
-+set_id () {
-+ echo "ERROR: $1 is set${2}id. usewithtor will not work on a set${2}id executable." >&2
-+ exit 1
-+}
-
- # Check for any argument list
--if [ "$#" = 0 ]
--then
-- echo "Usage: $0 <command> [<options>...]" >&2
-- exit 1
-+if [ "$#" = 0 ]; then
-+ usage >&2
-+ exit 1
- fi
--if [ "$#" = 1 ] && ( [ "$1" = "-h" ] || [ "$1" = "--help" ] )
--then
-- echo "Usage: $0 <command> [<options>...]"
-- exit 0
-+
-+while [ "$1" ]; do
-+ case "$1" in
-+ -h|--h*)
-+ usage
-+ exit 0
-+ ;;
-+ -v|--v*)
-+ VERBOSE=YesPlease
-+ shift
-+ ;;
-+ *)
-+ break;
-+ esac
-+done
-+
-+if [ -u `which "$1"` ]; then
-+ set_id $1 u
-+elif [ -g `which "$1"` ]; then
-+ set_id $1 g
- fi
-
--# Define our torsocks config file
--TSOCKS_CONF_FILE="@CONFDIR@/torsocks.conf"
--export TSOCKS_CONF_FILE
--
--# Check that we've got a torsocks config file
--if [ -r "$TSOCKS_CONF_FILE" ]
--then
-- exec torsocks "$@"
-- echo "$0: Failed to exec torsocks $@" >&2
-- exit 1
-+if [ -x "$TORSOCKS" ]; then
-+ PROG=torsocks
- else
-- echo "$0: Missing torsocks configuration file \"$TSOCKS_CONF_FILE\"." >&2
-+ echo "$0: Unable to find torsocks in PATH." >&2
-+ echo " Perhaps you haven't installed it?" >&2
- exit 1
- fi
-+
-+if [ "$VERBOSE" ]; then
-+ echo "We're armed with the following torsocks: $TORSOCKS"
-+ echo "We're attempting to use $PROG for all tor action."
-+fi
-+
-+if [ "$PROG" = "torsocks" ]; then
-+ # Define our torsocks config file
-+ TSOCKS_CONF_FILE="@CONFDIR@/torsocks.conf"
-+ export TSOCKS_CONF_FILE
-+
-+ # Check that we've got a torsocks config file
-+ if [ -r "$TSOCKS_CONF_FILE" ]; then
-+ exec torsocks "$@"
-+ else
-+ echo "$0: Missing torsocks configuration file \"$TSOCKS_CONF_FILE\" - torsocks will use defaults sensible for Tor." >&2
-+ exec torsocks "$@"
-+ fi
-+fi
-+
-+# We should have hit an exec. If we get here, we didn't exec
-+echo "$0: failed to exec $PROG $@" >&2
-+exit 1
+ TORSOCKS="`which torsocks`"
+ PROG=