[tor-commits] [torsocks/master] Issue 30: libtorsocks.so sanity check

hoganrobert at torproject.org hoganrobert at torproject.org
Sun Oct 23 21:16:08 UTC 2011


commit 845c4a02d095bde6b4e5446dc8c95adfe86ae264
Author: Robert Hogan <robert at roberthogan.net>
Date:   Sun Oct 23 22:12:53 2011 +0100

    Issue 30: libtorsocks.so sanity check
    
    "Currently if libtorsocks.so doesn't exist, torsocks will happily proceed without it,
    and not use tor."
    
    Check for libtorsocks.so and bail out if it isn't found.
---
 src/torsocks.in |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/torsocks.in b/src/torsocks.in
index 27540ec..53db2fc 100755
--- a/src/torsocks.in
+++ b/src/torsocks.in
@@ -78,6 +78,12 @@ LIB_NAME="libtorsocks"
 SHLIB_EXT="@SHLIB_EXT@"
 SHLIB="${LIBDIR}/${LIB_NAME}.${SHLIB_EXT}"
 
+# Ensure libtorsocks exists,
+if [ ! -f $SHLIB ]; then
+   echo "$0: $SHLIB does not exist! Try re-installing torsocks."
+   exit
+fi
+
 case "$1" in
   on)
     if [ -z "$@LDPRELOAD@" ]



More information about the tor-commits mailing list