summaryrefslogtreecommitdiffstats
path: root/security/drweb
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2001-10-06 04:10:21 +0000
committerache <ache@FreeBSD.org>2001-10-06 04:10:21 +0000
commitececa345452fccc99f1d429f808a3d0167a6097e (patch)
tree87e4ec01ad653407b3fb7f3ec2dcda04f160bced /security/drweb
parentbbf343f618ce4cc3095ecb1e024164c22fc4b640 (diff)
downloadFreeBSD-ports-ececa345452fccc99f1d429f808a3d0167a6097e.zip
FreeBSD-ports-ececa345452fccc99f1d429f808a3d0167a6097e.tar.gz
Run as drweb user, not as root
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 ead6c0f..e66684a 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 b0a32e9..70a07a5 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 0000000..d34cf73
--- /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
OpenPOWER on IntegriCloud