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

[tor-commits] [torbrowser/master] [Linux] Be more strict about entering debug mode



commit 5d9c3ad0228b3884a0913f01ae1646a5cad70f6e
Author: Robert Ransom <rransom.8774@xxxxxxxxx>
Date:   Wed Aug 24 03:32:49 2011 -0400

    [Linux] Be more strict about entering debug mode
    
    Previously, a GUI user could start TBB in debug mode by dragging and
    dropping a file onto start-tor-browser.
    
    Found by taylanub (see ticket #3432).
    (cherry picked from commit 76596fca6bfd65df9502832d53e5e0f75ef01f4b)
---
 src/RelativeLink/RelativeLink.sh |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/RelativeLink/RelativeLink.sh b/src/RelativeLink/RelativeLink.sh
index 5fd0acc..462ca98 100755
--- a/src/RelativeLink/RelativeLink.sh
+++ b/src/RelativeLink/RelativeLink.sh
@@ -90,9 +90,12 @@ if [ "`id -u`" -eq 0 ]; then
 	exit 1
 fi
 
-if [ "$1" ]; then
-	debug="$1"
+if [ "$#" -eq 1 -a "x$1" = "x--debug" ]; then
+	debug=1
 	printf "\nDebug enabled.\n\n"
+elif [ "$#" -ne 0 ]; then
+	complain "usage: $0 [--debug]"
+	exit 1
 fi
 
 # If XAUTHORITY is unset, set it to its default value of $HOME/.Xauthority



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