Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar-jhbuild
diff options
context:
space:
mode:
authorSascha Silbe <sascha-org-sugar-git@silbe.org>2010-01-22 12:49:57 (GMT)
committer Sascha Silbe <sascha-org-sugar-git@silbe.org>2010-01-22 12:49:57 (GMT)
commit94afc03e75c53cac979e3a46d4fd2154746c4c37 (patch)
tree584ffe76f74a5c2c887bbc36590c808776b2a558 /sugar-jhbuild
parentd73d00db5d2a1ece5d0e61c7bf272a8320873baf (diff)
sugar-jhbuild: refuse to run as root
Diffstat (limited to 'sugar-jhbuild')
-rwxr-xr-xsugar-jhbuild5
1 files changed, 5 insertions, 0 deletions
diff --git a/sugar-jhbuild b/sugar-jhbuild
index e0385ba..3cdc1a9 100755
--- a/sugar-jhbuild
+++ b/sugar-jhbuild
@@ -5,6 +5,11 @@ import os
import sys
import subprocess
+
+if os.getuid() == 0 or os.geteuid() == 0:
+ print 'Refusing to run as root.'
+ sys.exit(3)
+
base_dir = os.path.abspath(os.path.dirname(__file__))
sjhbuild_dir = os.path.join(base_dir, 'sjhbuild')