summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2006-06-12 17:12:40 +0000
committerPeter Jones <pjones@redhat.com>2006-06-12 17:12:40 +0000
commit948f5275074d4741f40a19afae92496bea61897b (patch)
tree1786c78211597e524785c94bd51cafcf88f9876a /src
parent31894fcfa2d621927b362d94564df6271562a398 (diff)
- don't allow non-root to run things
Diffstat (limited to 'src')
-rwxr-xr-xsrc/pm-action5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pm-action b/src/pm-action
index d917f42..347b655 100755
--- a/src/pm-action
+++ b/src/pm-action
@@ -25,6 +25,11 @@
# The rule here? Simplicity.
+if [ -n "$EUID" -a "$EUID" != "0" ]; then
+ echo This utility may only be run by the root user. 1>&2
+ exit 1
+fi
+
export LC_COLLATE=C
. /etc/pm/functions