aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mga-advisories/templates
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2014-04-08 09:00:08 +0000
committerColin Guthrie <colin@mageia.org>2014-04-08 09:00:08 +0000
commit215a5e809b73bb90d1e42cdfa70149dede2a3b21 (patch)
treee95d1bffbc243425e032cf6f39684c0914199a27 /modules/mga-advisories/templates
parentf23000615ecc91b0d0ce6f901725ff21f0a328b5 (diff)
downloadpuppet-215a5e809b73bb90d1e42cdfa70149dede2a3b21.tar
puppet-215a5e809b73bb90d1e42cdfa70149dede2a3b21.tar.gz
puppet-215a5e809b73bb90d1e42cdfa70149dede2a3b21.tar.bz2
puppet-215a5e809b73bb90d1e42cdfa70149dede2a3b21.tar.xz
puppet-215a5e809b73bb90d1e42cdfa70149dede2a3b21.zip
mga-advisories: Attempt to prevent running mga-advisories script as root.
Diffstat (limited to 'modules/mga-advisories/templates')
-rw-r--r--modules/mga-advisories/templates/update_script5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/mga-advisories/templates/update_script b/modules/mga-advisories/templates/update_script
index 09c97768..9d15c5ca 100644
--- a/modules/mga-advisories/templates/update_script
+++ b/modules/mga-advisories/templates/update_script
@@ -1,6 +1,11 @@
#!/bin/sh
set -e
+if [ "$UID" = "0" ]; then
+ echo "You are root. You shouldn't be. Try being <%= @mgaadv_login %> instead." >&2
+ exit 1
+fi
+
cd <%= @advisories_dir %>
svn up
exec /usr/bin/mgaadv mksite