summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rwxr-xr-xsrc/pm-action5
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 48538ab..99ce5ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-06-12 Peter Jones <pjones@redhat.com>
+
+ * src/pm-action:
+ error if run as non-root
+
2006-06-05 Richard Hughes <richard@hughsie.com>
* src/Makefile.am:
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