summaryrefslogtreecommitdiff
path: root/security/antivir-milter/files/patch-script::avq
blob: a2f97faa1c3eaa741c8e1385912086ba785e141b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- script/avq.orig	Sat Oct 11 13:26:02 2003
+++ script/avq	Sat Oct 11 13:31:54 2003
@@ -38,7 +38,7 @@
 #   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 #******************************************************************************
 
-configuration=/etc/avmilter.conf
+configuration=%%PREFIX%%/etc/avmilter.conf
 queue="`egrep -i '^[Ss][Pp][Oo][Oo][Ll][Dd][Ii][Rr]' ${configuration} | awk '{print $2;}'`"
 queue_set=0
 pname="`basename $0`"
@@ -48,6 +48,13 @@
 data=
 systeme="`uname`"
 date_param="-d"
+
+# Make sure the user running this program is root.
+procowner=${procowner:-`/usr/bin/id -u`}
+if [ "$procowner" != "0" ]; then
+	echo "${pname}: you must be the super-user (uid 0) to use this utility."
+	exit 2
+fi
 
 usage() {
     echo "${pname} usage:"