diff options
author | Sascha Silbe <sascha@silbe.org> | 2010-01-22 16:52:31 (GMT) |
---|---|---|
committer | Sascha Silbe <sascha@silbe.org> | 2010-01-22 16:52:31 (GMT) |
commit | 76683fbc38499a72c304b0c74b5fc4f4a71cc8da (patch) | |
tree | a72caeb51762ff50c5729e4968cda7ccb78f7778 | |
parent | aedbee2ac0bab57e949afca9ef75dd8e58c3a7f3 (diff) | |
parent | 7bc7b6f54dda0a52b35c8492fdd72a8c4811d817 (diff) |
Merge commit 'refs/top-bases/t/vnc' into t/vnc
-rwxr-xr-x | bin/sugar-emulator | 5 | ||||
-rw-r--r-- | bin/sugar.in | 5 |
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].. |