From 519c00c1a61320dc91c389ba591cb2a9b8af9a87 Mon Sep 17 00:00:00 2001 From: sanderd17 Date: Sun, 15 Jun 2014 15:23:03 +0000 Subject: [PATCH] Don't allow users to build workspaces as root user This was SVN commit r15369. --- build/workspaces/update-workspaces.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/workspaces/update-workspaces.sh b/build/workspaces/update-workspaces.sh index d5af21e33f..8e22d1f4e0 100644 --- a/build/workspaces/update-workspaces.sh +++ b/build/workspaces/update-workspaces.sh @@ -1,5 +1,10 @@ #!/bin/sh +if [ "$(id -u)" == "0" ]; then + echo "Running as root will mess up file permissions. Aborting ..." 1>&2 + exit 1 +fi + die() { echo ERROR: $*