[tor-commits] [torbrowser/maint-2.2] [2824 Linux] Explicitly refuse to run TBB-Linux as root

erinn at torproject.org erinn at torproject.org
Sun Aug 28 18:19:34 UTC 2011


commit 449751d3fb137da992deb481028bb3c16d2bd1df
Author: Robert Ransom <rransom.8774 at gmail.com>
Date:   Tue Aug 23 02:09:08 2011 -0400

    [2824 Linux] Explicitly refuse to run TBB-Linux as root
    (cherry picked from commit 063c2f62567282c0c3093f35b414ee52ff87aee4)
---
 src/RelativeLink/RelativeLink.sh |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/RelativeLink/RelativeLink.sh b/src/RelativeLink/RelativeLink.sh
index e33b1a8..fe00dcd 100755
--- a/src/RelativeLink/RelativeLink.sh
+++ b/src/RelativeLink/RelativeLink.sh
@@ -7,6 +7,11 @@
 #
 # Copyright 2010 The Tor Project.  See LICENSE for licensing information.
 
+if [ "`id -u`" -eq 0 ]; then
+	echo "The Tor Browser Bundle should not be run as root.  Exiting."
+	exit 1
+fi
+
 if [ "$1" ]; then
 	debug="$1"
 	printf "\nDebug enabled.\n\n"





More information about the tor-commits mailing list