[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 845c4a02d095bde6b4e5446dc8c95adfe86ae264
Author: Robert Hogan <robert@xxxxxxxxxxxxxxx>
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@" ]

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits