summaryrefslogtreecommitdiff
path: root/security/drweb
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2001-10-06 04:10:21 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2001-10-06 04:10:21 +0000
commit80768d913957f3c77ce9d7210e78baf196d3a44a (patch)
treeb73b5f1e75430bb962531bea9df709bdb4dd82a1 /security/drweb
parent(1) Drop maintainership. (diff)
Run as drweb user, not as root
Notes
Notes: svn path=/head/; revision=48488
Diffstat (limited to 'security/drweb')
-rw-r--r--security/drweb/Makefile2
-rw-r--r--security/drweb/files/ini-patch18
-rw-r--r--security/drweb/scripts/post-install35
3 files changed, 44 insertions, 11 deletions
diff --git a/security/drweb/Makefile b/security/drweb/Makefile
index ead6c0f184ae..e66684abd53e 100644
--- a/security/drweb/Makefile
+++ b/security/drweb/Makefile
@@ -7,7 +7,7 @@
PORTNAME= drweb
PORTVERSION= 4.26
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= security
MASTER_SITES= http://www.drweb.ru/ftp/web_pub/
DISTNAME= ${PORTNAME}d-${PORTVERSION}-freebsd4
diff --git a/security/drweb/files/ini-patch b/security/drweb/files/ini-patch
index b0a32e91ae06..70a07a5ae9c1 100644
--- a/security/drweb/files/ini-patch
+++ b/security/drweb/files/ini-patch
@@ -1,5 +1,5 @@
---- drweb32.ini-tmpl.orig Wed Oct 3 10:27:06 2001
-+++ drweb32.ini-tmpl Wed Oct 3 10:31:53 2001
+--- drweb32.ini-tmpl.orig Sat Oct 6 07:36:56 2001
++++ drweb32.ini-tmpl Sat Oct 6 07:39:10 2001
@@ -5,7 +5,7 @@
[BSD]
@@ -18,33 +18,31 @@
OutputMode = Color
FollowLinks = No
-@@ -47,22 +47,23 @@
- FilesTypes = XL?,WIZ,RTF,CL*,HT*,VB*,JS*,INF,AR?,ZIP,R??,PP?,OBJ,LIB,HLP,MD?
+@@ -48,21 +48,23 @@
FilesTypes = INI,MBR,IMG,CSC,CPL,MBP,SHS,SHB,PIF
LogTime = Yes
--LogFileName = "syslog"
-+LogFileName = "/var/log/drwebd.log"
+ LogFileName = "syslog"
++PidFile = "__INSTALL_DIR__/drwebd.pid"
;BusyFile = "/var/run/drwebd.bsy"
-SocketMode = TCP
-;SocketMode = Unix
+;SocketMode = TCP
+SocketMode = Unix
-+SocketFile = "/var/run/drwebd.sock"
++SocketFile = "__INSTALL_DIR__/drwebd.sock"
DaemonPort = 3000
SocketTimeout = 40
SocketReuseAddr = Yes
FileTimeout = 40
-OutputMode = Terminal
--LimitLog = No
+OutputMode = Quiet
-+LimitLog = Yes
+ LimitLog = No
MaxLogSize = 512
LogScanned = Yes
LogInfo = Yes
LogPacked = Yes
Interfaces = "localhost"
-;User = drweb
-+User = root
++User = drweb
;UserID =
;GroupID =
ScanFiles = All
diff --git a/security/drweb/scripts/post-install b/security/drweb/scripts/post-install
new file mode 100644
index 000000000000..d34cf735c326
--- /dev/null
+++ b/security/drweb/scripts/post-install
@@ -0,0 +1,35 @@
+#!/bin/sh
+ex=0
+if ! id -u drweb > /dev/null 2>&1; then
+ echo "You need an account \"drweb\" to install this package."
+ echo "Please add it by hand (try \"man vipw\") and try again."
+ echo ""
+ echo "An example /etc/master.passwd entry is:"
+ echo "drweb:*:426:426::0:0:Dr.Web Scanner:/nonexistent:/sbin/nologin"
+ echo ""
+ ex=1
+fi
+if ! grep -q "^drweb:" /etc/group; then
+ echo "You need a group \"drweb\" to install this package."
+ echo ""
+ echo "An example /etc/group entry is:"
+ echo "drweb:*:426:"
+ echo ""
+ ex=1
+fi
+if ! grep -q "^!drweb" /etc/syslog.conf; then
+ echo "You may also add this lines to your /etc/syslog.conf:"
+ echo "*.* /var/log/drwebd.log"
+ echo ""
+fi
+if crontab -u drweb -l 2>&1 | grep -q "no crontab"; then
+ echo "You may also use this crontab entry for \"drweb\" user:"
+ echo "SHELL=/bin/sh"
+ echo "MAILTO=root"
+ echo "0 12 * * * ${PREFIX}/drweb/update/update.pl ${PREFIX}/drweb"
+ echo ""
+fi
+[ "$ex" = "1" ] && exit 1
+usrdir=${PREFIX}/drweb
+chown -R drweb:drweb $usrdir
+exit 0