Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Silbe <sascha@silbe.org>2010-01-22 16:52:31 (GMT)
committer Sascha Silbe <sascha@silbe.org>2010-01-22 16:52:31 (GMT)
commit76683fbc38499a72c304b0c74b5fc4f4a71cc8da (patch)
treea72caeb51762ff50c5729e4968cda7ccb78f7778
parentaedbee2ac0bab57e949afca9ef75dd8e58c3a7f3 (diff)
parent7bc7b6f54dda0a52b35c8492fdd72a8c4811d817 (diff)
Merge commit 'refs/top-bases/t/vnc' into t/vnc
-rwxr-xr-xbin/sugar-emulator5
-rw-r--r--bin/sugar.in5
2 files changed, 10 insertions, 0 deletions
diff --git a/bin/sugar-emulator b/bin/sugar-emulator
index 800ca33..308aac7 100755
--- a/bin/sugar-emulator
+++ b/bin/sugar-emulator
@@ -1,5 +1,10 @@
#!/bin/sh
+if [ "$(id -u)" -eq 0 -o "$(id -ru)" -eq 0 ] ; then
+ echo Refusing to run as root.
+ exit 3
+fi
+
# Source debug definitions
if [ -f ~/.sugar/debug ]; then
. ~/.sugar/debug
diff --git a/bin/sugar.in b/bin/sugar.in
index 34992cb..35dd566 100644
--- a/bin/sugar.in
+++ b/bin/sugar.in
@@ -1,5 +1,10 @@
#!/bin/sh
+if [ "$(id -u)" -eq 0 -o "$(id -ru)" -eq 0 ] ; then
+ echo Refusing to run as root.
+ exit 3
+fi
+
usage() {
cat <<EOF
Usage: sugar [OPTION]..