[tor-commits] [torbrowser/maint-2.2] [Linux] Be more strict about	entering debug mode
    erinn at torproject.org 
    erinn at torproject.org
       
    Sun Oct 23 23:18:56 UTC 2011
    
    
  
commit 76596fca6bfd65df9502832d53e5e0f75ef01f4b
Author: Robert Ransom <rransom.8774 at gmail.com>
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
    
    
More information about the tor-commits
mailing list