[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 76596fca6bfd65df9502832d53e5e0f75ef01f4b
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).
---
 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