aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey A. Osokin <osa@FreeBSD.org>2004-03-26 13:20:57 +0000
committerSergey A. Osokin <osa@FreeBSD.org>2004-03-26 13:20:57 +0000
commit511f4d4e14b588cce23cae43511ffd52070b1b3b (patch)
tree0b3f5482c4f6ca8752600cd931c1ab609a2fc2ac
parent88888009def217baa74e82a921bd07da08981c82 (diff)
downloadports-511f4d4e14b588cce23cae43511ffd52070b1b3b.tar.gz
ports-511f4d4e14b588cce23cae43511ffd52070b1b3b.zip
Notes
-rw-r--r--security/avcheck/Makefile9
-rw-r--r--security/avcheck/distinfo1
-rw-r--r--security/avcheck/files/patch-avcheck.c56
-rw-r--r--security/avcheck/pkg-plist12
4 files changed, 62 insertions, 16 deletions
diff --git a/security/avcheck/Makefile b/security/avcheck/Makefile
index 62d559923c51..0f096b03c5c7 100644
--- a/security/avcheck/Makefile
+++ b/security/avcheck/Makefile
@@ -7,6 +7,7 @@
PORTNAME= avcheck
PORTVERSION= 0.9
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://www.corpit.ru/ftp/avcheck/
@@ -17,16 +18,16 @@ USE_REINPLACE= yes
MAN1= avcheck.1
-AVCHECK_DOCS= README.AVP README.AVP.de README.DrWeb README.Exim \
+PLIST_FILES= sbin/avcheck sbin/uchroot
+PORTDOCS= README.AVP README.AVP.de README.DrWeb README.Exim \
README.Postfix README.Postfix.de README.Sendmail eicar.msg \
eicar.txt
-AVCHECK_SBINS= avcheck uchroot
post-patch:
@${REINPLACE_CMD} -e 's/^CC/#CC/g ; s/^CFLAGS/#CFLAGS/g' ${WRKSRC}/Makefile
do-install:
-.for i in ${AVCHECK_SBINS}
+.for i in avcheck uchroot
${INSTALL_PROGRAM} ${WRKSRC}/${i} ${PREFIX}/sbin/
.endfor
@@ -36,7 +37,7 @@ do-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
-.for i in ${AVCHECK_DOCS}
+.for i in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}/
.endfor
.endif
diff --git a/security/avcheck/distinfo b/security/avcheck/distinfo
index 671a51d1bcfb..f22aae36dbd9 100644
--- a/security/avcheck/distinfo
+++ b/security/avcheck/distinfo
@@ -1 +1,2 @@
MD5 (avcheck-0.9.tar.gz) = fba30c3992c97d93d07daeaa46f4df80
+SIZE (avcheck-0.9.tar.gz) = 46934
diff --git a/security/avcheck/files/patch-avcheck.c b/security/avcheck/files/patch-avcheck.c
new file mode 100644
index 000000000000..1bf53cc60fc2
--- /dev/null
+++ b/security/avcheck/files/patch-avcheck.c
@@ -0,0 +1,56 @@
+--- avcheck.c.orig Sun Jul 28 00:22:05 2002
++++ avcheck.c Thu Mar 25 10:32:17 2004
+@@ -530,23 +530,27 @@
+ #define DRWEBD_SCAN_FLAGS (DRWEBD_RETURN_VIRUSES/*|DRWEBD_HEURISTIC_ON*/)
+
+ /* DrWeb result codes */
+-#define DERR_READ_ERR 0x00001
+-#define DERR_WRITE_ERR 0x00002
+-#define DERR_NOMEMORY 0x00004
+-#define DERR_CRC_ERROR 0x00008
+-#define DERR_READSOCKET 0x00010
+-#define DERR_KNOWN_VIRUS 0x00020
+-#define DERR_UNKNOWN_VIRUS 0x00040
+-#define DERR_VIRUS_MODIFICATION 0x00080
+-#define DERR_TIMEOUT 0x00200
+-#define DERR_SYMLINK 0x00400
+-#define DERR_NO_REGFILE 0x00800
+-#define DERR_SKIPPED 0x01000
+-#define DERR_TOO_BIG 0x02000
+-#define DERR_TOO_COMPRESSED 0x04000
+-#define DERR_BAD_CALL 0x08000
+-#define DERR_EVAL_VERSION 0x10000
+-#define DERR_SPAM_MESSAGE 0x20000
++#define DERR_READ_ERR 0x00000001
++#define DERR_WRITE_ERR 0x00000002
++#define DERR_NOMEMORY 0x00000004
++#define DERR_CRC_ERROR 0x00000008
++#define DERR_READSOCKET 0x00000010
++#define DERR_KNOWN_VIRUS 0x00000020
++#define DERR_UNKNOWN_VIRUS 0x00000040
++#define DERR_VIRUS_MODIFICATION 0x00000080
++#define DERR_HAVE_CURED 0x00000100
++#define DERR_TIMEOUT 0x00000200
++#define DERR_SYMLINK 0x00000400
++#define DERR_NO_REGFILE 0x00000800
++#define DERR_SKIPPED 0x00001000
++#define DERR_TOO_BIG 0x00002000
++#define DERR_TOO_COMPRESSED 0x00004000
++#define DERR_BAD_CALL 0x00008000
++#define DERR_EVAL_VERSION 0x00010000
++#define DERR_SPAM_MESSAGE 0x00020000
++#define DERR_ARCHIVE_LEVEL 0x00040000
++#define DERR_HAVE_DELETED 0x00080000
++#define DERR_IS_CLEAN 0x00100000
+
+ #define DERR_VIRUS \
+ (DERR_KNOWN_VIRUS|DERR_UNKNOWN_VIRUS|DERR_VIRUS_MODIFICATION)
+@@ -570,7 +574,7 @@
+ if (read(fd, &c, sizeof(c)) != sizeof(c) || /* code */
+ read(fd, &n, sizeof(n)) != sizeof(n)) /* number of viruses */
+ err(errno, "error reading %s daemon response", avname);
+- if ((c = ntohl(c)) == 0)
++ if (((c = ntohl(c)) == 0) || (c & DERR_IS_CLEAN))
+ return 0; /* all ok, no viruses found (n should be 0) */
+
+ if (!(c & DERR_VIRUS)) {
diff --git a/security/avcheck/pkg-plist b/security/avcheck/pkg-plist
deleted file mode 100644
index 78dccb787989..000000000000
--- a/security/avcheck/pkg-plist
+++ /dev/null
@@ -1,12 +0,0 @@
-sbin/avcheck
-sbin/uchroot
-%%PORTDOCS%%share/doc/avcheck/README.AVP
-%%PORTDOCS%%share/doc/avcheck/README.AVP.de
-%%PORTDOCS%%share/doc/avcheck/README.DrWeb
-%%PORTDOCS%%share/doc/avcheck/README.Exim
-%%PORTDOCS%%share/doc/avcheck/README.Postfix
-%%PORTDOCS%%share/doc/avcheck/README.Postfix.de
-%%PORTDOCS%%share/doc/avcheck/README.Sendmail
-%%PORTDOCS%%share/doc/avcheck/eicar.msg
-%%PORTDOCS%%share/doc/avcheck/eicar.txt
-%%PORTDOCS%%@dirrm share/doc/avcheck