From dbc6bd3cb11d746b174d47c0fe3045c5d2138a57 Mon Sep 17 00:00:00 2001 From: mwolson_admin Date: Tue, 6 May 2008 10:26:58 -0400 Subject: [PATCH] Make sure that listnew is run as root. --- listnew | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/listnew b/listnew index b811ebe..dfb6c3c 100755 --- a/listnew +++ b/listnew @@ -18,6 +18,10 @@ elif test -z "$5"; then echo "Not enough arguments" usage exit 1 +elif "$UID" != "0"; then + echo "This program must be run as root" + usage + exit 1 else LIST_NAME=$1 LIST_DOMAIN=$2 @@ -26,8 +30,13 @@ else LIST_PASS=$5 fi -sudo -u list $BIN/newlist $LIST_NAME@$LIST_DOMAIN $LIST_USER@hcoop.net \ - $LIST_PASS