diff options
author | Peter Jones <pjones@redhat.com> | 2006-06-12 17:12:40 +0000 |
---|---|---|
committer | Peter Jones <pjones@redhat.com> | 2006-06-12 17:12:40 +0000 |
commit | 948f5275074d4741f40a19afae92496bea61897b (patch) | |
tree | 1786c78211597e524785c94bd51cafcf88f9876a | |
parent | 31894fcfa2d621927b362d94564df6271562a398 (diff) |
- don't allow non-root to run things
-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 |