tsocks (1.8beta5-9.1) debian-dir only changes

Summary

 debian/README.debian                    |   11 +
 debian/changelog                        |  147 +++++++++++++++++
 debian/compat                           |    1 
 debian/control                          |   18 ++
 debian/copyright                        |   27 +++
 debian/dirs                             |    1 
 debian/patches/00list                   |    6 
 debian/patches/01_symbolexport.dpatch   |   83 +++++++++
 debian/patches/02_hyphenfix.dpatch      |  134 +++++++++++++++
 debian/patches/03_fixloop.dpatch        |   21 ++
 debian/patches/04_getpeername.dpatch    |  274 ++++++++++++++++++++++++++++++++
 debian/patches/05_config_in_home.dpatch |   43 +++++
 debian/patches/06_fallback.dpatch       |  104 ++++++++++++
 debian/plus/saveme.8                    |   15 +
 debian/plus/tsocks                      |   89 ++++++++++
 debian/plus/tsocks.1                    |   51 +++++
 debian/rules                            |  110 ++++++++++++
 debian/tsocks.manpages                  |    4 
 debian/undocumented                     |    2 
 19 files changed, 1141 insertions(+)

    
download this patch

Patch contents

--- tsocks-1.8beta5.orig/debian/copyright
+++ tsocks-1.8beta5/debian/copyright
@@ -0,0 +1,27 @@
+This package was debianized by Tamas SZERB <toma@rulez.org> on
+Sun, 15 Jul 2001 11:03:59 +0200.
+
+It was downloaded from http://tsocks.sourceforge.net/
+
+Upstream Author: Shaun Clowes <delius@progsoc.uts.edu.au>
+
+Copyright: Copyright (C) 2000 Shaun Clowes <delius@progsoc.uts.edu.au>
+
+License:
+
+   This package is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; version 2 dated June, 1991.
+
+   This package is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this package; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin St, Fifth Floor, Boston,
+   MA 02110-1301, USA.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
--- tsocks-1.8beta5.orig/debian/undocumented
+++ tsocks-1.8beta5/debian/undocumented
@@ -0,0 +1,2 @@
+inspectsocks.8
+validateconf.8
--- tsocks-1.8beta5.orig/debian/rules
+++ tsocks-1.8beta5/debian/rules
@@ -0,0 +1,110 @@
+#!/usr/bin/make -f
+# Made with the aid of debmake, by Christoph Lameter,
+# based on the sample debian/rules file for GNU hello by Ian Jackson.
+
+package=tsocks
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+include /usr/share/dpatch/dpatch.make
+
+build: patch build-stamp
+build-stamp:
+	dh_testdir
+	-rm -f config.cache config.status .ChangeLog.swp
+	cp /usr/share/misc/config.guess .
+	cp /usr/share/misc/config.sub .
+	./configure --prefix=/usr \
+		--libdir=/usr/lib \
+		--mandir=/usr/share/man \
+		--with-conf=/etc/tsocks.conf \
+		--enable-hostnames \
+		#--enable-socksdns \
+
+	$(MAKE) CFLAGS="-O2 -g -Wall"
+	touch build-stamp
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp install-stamp config.status config.guess
+	[ ! -f Makefile ] || $(MAKE) distclean
+	-rm -f `find . -name "*~"`
+	-rm -rf debian/$(package) debian/files* core debian/*substvars
+	#-rm -rf debian/plus/tsocks.8*
+	#-rm -rf debian/conffiles
+	dh_clean
+
+install: install-stamp
+install-stamp: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+
+	dh_installdirs
+
+	$(MAKE) install prefix=$(CURDIR)/debian/$(package)/usr \
+	libdir=$(CURDIR)/debian/$(package)/usr/lib \
+	mandir=$(CURDIR)/debian/$(package)/usr/share/man
+
+	install -m 600 tsocks.conf.complex.example $(CURDIR)/debian/$(package)/etc/tsocks.conf
+	install validateconf $(CURDIR)/debian/$(package)/usr/bin
+	install inspectsocks $(CURDIR)/debian/$(package)/usr/bin
+	install saveme $(CURDIR)/debian/$(package)/usr/bin
+	#in the upstream now:
+	#rm -f $(CURDIR)/debian/$(package)/usr/bin/tsocks
+	install -m 755 $(CURDIR)/debian/plus/tsocks $(CURDIR)/debian/$(package)/usr/bin
+	touch install-stamp
+
+binary-indep: build install
+
+# There are no architecture-independent files to be uploaded
+# generated by this package.  If there were any they would be
+# made here.
+
+binary-arch: build install
+#	-rm -rf debian/$(package)
+	dh_testroot
+	dh_testdir
+
+#	dpkg-gencontrol -isp
+	dh_undocumented
+	dh_installdocs
+
+	#dh_installdebconf
+
+#how to solve that with dh_installman? (buggy manpage replacing)
+	#rm -f $(CURDIR)/debian/$(package)/usr/share/man/man8/tsocks.8
+	##in the upstream now:
+	##sed s:/lib/:/usr/lib/:g $(CURDIR)/tsocks.8 > $(CURDIR)/debian/plus/tsocks.8
+	###dh_compress $(CURDIR)/debian/plus/tsocks.8
+	###dh_compress $(CURDIR)/debian/plus/tsocks.1
+	#install -o root -g root $(CURDIR)/debian/plus/tsocks.8 $(CURDIR)/debian/$(package)/usr/share/man/man8/
+	install -o root -g root $(CURDIR)/debian/plus/tsocks.1 $(CURDIR)/debian/$(package)/usr/share/man/man1/
+	install -o root -g root $(CURDIR)/debian/plus/saveme.8 $(CURDIR)/debian/$(package)/usr/share/man/man8/
+	dh_installman
+
+	dh_installchangelogs ChangeLog upstream
+	dh_installchangelogs
+	dh_link
+	dh_strip
+
+	dh_compress
+
+	dh_fixperms
+	dh_makeshlibs
+
+	#create conffiles automagically:
+	#find $(CURDIR)/debian/$(package)/etc -type f|sed s:$(CURDIR)/debian/$(package):: >$(CURDIR)/debian/conffiles
+	dh_installdeb
+
+	dh_shlibdeps
+	dh_gencontrol
+
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+
+.PHONY: build clean binary-indep binary-arch binary install
--- tsocks-1.8beta5.orig/debian/README.debian
+++ tsocks-1.8beta5/debian/README.debian
@@ -0,0 +1,11 @@
+tsocks for Debian
+----------------------
+
+
+	- libtsocks.so - the libtsocks library
+	- validateconf - a utility to verify the tsocks configuration file
+	- inspectsocks - a utility to determine the version of a socks server
+	- saveme - a statically linked utility to remove /etc/ld.so.preload
+		   if it becomes corrupt
+
+Tamas SZERB <toma@rulez.org>, Sun, 15 Jul 2001 11:03:59 +0200
--- tsocks-1.8beta5.orig/debian/tsocks.manpages
+++ tsocks-1.8beta5/debian/tsocks.manpages
@@ -0,0 +1,4 @@
+debian/plus/tsocks.1
+debian/plus/saveme.8
+tsocks.8
+tsocks.conf.5
--- tsocks-1.8beta5.orig/debian/dirs
+++ tsocks-1.8beta5/debian/dirs
@@ -0,0 +1 @@
+etc
--- tsocks-1.8beta5.orig/debian/changelog
+++ tsocks-1.8beta5/debian/changelog
@@ -0,0 +1,147 @@
+tsocks (1.8beta5-9.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix bashism in debian/rules (Closes: #478633)
+  * Bump Standards-Version to 3.8.0.
+
+ -- Chris Lamb <chris@chris-lamb.co.uk>  Sat, 07 Jun 2008 21:50:24 +0100
+
+tsocks (1.8beta5-9) unstable; urgency=low
+
+  * Applied `fallback' patch to allow to fall back to establish
+    direct connection instead of sockified if the fallback = yes
+    option found in the tsocks.conf to make sure that the user
+    won't open a direct one accidentally. (Closes: #471112)
+
+ -- Tamas SZERB <toma@rulez.org>  Sun, 16 Mar 2008 13:04:44 +0100
+
+tsocks (1.8beta5-8) unstable; urgency=low
+
+  * Applied Viktor Radnai's patch to fall back to real connect if there is no default server
+    specified. Sam patch request from Joachim Breitner (Closes: #373642).
+
+ -- Tamas SZERB <toma@rulez.org>  Sat, 15 Mar 2008 12:03:56 +0100
+
+tsocks (1.8beta5-7) unstable; urgency=low
+
+  * Switch to compat level 6 as it the recommend level now and move
+    this from rules to the compat file.
+  * Switch from Homepage tag to Homepage control field.
+  * Bump standards version to 3.7.3, no changes needed.
+  * Include patch (05_config_in_home.dpatch) by Reinhard Tartler
+    to make sure that tsocks looks for tsocks.conf in the user
+    home directory first (Closes: #465325).
+  * Fix debian-rules-ignores-make-clean-error lintian warning.
+
+ -- Nico Golde <nion@debian.org>  Mon, 03 Mar 2008 13:54:19 +0100
+
+tsocks (1.8beta5-6) unstable; urgency=low
+
+  * Integrated two patches by Peter Palfrader to fix
+    an infinite loop if recv returns 0 and to intercept
+    getpeername (Closes: #240429, #239025).
+  * Removed everything except etc from dirs since
+    the directories are created by Makefile.
+
+ -- Nico Golde <nion@debian.org>  Mon, 02 Apr 2007 20:08:32 +0200
+
+tsocks (1.8beta5-5) unstable; urgency=low
+
+  * Corrected Homepage tag.
+
+ -- Nico Golde <nion@debian.org>  Fri, 30 Mar 2007 13:27:10 +0200
+
+tsocks (1.8beta5-4) unstable; urgency=low
+
+  * Added myself to uploaders (Closes: #387473).
+  * Bumped compat level.
+  * Conformed to Standards version 3.7.2.
+  * Added Homepage tag to control.
+  * Fixed broken copyright file.
+  * Use $(CURDIR) instead of `pwd` in rules.
+  * Added dependency on dpatch.
+  * Included patch by Kapil Hari Paranjape to prevent
+    export of specific symbol (Closes: #278906, #134729)
+  * Fix hyphens in manpage (Closes: #295568).
+  * Added saveme manpage (Closes: #316024).
+  * Removed conffiles, not needed anymore.
+
+ -- Nico Golde <nion@debian.org>  Fri, 30 Mar 2007 10:45:19 +0200
+
+tsocks (1.8beta5-3) unstable; urgency=low
+
+  * TSOCKS_CONFFILE -> TSOCKS_CONF_FILE manpage bug (closes: #311805)
+
+ -- Tamas SZERB <toma@rulez.org>  Tue, 10 Oct 2006 20:48:35 +0200
+
+tsocks (1.8beta5-2) unstable; urgency=low
+
+  * Not using socks server for name resolution
+    --enable-socksdns removed. (closes: #233051, #175011, #184654, #204948)
+  * debconf not needed, because it will have an user defined
+    config too. (closes: #179646)
+  * manpages cleanup, references, missings fixed (closes: #226801)
+  * config.{guess,sub} up2date from autotools-dev
+
+ -- Tamas SZERB <toma@rulez.org>  Thu, 22 Apr 2004 10:34:02 +0200
+
+tsocks (1.8beta5-1) unstable; urgency=low
+
+  * new upstream version
+  * mostly bugfixes, eg. close()
+  * remote dns resolving (closes: #166773) with
+    --enable-socksdns --enable-hostnames so please get rid of
+    hostnames in the config file and use ip addresses only!
+    (NOTE: doesn't work as expected)
+  * sed, fileutils are required pkgs (from Build-Depends) so removed
+  * Irritating tsocks script -- sh conflict (closes: #174047)
+  * modified tsocks(8) manpage regarding TSOCKS_CONF_FILE
+    environment variable
+
+ -- Tamas SZERB <toma@rulez.org>  Mon, 23 Dec 2002 09:24:55 +0100
+
+tsocks (1.8beta4-2) unstable; urgency=low
+
+  * --disable-hostnames bugfix (closes: #140094)
+
+ -- Tamas SZERB <toma@rulez.org>  Wed, 27 Mar 2002 14:31:19 +0100
+
+tsocks (1.8beta4-1) unstable; urgency=low
+
+  * new upstream release
+  * segfault fix on ia64 (closes: #131334)
+  * Allow TSOCKS_CONF_FILE to specify location of config (closes: #135597)
+  * Now respects the default_user and pass specified for path
+    (closes: #135291)
+
+ -- Tamas SZERB <toma@rulez.org>  Mon, 25 Mar 2002 19:28:40 +0100
+
+tsocks (1.7-4) unstable; urgency=low
+
+  * modified description for the sake of Pista ;)
+
+ -- Tamas SZERB <toma@rulez.org>  Wed, 29 Aug 2001 01:24:11 +0200
+
+tsocks (1.7-3) unstable; urgency=low
+
+  * license missed
+  * upload wnpp fix (closes: #105457)
+
+ -- Tamas SZERB <toma@rulez.org>  Mon, 23 Jul 2001 22:35:10 +0200
+
+tsocks (1.7-2) unstable; urgency=low
+
+  * ts -> tsocks (bin, and man too) because the ts package has a ts binary
+
+ -- Tamas SZERB <toma@rulez.org>  Mon, 23 Jul 2001 22:34:49 +0200
+
+tsocks (1.7-1) unstable; urgency=low
+
+  * Initial release.
+  * first upload - wnpp (closes: #105457)
+
+ -- Tamas SZERB <toma@rulez.org>  Sun, 15 Jul 2001 11:03:59 +0200
+
+Local variables:
+mode: debian-changelog
+End:
--- tsocks-1.8beta5.orig/debian/compat
+++ tsocks-1.8beta5/debian/compat
@@ -0,0 +1 @@
+6
--- tsocks-1.8beta5.orig/debian/control
+++ tsocks-1.8beta5/debian/control
@@ -0,0 +1,18 @@
+Source: tsocks
+Section: net
+Priority: optional
+Maintainer: Tamas SZERB <toma@rulez.org>
+Uploaders: Nico Golde <nion@debian.org>
+Build-Depends: debhelper (>= 6), autotools-dev, dpatch
+Standards-Version: 3.8.0
+Homepage: http://tsocks.sf.net
+
+Package: tsocks
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: transparent network access through a SOCKS 4 or 5 proxy
+ tsocks provides transparent network access through a SOCKS version 4
+ or 5 proxy (usually on a firewall). tsocks intercepts the calls
+ applications make to establish TCP connections and transparently
+ proxies them as necessary. This allows existing applications to use
+ SOCKS without recompilation or modification.
--- tsocks-1.8beta5.orig/debian/plus/tsocks.1
+++ tsocks-1.8beta5/debian/plus/tsocks.1
@@ -0,0 +1,51 @@
+.TH TSOCKS 1 "" "TSOCKS"
+
+.SH NAME
+.BR tsocks 
+\- Shell wrapper to simplify the use of the tsocks(8) library to 
+transparently allow an application to use a SOCKS proxy
+.SH SYNOPSIS
+.B tsocks
+.RB [application\ [application's\ arguments]]
+.br
+or
+.B tsocks
+.RB [\-on|\-off]
+.br
+or
+.B tsocks
+.SH DESCRIPTION
+.B tsocks
+is a wrapper between the tsocks library and the application what you
+would like to run socksified.
+.SH OPTIONS
+.IP \fB[application\ \fB[application's\ arguments]]
+run the application as specified with the environment (LD_PRELOAD) set
+such that tsocks(8) will transparently proxy SOCKS connections in 
+that program
+.IP \fB[\-on|\-off]
+this option adds or removes tsocks(8) from the LD_PRELOAD environment
+variable. When tsocks(8) is in this variable all executed
+applications are automatically socksified. If you want to
+use this function, you HAVE to source the shell script from yours,
+like this: "source /usr/bin/tsocks" or ". /usr/bin/tsocks"
+.br
+Example:
+.br
+". tsocks \-on" \-\- add the tsocks lib to LD_PRELOAD (don't forget the
+leading dot!)
+.br
+". tsocks \-off" \-\- remove the tsocks lib from LD_PRELOAD (don't forget the
+leading dot!)
+.IP \fB[\-show|\-sh]
+show the current value of the LD_PRELOAD variable
+.IP \fB<without\ any\ argument>
+create a new shell with LD_PRELOAD including tsocks(8). 
+.PP
+.SH SEE ALSO
+tsocks.conf(5)
+tsocks(8)
+.SH AUTHOR
+This script was created by Tamas SZERB <toma@rulez.org> for the debian
+package of tsocks. It (along with this manual page) have since been 
+adapted into the main tsocks project and modified.
--- tsocks-1.8beta5.orig/debian/plus/saveme.8
+++ tsocks-1.8beta5/debian/plus/saveme.8
@@ -0,0 +1,15 @@
+.TH saveme 8 "" "saveme"
+
+.SH NAME
+.BR saveme 
+\- unlink ld.so.preload
+.RB
+.SH DESCRIPTION
+.B saveme
+is part of the tsocks package This program is designed to be statically linked so
+that if a user breaks their ld.so.preload file and cannot run any dynamically
+linked program it can delete the offending ld.so.preload file.
+.PP
+.SH AUTHOR
+This manpage was created by Nico Golde <nion@debian.org> for the debian
+package of tsocks.
--- tsocks-1.8beta5.orig/debian/plus/tsocks
+++ tsocks-1.8beta5/debian/plus/tsocks
@@ -0,0 +1,89 @@
+#!/bin/sh
+# Wrapper script for use of the tsocks(8) transparent socksification library
+#
+# There are three forms of usage for this script:
+#
+# /usr/bin/tsocks program [program arguments...]
+#
+# This form sets the users LD_PRELOAD environment variable so that tsocks(8) 
+# will be loaded to socksify the application then executes the specified 
+# program (with the provided arguments). The following simple example might 
+# be used to telnet to www.foo.org via a tsocks.conf(5) configured socks server:
+#
+# /usr/bin/tsocks telnet www.foo.org
+#
+# The second form allows for tsocks(8) to be switched on and off for a 
+# session (that is, it adds and removes tsocks from the LD_PRELOAD environment
+# variable). This form must be _sourced_ into the user's existing session
+# (and will only work with bourne shell users):
+#
+# . /usr/bin/tsocks on
+# telnet www.foo.org 
+# . /usr/bin/tsocks off
+# 
+# Or
+# 
+# source /usr/bin/tsocks on
+# telnet www.foo.org
+# source /usr/bin/tsocks off
+#
+# The third form creates a new shell with LD_PRELOAD set and is achieved
+# simply by running the script with no arguments 
+# 
+# /usr/bin/tsocks
+#
+# When finished the user can simply terminate the shell with 'exit'
+# 
+# This script is originally from the debian tsocks package by 
+# Tamas Szerb <toma@rulez.org>
+
+#if [ $# = 0 ] ; then
+#   echo "$0: insufficient arguments"
+#   exit
+#fi
+
+case "$1" in
+	-on)
+		if [ -z "$LD_PRELOAD" ]
+			then
+				export LD_PRELOAD="/usr/lib/libtsocks.so"
+			else
+				echo $LD_PRELOAD | grep -q "/usr/lib/libtsocks\.so" || \
+				export LD_PRELOAD="/usr/lib/libtsocks.so $LD_PRELOAD"
+		fi
+	;;
+	-off)
+		export LD_PRELOAD=`echo -n $LD_PRELOAD | sed 's/\/usr\/lib\/libtsocks.so \?//'`
+		if [ -z "$LD_PRELOAD" ]
+			then
+				unset LD_PRELOAD
+		fi
+	;;
+	-show|-sh)
+		echo "LD_PRELOAD=\"$LD_PRELOAD\""
+	;;
+	-h|-?)
+      echo "$0: Please see tsocks(1) or read comment at top of $0"
+   ;;
+	*)
+		if [ -z "$LD_PRELOAD" ]
+		then
+			export LD_PRELOAD="/usr/lib/libtsocks.so"
+		else
+			echo $LD_PRELOAD | grep -q "/usr/lib/libtsocks\.so" || \
+			export LD_PRELOAD="/usr/lib/libtsocks.so $LD_PRELOAD"
+		fi
+
+		if [ $# = 0 ]
+		then
+			${SHELL:-/bin/sh}
+		fi
+
+		if [ $# -gt 0 ]
+		then
+			exec "$@"
+		fi
+	;;
+esac
+
+#EOF
--- tsocks-1.8beta5.orig/debian/patches/02_hyphenfix.dpatch
+++ tsocks-1.8beta5/debian/patches/02_hyphenfix.dpatch
@@ -0,0 +1,134 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_hyphenfix.dpatch by Nico Golde <nion@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad tsocks-1.8beta5~/tsocks.8 tsocks-1.8beta5/tsocks.8
+--- tsocks-1.8beta5~/tsocks.8	2007-03-30 11:07:38.000000000 +0200
++++ tsocks-1.8beta5/tsocks.8	2007-03-30 11:15:41.000000000 +0200
+@@ -13,11 +13,11 @@
+ The syntax to force preload of the library for different shells is
+ specified below:
+  
+-Bash, Ksh and Bourne shell -
++Bash, Ksh and Bourne shell \-
+ 
+ export LD_PRELOAD=/lib/libtsocks.so
+ 
+-C Shell - 
++C Shell \- 
+ 
+ setenv LD_PRELOAD=/lib/libtsocks.so
+ 
+@@ -52,7 +52,7 @@
+ Most arguments to
+ .BR tsocks
+ are provided in the configuration file (the location of which is defined
+-at configure time by the --with-conf=<file> argument but defaults to
++at configure time by the \-\-with\-conf=<file> argument but defaults to
+ /etc/tsocks.conf). The structure of this file is documented in tsocks.conf(8)
+ 
+ Some configuration options can be specified at run time using environment
+@@ -63,7 +63,7 @@
+ This environment variable overrides the default location of the tsocks 
+ configuration file. This variable is not honored if the program tsocks
+ is embedded in is setuid. In addition this environment variable can
+-be compiled out of tsocks with the --disable-envconf argument to 
++be compiled out of tsocks with the \-\-disable\-envconf argument to 
+ configure at build time
+ 
+ .TP
+@@ -73,10 +73,10 @@
+ standard error). If this variable is not present by default the logging 
+ level is set to 0 which indicates that only error messages should be output. 
+ Setting it to higher values will cause tsocks to generate more messages 
+-describing what it is doing. If set to -1 tsocks will output absolutely no 
++describing what it is doing. If set to \-1 tsocks will output absolutely no 
+ error or debugging messages. This is only needed if tsocks output interferes 
+ with a program it is embedded in. Message output can be permanently compiled 
+-out of tsocks by specifying the --disable-debug option to configure at 
++out of tsocks by specifying the \-\-disable\-debug option to configure at 
+ build time
+ 
+ .TP
+@@ -85,7 +85,7 @@
+ be sent to standard error) to a file. This variable is not honored if the 
+ program tsocks is embedded in is setuid. For programs where tsocks output 
+ interferes with normal operation this option is generally better than 
+-disabling messages (with TSOCKS_DEBUG = -1)
++disabling messages (with TSOCKS_DEBUG = \-1)
+ 
+ .TP
+ .I TSOCKS_USERNAME
+@@ -115,8 +115,8 @@
+ .BR tsocks
+ will generate error messages and print them to stderr when there are
+ problems with the configuration file or the SOCKS negotiation with the
+-server if the TSOCKS_DEBUG environment variable is not set to -1 or and
+---disable-debug was not specified at compile time. This output may cause
++server if the TSOCKS_DEBUG environment variable is not set to \-1 or and
++\-\-disable\-debug was not specified at compile time. This output may cause
+ some problems with programs that redirect standard error.
+ 
+ .SS CAVEATS
+@@ -157,12 +157,12 @@
+ .BR tsocks 
+ uses ELF dynamic loader features to intercept dynamic function calls from
+ programs in which it is embedded.  As a result, it cannot trace the 
+-actions of statically linked executables, non-ELF executables, or 
++actions of statically linked executables, non\-ELF executables, or 
+ executables that make system calls directly with the system call trap or 
+ through the syscall() routine.
+ 
+ .SH FILES
+-/etc/tsocks.conf - default tsocks configuration file
++/etc/tsocks.conf \- default tsocks configuration file
+ 
+ .SH SEE ALSO
+ tsocks.conf(5)
+diff -urNad tsocks-1.8beta5~/tsocks.conf.5 tsocks-1.8beta5/tsocks.conf.5
+--- tsocks-1.8beta5~/tsocks.conf.5	2002-05-18 04:13:08.000000000 +0200
++++ tsocks-1.8beta5/tsocks.conf.5	2007-03-30 11:16:38.000000000 +0200
+@@ -66,7 +66,7 @@
+ .I server
+ The IP address of the SOCKS server (e.g "server = 10.1.4.253"). Only one
+ server may be specified per path block, or one outside a path
+-block (to define the default server). Unless --disable-hostnames was 
++block (to define the default server). Unless \-\-disable\-hostnames was 
+ specified to configure at compile time the server can be specified as 
+ a hostname (e.g "server = socks.nec.com") 
+ 
+@@ -118,13 +118,13 @@
+ .TP
+ .I reaches
+ This directive is only valid inside a path block. Its parameter is formed
+-as IP[:startport[-endport]]/Subnet and it specifies a network (and a range
++as IP[:startport[\-endport]]/Subnet and it specifies a network (and a range
+ of ports on that network) that can be accessed by the SOCKS server specified
+ in this path block. For example, in a path block "reaches =
+-150.0.0.0:80-1024/255.0.0.0" indicates to tsocks that the SOCKS server 
++150.0.0.0:80\-1024/255.0.0.0" indicates to tsocks that the SOCKS server 
+ specified in the current path block should be used to access any IPs in the 
+ range 150.0.0.0 to 150.255.255.255 when the connection request is for ports
+-80-1024.
++80\-1024.
+ 
+ .SH UTILITIES
+ tsocks comes with two utilities that can be useful in creating and verifying
+@@ -146,12 +146,12 @@
+ extremely useful in debugging problems.
+ 
+ validateconf can read a configuration file from a location other than the 
+-location specified at compile time with the -f <filename> command line 
++location specified at compile time with the \-f <filename> command line 
+ option.
+ 
+ Normally validateconf simply dumps the configuration read to the screen (in
+ a nicely readable format), however it also has a useful 'test' mode. When
+-passed a hostname/ip on the command line like -t <hostname/ip>, validateconf 
++passed a hostname/ip on the command line like \-t <hostname/ip>, validateconf 
+ determines which of the SOCKS servers specified in the configuration file 
+ would be used by tsocks to access the specified host. 
+ 
--- tsocks-1.8beta5.orig/debian/patches/06_fallback.dpatch
+++ tsocks-1.8beta5/debian/patches/06_fallback.dpatch
@@ -0,0 +1,104 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 06_fallback.dpatch by Tamas SZERB <toma@rulez.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Establish direct connection instead of sockified if
+## DP: there is no default server specified and the
+## DP: fallback = yes.
+
+@DPATCH@
+--- tsocks-1.8beta5.orig/parser.h	2002-02-10 08:26:27.000000000 +0100
++++ tsocks-1.8beta5/parser.h	2008-03-16 13:33:49.000000000 +0100
+@@ -33,6 +33,7 @@
+    struct netent *localnets;
+    struct serverent defaultserver;
+    struct serverent *paths;
++   int fallback;
+ };
+ 
+ /* Functions provided by parser module */
+--- tsocks-1.8beta5.orig/parser.c	2008-03-16 13:32:47.000000000 +0100
++++ tsocks-1.8beta5/parser.c	2008-03-16 13:36:37.000000000 +0100
+@@ -35,6 +35,7 @@
+ static int handle_defuser(struct parsedfile *, int, char *);
+ static int handle_defpass(struct parsedfile *, int, char *);
+ static int make_netent(char *value, struct netent **ent);
++static int handle_fallback(struct parsedfile *, int, char *);
+ 
+ char __attribute__ ((visibility ("hidden")))
+ *find_config(char *line) {
+@@ -181,6 +182,8 @@
+ 				handle_defpass(config, lineno, words[2]);
+ 			} else if (!strcmp(words[0], "local")) {
+ 				handle_local(config, lineno, words[2]);
++			} else if (!strcmp(words[0], "fallback")) {
++				handle_fallback(config, lineno, words[2]);
+ 			} else {
+ 				show_msg(MSGERR, "Invalid pair type (%s) specified "
+ 					   "on line %d in configuration file, "
+@@ -512,6 +515,19 @@
+ 	return(0);
+ }
+ 
++static int handle_fallback(struct parsedfile *config, int lineno, char *value) {
++	char *v = strsplit(NULL, &value, " ");
++	if (config->fallback !=0) {
++		show_msg(MSGERR, "Fallback may only be specified "
++				"once in configuration file.\n",
++				lineno, currentcontext->lineno);
++	} else {
++		if(!strcmp(v, "yes")) config->fallback = 1;
++		if(!strcmp(v, "no")) config->fallback = 0;
++	}
++	return(0);
++}
++
+ /* Construct a netent given a string like                             */
+ /* "198.126.0.1[:portno[-portno]]/255.255.255.0"                      */
+ int make_netent(char *value, struct netent **ent) {
+--- tsocks-1.8beta5.orig/tsocks.c	2008-03-16 13:32:47.000000000 +0100
++++ tsocks-1.8beta5/tsocks.c	2008-03-16 13:40:23.000000000 +0100
+@@ -294,11 +294,20 @@
+             (path->address ? path->address : "(Not Provided)"));
+    if (path->address == NULL) {
+       if (path == &(config->defaultserver)) {
+-         show_msg(MSGERR, "Connection needs to be made "
+-                          "via default server but "
+-                          "the default server has not "
+-                          "been specified. Falling back to direct connection.\n");
+-                          return(realconnect(__fd, __addr, __len));
++         if (config->fallback) {
++            show_msg(MSGERR, "Connection needs to be made "
++                             "via default server but "
++                             "the default server has not "
++                             "been specified. Fallback is 'yes' so "
++                             "Falling back to direct connection.\n");
++            return(realconnect(__fd, __addr, __len));
++         } else {
++           show_msg(MSGERR, "Connection needs to be made "
++                            "via default server but "
++                            "the default server has not "
++                            "been specified. Fallback is 'no' so "
++                            "coudln't establish the connection.\n");
++         }
+    }
+       else 
+          show_msg(MSGERR, "Connection needs to be made "
+--- tsocks-1.8beta5.orig/tsocks.conf.5	2002-05-18 04:13:08.000000000 +0200
++++ tsocks-1.8beta5/tsocks.conf.5	2008-03-16 22:54:41.000000000 +0100
+@@ -126,6 +126,15 @@
+ range 150.0.0.0 to 150.255.255.255 when the connection request is for ports
+ 80-1024.
+ 
++.TP
++.I fallback
++This directive allows to fall back to direct connection if no default
++server present in the configuration and fallback = yes.
++If fallback = no or not specified and there is no default server, the 
++tsocks gives an error message and aborts.
++This parameter protects the user against accidentally establishing
++unwanted unsockified (ie. direct) connection.
++
+ .SH UTILITIES
+ tsocks comes with two utilities that can be useful in creating and verifying
+ the tsocks configuration file. 
--- tsocks-1.8beta5.orig/debian/patches/04_getpeername.dpatch
+++ tsocks-1.8beta5/debian/patches/04_getpeername.dpatch
@@ -0,0 +1,274 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04_getpeername.dpatch by Nico Golde <nion@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad tsocks-1.8beta5~/acconfig.h tsocks-1.8beta5/acconfig.h
+--- tsocks-1.8beta5~/acconfig.h	2002-05-18 06:59:38.000000000 +0200
++++ tsocks-1.8beta5/acconfig.h	2007-04-02 20:05:30.000000000 +0200
+@@ -43,6 +43,9 @@
+ /* Prototype and function header for close function */
+ #undef CLOSE_SIGNATURE
+ 
++/* Prototype and function header for getpeername function */
++#undef GETPEERNAME_SIGNATURE
++
+ /* Work out which function we have for conversion from string IPs to 
+ numerical ones */
+ #undef HAVE_INET_ADDR
+diff -urNad tsocks-1.8beta5~/config.h.in tsocks-1.8beta5/config.h.in
+--- tsocks-1.8beta5~/config.h.in	2002-05-18 06:59:42.000000000 +0200
++++ tsocks-1.8beta5/config.h.in	2007-04-02 20:05:30.000000000 +0200
+@@ -46,6 +46,9 @@
+ /* Prototype and function header for close function */
+ #undef CLOSE_SIGNATURE
+ 
++/* Prototype and function header for close function */
++#undef GETPEERNAME_SIGNATURE
++
+ /* Work out which function we have for conversion from string IPs to 
+ numerical ones */
+ #undef HAVE_INET_ADDR
+diff -urNad tsocks-1.8beta5~/configure tsocks-1.8beta5/configure
+--- tsocks-1.8beta5~/configure	2002-07-16 00:51:08.000000000 +0200
++++ tsocks-1.8beta5/configure	2007-04-02 20:05:30.000000000 +0200
+@@ -2225,14 +2225,60 @@
+ EOF
+ 
+ 
++
++echo $ac_n "checking for correct getpeername prototype""... $ac_c" 1>&6
++echo "configure:2231: checking for correct getpeername prototype" >&5
++PROTO=
++PROTO1='int __fd, const struct sockaddr * __name, int *__namelen'
++PROTO2='int __fd, const struct sockaddr_in * __name, socklen_t *__namelen'
++PROTO3='int __fd, struct sockaddr * __name, socklen_t *__namelen'
++PROTO4='int __fd, const struct sockaddr * __name, socklen_t *__namelen'
++for testproto in "${PROTO1}" \
++                 "${PROTO2}" \
++                 "${PROTO3}" \
++                 "${PROTO4}" 
++do
++  if test "${PROTO}" = ""; then
++    cat > conftest.$ac_ext <<EOF
++#line 2244 "configure"
++#include "confdefs.h"
++
++      #include <sys/socket.h>
++      int getpeername($testproto);
++    
++int main() {
++
++; return 0; }
++EOF
++if { (eval echo configure:2254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++  rm -rf conftest*
++  PROTO="$testproto";
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++fi
++rm -f conftest*
++  fi
++done
++if test "${PROTO}" = ""; then
++  { echo "configure: error: "no match found!"" 1>&2; exit 1; }
++fi
++echo "$ac_t""getpeername(${PROTO})" 1>&6
++cat >> confdefs.h <<EOF
++#define GETPEERNAME_SIGNATURE ${PROTO}
++EOF
++
++
++
++
+ echo $ac_n "checking for correct poll prototype""... $ac_c" 1>&6
+-echo "configure:2230: checking for correct poll prototype" >&5
++echo "configure:2276: checking for correct poll prototype" >&5
+ PROTO=
+ for testproto in 'struct pollfd *ufds, unsigned long nfds, int timeout' 
+ do
+   if test "${PROTO}" = ""; then
+     cat > conftest.$ac_ext <<EOF
+-#line 2236 "configure"
++#line 2282 "configure"
+ #include "confdefs.h"
+ 
+       #include <sys/poll.h>
+@@ -2242,7 +2288,7 @@
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:2246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:2292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   PROTO="$testproto";
+ else
+diff -urNad tsocks-1.8beta5~/configure.in tsocks-1.8beta5/configure.in
+--- tsocks-1.8beta5~/configure.in	2002-07-16 00:51:03.000000000 +0200
++++ tsocks-1.8beta5/configure.in	2007-04-02 20:05:30.000000000 +0200
+@@ -309,6 +309,34 @@
+ AC_MSG_RESULT([close(${PROTO})])
+ AC_DEFINE_UNQUOTED(CLOSE_SIGNATURE, [${PROTO}])
+ 
++
++dnl Find the correct getpeername prototype on this machine 
++AC_MSG_CHECKING(for correct getpeername prototype)
++PROTO=
++PROTO1='int __fd, const struct sockaddr * __name, int *__namelen'
++PROTO2='int __fd, const struct sockaddr_in * __name, socklen_t *__namelen'
++PROTO3='int __fd, struct sockaddr * __name, socklen_t *__namelen'
++PROTO4='int __fd, const struct sockaddr * __name, socklen_t *__namelen'
++for testproto in "${PROTO1}" \
++                 "${PROTO2}" \
++                 "${PROTO3}" \
++                 "${PROTO4}" 
++do
++  if test "${PROTO}" = ""; then
++    AC_TRY_COMPILE([
++      #include <sys/socket.h>
++      int getpeername($testproto);
++    ],,[PROTO="$testproto";],)
++  fi
++done
++if test "${PROTO}" = ""; then
++  AC_MSG_ERROR("no match found!")
++fi
++AC_MSG_RESULT([getpeername(${PROTO})])
++AC_DEFINE_UNQUOTED(GETPEERNAME_SIGNATURE, [${PROTO}])
++
++
++
+ dnl Find the correct poll prototype on this machine 
+ AC_MSG_CHECKING(for correct poll prototype)
+ PROTO=
+diff -urNad tsocks-1.8beta5~/tsocks.c tsocks-1.8beta5/tsocks.c
+--- tsocks-1.8beta5~/tsocks.c	2002-07-16 00:50:52.000000000 +0200
++++ tsocks-1.8beta5/tsocks.c	2007-04-02 20:05:30.000000000 +0200
+@@ -62,6 +62,7 @@
+ static int (*realselect)(SELECT_SIGNATURE);
+ static int (*realpoll)(POLL_SIGNATURE);
+ static int (*realclose)(CLOSE_SIGNATURE);
++static int (*realgetpeername)(GETPEERNAME_SIGNATURE);
+ static struct parsedfile *config;
+ static struct connreq *requests = NULL;
+ static int suid = 0;
+@@ -73,6 +74,7 @@
+ int select(SELECT_SIGNATURE);
+ int poll(POLL_SIGNATURE);
+ int close(CLOSE_SIGNATURE);
++int getpeername(GETPEERNAME_SIGNATURE);
+ #ifdef USE_SOCKS_DNS
+ int res_init(void);
+ #endif
+@@ -109,14 +111,15 @@
+ 	/* most programs that are run won't use our services, so     */
+ 	/* we do our general initialization on first call            */
+ 
+-   /* Determine the logging level */
+-   suid = (getuid() != geteuid());
++	/* Determine the logging level */
++	suid = (getuid() != geteuid());
+ 
+ #ifndef USE_OLD_DLSYM
+ 	realconnect = dlsym(RTLD_NEXT, "connect");
+ 	realselect = dlsym(RTLD_NEXT, "select");
+ 	realpoll = dlsym(RTLD_NEXT, "poll");
+ 	realclose = dlsym(RTLD_NEXT, "close");
++	realgetpeername = dlsym(RTLD_NEXT, "getpeername");
+ 	#ifdef USE_SOCKS_DNS
+ 	realresinit = dlsym(RTLD_NEXT, "res_init");
+ 	#endif
+@@ -125,14 +128,15 @@
+ 	realconnect = dlsym(lib, "connect");
+ 	realselect = dlsym(lib, "select");
+ 	realpoll = dlsym(lib, "poll");
++	realgetpeername = dlsym(lib, "getpeername");
+ 	#ifdef USE_SOCKS_DNS
+ 	realresinit = dlsym(lib, "res_init");
+ 	#endif
+-	dlclose(lib);	
++	dlclose(lib);
+ 
+ 	lib = dlopen(LIBC, RTLD_LAZY);
+-   realclose = dlsym(lib, "close");
+-	dlclose(lib);	
++	realclose = dlsym(lib, "close");
++	dlclose(lib);
+ #endif
+ }
+ 
+@@ -348,8 +352,10 @@
+ 
+    /* If we're not currently managing any requests we can just 
+     * leave here */
+-   if (!requests)
++   if (!requests) {
++      show_msg(MSGDEBUG, "No requests waiting, calling real select\n");
+       return(realselect(n, readfds, writefds, exceptfds, timeout));
++   }
+ 
+    get_environment();
+ 
+@@ -703,6 +709,50 @@
+    return(rc);
+ }
+ 
++/* If we are not done setting up the connection yet, return
++ * -1 and ENOTCONN, otherwise call getpeername
++ *
++ * This is necessary since some applications, when using non-blocking connect,
++ * (like ircII) use getpeername() to find out if they are connected already.
++ *
++ * This results in races sometimes, where the client sends data to the socket
++ * before we are done with the socks connection setup.  Another solution would
++ * be to intercept send().
++ * 
++ * This could be extended to actually set the peername to the peer the
++ * client application has requested, but not for now.
++ *
++ * PP, Sat, 27 Mar 2004 11:30:23 +0100
++ */
++int getpeername(GETPEERNAME_SIGNATURE) {
++   struct connreq *conn;
++   int rc;
++
++    if (realgetpeername == NULL) {
++        show_msg(MSGERR, "Unresolved symbol: getpeername\n");
++        return(-1);
++    }
++
++   show_msg(MSGDEBUG, "Call to getpeername for fd %d\n", __fd);
++
++
++   rc = realgetpeername(__fd, __name, __namelen);
++   if (rc == -1)
++       return rc;
++
++   /* Are we handling this connect? */
++   if ((conn = find_socks_request(__fd, 1))) {
++       /* While we are at it, we might was well try to do something useful */
++       handle_request(conn);
++
++       if (conn->state != DONE) {
++           errno = ENOTCONN;
++           return(-1);
++       }
++   }
++   return rc;
++}
++
+ static struct connreq *new_socks_request(int sockid, struct sockaddr_in *connaddr, 
+                                          struct sockaddr_in *serveraddr, 
+                                          struct serverent *path) {
+@@ -852,7 +902,7 @@
+                     sizeof(conn->serveraddr));
+ 
+    show_msg(MSGDEBUG, "Connect returned %d, errno is %d\n", rc, errno); 
+-	if (rc) {
++   if (rc) {
+       if (errno != EINPROGRESS) {
+          show_msg(MSGERR, "Error %d attempting to connect to SOCKS "
+                   "server (%s)\n", errno, strerror(errno));
--- tsocks-1.8beta5.orig/debian/patches/05_config_in_home.dpatch
+++ tsocks-1.8beta5/debian/patches/05_config_in_home.dpatch
@@ -0,0 +1,43 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 05_config_in_home.dpatch by Reinhard Tartler <siretart@tauware.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Additionally search for the configuration file in user home directory
+
+@DPATCH@
+diff -urNad tsocks-1.8beta5~/parser.c tsocks-1.8beta5/parser.c
+--- tsocks-1.8beta5~/parser.c	2008-03-03 14:05:14.000000000 +0100
++++ tsocks-1.8beta5/parser.c	2008-03-03 14:05:36.000000000 +0100
+@@ -36,6 +36,32 @@
+ static int handle_defpass(struct parsedfile *, int, char *);
+ static int make_netent(char *value, struct netent **ent);
+ 
++char __attribute__ ((visibility ("hidden")))
++*find_config(char *line) {
++	struct passwd* pw;
++
++	errno = 0;
++
++	pw = getpwuid(getuid());
++	if (errno) {
++		perror("getpwuid");
++		return NULL;
++	}
++
++	/* check for config in $HOME */
++	snprintf(line, MAXLINE - 1, "%s/.tsocks.conf", pw->pw_dir);
++
++	if (access(line, R_OK)) {
++		show_msg(MSGDEBUG, "Can't access %s, using " CONF_FILE " instead.\n", line);
++		strncpy(line, CONF_FILE, MAXLINE - 1);
++	}
++
++	/* Insure null termination */
++	line[MAXLINE - 1] = (char) 0;
++
++	return line;
++}
++
+ int __attribute__ ((visibility ("hidden")))
+ read_config (char *filename, struct parsedfile *config) {
+ 	FILE *conf;
--- tsocks-1.8beta5.orig/debian/patches/03_fixloop.dpatch
+++ tsocks-1.8beta5/debian/patches/03_fixloop.dpatch
@@ -0,0 +1,21 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03_fixloop.dpatch by Nico Golde <nion@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad tsocks-1.8beta5~/tsocks.c tsocks-1.8beta5/tsocks.c
+--- tsocks-1.8beta5~/tsocks.c	2002-07-16 00:50:52.000000000 +0200
++++ tsocks-1.8beta5/tsocks.c	2007-04-02 19:48:26.000000000 +0200
+@@ -988,6 +988,10 @@
+       if (rc > 0) {
+          conn->datadone += rc;
+          rc = 0;
++      } else if (rc == 0) {
++         show_msg(MSGDEBUG, "Peer has shutdown but we only read %d of %d bytes.\n",
++            conn->datadone, conn->datalen);
++         rc = ENOTCONN; /* ENOTCONN seems like the most fitting error message */
+       } else {
+          if (errno != EWOULDBLOCK)
+             show_msg(MSGDEBUG, "Read failed, %s\n", strerror(errno));
--- tsocks-1.8beta5.orig/debian/patches/01_symbolexport.dpatch
+++ tsocks-1.8beta5/debian/patches/01_symbolexport.dpatch
@@ -0,0 +1,83 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_symbolexport.dpatch by Nico Golde <nion@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad tsocks-1.8beta5~/common.c tsocks-1.8beta5/common.c
+--- tsocks-1.8beta5~/common.c	2002-07-16 00:35:06.000000000 +0200
++++ tsocks-1.8beta5/common.c	2007-03-30 11:08:29.000000000 +0200
+@@ -25,7 +25,8 @@
+ FILE *logfile = NULL;     /* File to which messages should be logged */
+ int logstamp = 0;         /* Timestamp (and pid stamp) messages */
+ 
+-unsigned int resolve_ip(char *host, int showmsg, int allownames) {
++unsigned int __attribute__ ((visibility ("hidden")))
++resolve_ip(char *host, int showmsg, int allownames) {
+ 	struct hostent *new;
+ 	unsigned int	hostaddr;
+ 	struct in_addr *ip;
+@@ -64,7 +65,8 @@
+ /*             be logged instead of to standard error           */
+ /*  timestamp - This indicates that messages should be prefixed */
+ /*              with timestamps (and the process id)            */
+-void set_log_options(int level, char *filename, int timestamp) {
++void __attribute__ ((visibility ("hidden")))
++set_log_options(int level, char *filename, int timestamp) {
+ 
+    loglevel = level;
+    if (loglevel < MSGERR)
+@@ -78,7 +80,8 @@
+    logstamp = timestamp;
+ }
+ 
+-void show_msg(int level, char *fmt, ...) {
++void __attribute__ ((visibility ("hidden")))
++show_msg(int level, char *fmt, ...) {
+ 	va_list ap;
+ 	int saveerr;
+ 	extern char *progname;
+diff -urNad tsocks-1.8beta5~/parser.c tsocks-1.8beta5/parser.c
+--- tsocks-1.8beta5~/parser.c	2002-03-13 13:34:22.000000000 +0100
++++ tsocks-1.8beta5/parser.c	2007-03-30 11:08:29.000000000 +0200
+@@ -33,7 +33,8 @@
+ static int handle_defpass(struct parsedfile *, int, char *);
+ static int make_netent(char *value, struct netent **ent);
+ 
+-int read_config (char *filename, struct parsedfile *config) {
++int __attribute__ ((visibility ("hidden")))
++read_config (char *filename, struct parsedfile *config) {
+ 	FILE *conf;
+ 	char line[MAXLINE];
+ 	int rc = 0;
+@@ -577,7 +578,8 @@
+ 	return(0);
+ }
+ 
+-int is_local(struct parsedfile *config, struct in_addr *testip) {
++int __attribute__ ((visibility ("hidden")))
++is_local(struct parsedfile *config, struct in_addr *testip) {
+         struct netent *ent;
+ 
+ 	for (ent = (config->localnets); ent != NULL; ent = ent -> next) {
+@@ -591,7 +593,8 @@
+ }
+ 
+ /* Find the appropriate server to reach an ip */
+-int pick_server(struct parsedfile *config, struct serverent **ent, 
++int __attribute__ ((visibility ("hidden")))
++pick_server(struct parsedfile *config, struct serverent **ent, 
+                 struct in_addr *ip, unsigned int port) {
+ 	struct netent *net;	
+    char ipbuf[64];
+@@ -635,7 +638,8 @@
+ /* the start pointer is set to be NULL. The difference between      */
+ /* standard strsep and this function is that this one will          */
+ /* set *separator to the character separator found if it isn't null */
+-char *strsplit(char *separator, char **text, const char *search) {
++char __attribute__ ((visibility ("hidden")))
++*strsplit(char *separator, char **text, const char *search) {
+    int len;
+    char *ret;
+ 
--- tsocks-1.8beta5.orig/debian/patches/00list
+++ tsocks-1.8beta5/debian/patches/00list
@@ -0,0 +1,6 @@
+01_symbolexport
+02_hyphenfix
+03_fixloop
+04_getpeername
+05_config_in_home
+06_fallback