diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rwxr-xr-x | src/pm-action | 5 |
2 files changed, 10 insertions, 0 deletions
@@ -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 |