summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2001-10-06 04:25:14 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2001-10-06 04:25:14 +0000
commitcc35e16915397378289d3ab6f7c9e21a1f9a17f6 (patch)
tree52b6fd419cb3040101590ecb4522687fb90e4101 /security
parentRun as drweb user, not as root (diff)
Run as drweb user, not as root
Notes
Notes: svn path=/head/; revision=48489
Diffstat (limited to 'security')
-rw-r--r--security/drweb-sendmail/Makefile6
-rw-r--r--security/drweb-sendmail/files/patch-ac11
-rw-r--r--security/drweb-sendmail/scripts/post-install21
3 files changed, 33 insertions, 5 deletions
diff --git a/security/drweb-sendmail/Makefile b/security/drweb-sendmail/Makefile
index e3b90ed159a2..82efc5f8fef7 100644
--- a/security/drweb-sendmail/Makefile
+++ b/security/drweb-sendmail/Makefile
@@ -7,7 +7,7 @@
PORTNAME= drweb_sendmail
PORTVERSION= 4.26
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= security mail
MASTER_SITES= http://www.drweb.ru/ftp/web_pub/
DISTNAME= drwebd-${PORTVERSION}-freebsd4
@@ -83,8 +83,8 @@ pre-install:
${ECHO} "${PREFIX}/sbin"; \
${ECHO} ; \
${ECHO} u; \
- ${ECHO} /var/run/drweb-smf.sock; \
- ${ECHO} root; \
+ ${ECHO} "${PREFIX}/drweb/drweb-smf.sock"; \
+ ${ECHO} drweb; \
${ECHO} "${PREFIX}/drweb/infected.!!!"; \
${ECHO} y; \
${ECHO} /tmp; \
diff --git a/security/drweb-sendmail/files/patch-ac b/security/drweb-sendmail/files/patch-ac
index dadb24eba75b..500bbb4363dd 100644
--- a/security/drweb-sendmail/files/patch-ac
+++ b/security/drweb-sendmail/files/patch-ac
@@ -1,5 +1,5 @@
--- ../sendmail/configure.orig Wed Sep 26 01:02:29 2001
-+++ ../sendmail/configure Wed Oct 3 11:27:50 2001
++++ ../sendmail/configure Sat Oct 6 08:20:13 2001
@@ -22,6 +22,7 @@
___T_MILTER_LOGLEVEL___="-- ERROR ---"
___T_MILTER_TIMEOUT_1___="-- ERROR ---"
@@ -8,7 +8,14 @@
___T_COMMENT_LOG___="-- ERROR --"
___T_COMMENT_FFR___="-- ERROR --"
-@@ -106,7 +107,7 @@
+@@ -100,13 +101,13 @@
+
+ CACHE_ADDR="n"
+ POS=`$GREP PidFile $DAEMON_INI | $GREP -v ";"`
+-if [ "x$POS" = "x" ] ; then
++if [ "x" = "x" ] ; then
+ echo
+ echo -n "Daemon pidfile not defined in ini-file ..."
POS=`$GREP SocketMode $DAEMON_INI | $GREP -v ";" | $AWK '{ print match( $0, /[Tt][Cc][Pp]/ ) }'`
if [ $POS -eq 0 ] ; then
echo " but defined UNIX sockets"
diff --git a/security/drweb-sendmail/scripts/post-install b/security/drweb-sendmail/scripts/post-install
new file mode 100644
index 000000000000..7e0a5a7d02db
--- /dev/null
+++ b/security/drweb-sendmail/scripts/post-install
@@ -0,0 +1,21 @@
+#!/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
+[ "$ex" = "1" ] && exit 1
+exit 0