mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-14 03:10:47 +00:00
06674a4201
PR: ports/169462 Submitted by: "Bryan Drewery" <bryan@shatow.net>
108 lines
3.0 KiB
Plaintext
108 lines
3.0 KiB
Plaintext
--- ./configure.orig 2007-10-29 09:14:25.000000000 -0500
|
|
+++ ./configure 2012-06-26 14:20:22.000000000 -0500
|
|
@@ -4682,13 +4682,26 @@
|
|
clamavdb=""
|
|
for f in "$CLAMAV_DB" /usr/local/share/clamav /var/lib/clamav
|
|
do
|
|
- if test -f "$f/daily.cvd"
|
|
+ if test -f "$f/daily.cvd" || test -d "$f/daily.inc"
|
|
+ then
|
|
+ clamavdb=$f
|
|
+ break
|
|
+ elif test -f "$f/daily.cld"
|
|
+ then
|
|
+ clamavdb=$f
|
|
+ break
|
|
+ elif test -f "$f/daily.inc/daily.info"
|
|
then
|
|
clamavdb=$f
|
|
break
|
|
fi
|
|
done
|
|
|
|
+ # Default to $f/daily.cld
|
|
+ if test "$clamavdb" = ""; then
|
|
+ clamavdb="$f/daily.cld"
|
|
+ fi
|
|
+
|
|
if test "$clamavdb" = ""
|
|
then
|
|
echo "$as_me:$LINENO: result: no" >&5
|
|
--- ./configure.in.orig 2007-10-29 09:13:40.000000000 -0500
|
|
+++ ./configure.in 2012-06-26 14:20:02.000000000 -0500
|
|
@@ -622,9 +622,22 @@
|
|
then
|
|
clamavdb=$f
|
|
break
|
|
+ elif test -f "$f/daily.cld"
|
|
+ then
|
|
+ clamavdb=$f
|
|
+ break
|
|
+ elif test -f "$f/daily.inc/daily.info"
|
|
+ then
|
|
+ clamavdb=$f
|
|
+ break
|
|
fi
|
|
done
|
|
|
|
+ # Default to $f/daily.cld
|
|
+ if test "$clamavdb" = ""; then
|
|
+ clamavdb="$f/daily.cld"
|
|
+ fi
|
|
+
|
|
if test "$clamavdb" = ""
|
|
then
|
|
AC_MSG_RESULT(no)
|
|
--- simscanmk.c 2006-10-10 19:15:17.000000000 -0400
|
|
+++ simscanmk.c 2008-07-07 14:21:46.000000000 -0400
|
|
@@ -123,6 +123,7 @@
|
|
char input[MAX_LINE];
|
|
char dbpath[MAX_LINE];
|
|
char *pos;
|
|
+ int rv;
|
|
#if ENABLE_SPAM==1 || ENABLE_TROPHIE==1
|
|
int fnd_vsvers;
|
|
#endif
|
|
@@ -276,8 +277,18 @@
|
|
waitpid(pid,&rmstat,0);
|
|
close(pin[0]); close(pin[1]);
|
|
}
|
|
- strncpy(dbpath,CLAMAVDBPATH,MAX_DATA);
|
|
- strcat(dbpath,"/main.cvd");
|
|
+ strncpy(dbpath,CLAMAVDBPATH,MAX_LINE);
|
|
+ strncat(dbpath,"/main.inc/main.info",(MAX_LINE-sizeof(CLAMAVDBPATH)-1));
|
|
+ rv=access(dbpath,F_OK);
|
|
+ if(rv) {
|
|
+ strncpy(dbpath,CLAMAVDBPATH,MAX_LINE);
|
|
+ strncat(dbpath,"/main.cld",(MAX_LINE-sizeof(CLAMAVDBPATH)-1));
|
|
+ }
|
|
+ rv=access(dbpath,F_OK);
|
|
+ if(rv) {
|
|
+ strncpy(dbpath,CLAMAVDBPATH,MAX_LINE);
|
|
+ strncat(dbpath,"/main.cvd",(MAX_LINE-sizeof(CLAMAVDBPATH)-1));
|
|
+ }
|
|
strcat(data,"m:");
|
|
if (pipe(pin)){
|
|
printf("error opening pipe for sigtool\n");
|
|
@@ -306,8 +317,18 @@
|
|
}
|
|
waitpid(pid,&rmstat,0);
|
|
close(pin[0]); close(pin[1]);
|
|
- strncpy(dbpath,CLAMAVDBPATH,MAX_DATA);
|
|
- strcat(dbpath,"/daily.cvd");
|
|
+ strncpy(dbpath,CLAMAVDBPATH,MAX_LINE);
|
|
+ strncat(dbpath,"/daily.inc/daily.info",(MAX_LINE-sizeof(CLAMAVDBPATH)-1));
|
|
+ rv=access(dbpath,F_OK);
|
|
+ if(rv) {
|
|
+ strncpy(dbpath,CLAMAVDBPATH,MAX_LINE);
|
|
+ strncat(dbpath,"/daily.cld",(MAX_LINE-sizeof(CLAMAVDBPATH)-1));
|
|
+ }
|
|
+ rv=access(dbpath,F_OK);
|
|
+ if(rv) {
|
|
+ strncpy(dbpath,CLAMAVDBPATH,MAX_LINE);
|
|
+ strncat(dbpath,"/daily.cvd",(MAX_LINE-sizeof(CLAMAVDBPATH)-1));
|
|
+ }
|
|
if (pipe(pin)){
|
|
printf("error opening pipe for sigtool\n");
|
|
}
|