Browse code

Fix compilation error from new clamav.h

git-svn: trunk@2568

Nigel Horne authored on 2006/12/20 23:57:05
Showing 3 changed files
... ...
@@ -1,3 +1,8 @@
1
+Wed Dec 20 14:56:12 GMT 2006 (njh)
2
+----------------------------------
3
+  * libclamav/mbox.c, clamav-milter:	Fix compilation error from new clamav.h
4
+		(see below)
5
+
1 6
 Wed Dec 20 02:19:45 CET 2006 (tk)
2 7
 ---------------------------------
3 8
   * libclamav: options cleanup; requires additional changes in mbox.c and
... ...
@@ -24,7 +24,7 @@
24 24
  *
25 25
  * For installation instructions see the file INSTALL that came with this file
26 26
  */
27
-static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.305 2006/12/19 15:41:16 njh Exp $";
27
+static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.306 2006/12/20 14:55:17 njh Exp $";
28 28
 
29 29
 #define	CM_VERSION	"devel-191206"
30 30
 
... ...
@@ -5355,12 +5355,12 @@ loadDatabase(void)
5355 5355
 #endif
5356 5356
 	signatures = 0;
5357 5357
 	newroot = NULL;
5358
-	dboptions = 0;
5359 5358
 
5360 5359
 	if(!cfgopt(copt, "DetectPhishing")->enabled) {
5361
-		dboptions |= CL_DB_NOPHISHING;
5362 5360
 		logg("Not loading phishing signatures.\n");
5363
-	}
5361
+		dboptions = 0;
5362
+	} else
5363
+		dboptions = CL_DB_PHISHING;
5364 5364
 
5365 5365
 	ret = cl_load(dbdir, &newroot, &signatures, dboptions);
5366 5366
 	if(ret != 0) {
... ...
@@ -16,7 +16,7 @@
16 16
  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 17
  *  MA 02110-1301, USA.
18 18
  */
19
-static	char	const	rcsid[] = "$Id: mbox.c,v 1.362 2006/12/18 17:03:58 njh Exp $";
19
+static	char	const	rcsid[] = "$Id: mbox.c,v 1.363 2006/12/20 14:55:17 njh Exp $";
20 20
 
21 21
 #ifdef	_MSC_VER
22 22
 #include <winsock.h>	/* only needed in CL_EXPERIMENTAL */
... ...
@@ -2037,7 +2037,7 @@ parseEmailBody(message *messageIn, text *textIn, mbox_ctx *mctx, unsigned int re
2037 2037
 	fileblob *fb;
2038 2038
 	bool infected = FALSE;
2039 2039
 #ifdef CL_EXPERIMENTAL
2040
-	const int doPhishingScan = !(mctx->ctx->engine->dboptions&CL_DB_NOPHISHING_URLS); /* || (mctx->ctx->options&CL_SCAN_PHISHING_GA_TRAIN) || (mctx->ctx->options&CL_SCAN_PHISHING_GA);  kept here for the GA MERGE */
2040
+	const int doPhishingScan = mctx->ctx->engine->dboptions&CL_DB_PHISHING_URLS; /* || (mctx->ctx->options&CL_SCAN_PHISHING_GA_TRAIN) || (mctx->ctx->options&CL_SCAN_PHISHING_GA);  kept here for the GA MERGE */
2041 2041
 #endif
2042 2042
 
2043 2043
 	cli_dbgmsg("in parseEmailBody\n");
... ...
@@ -3909,7 +3909,8 @@ checkURLs(message *mainMessage, mbox_ctx *mctx, int *rc, int is_html)
3909 3909
 	tag_arguments_t hrefs;
3910 3910
 	blob *b;
3911 3911
 
3912
-	hrefs.scanContents = (!(mctx->ctx->engine->dboptions&CL_DB_NOPHISHING_URLS)); /* aCaB: stripped GA related stuff */
3912
+	/* aCaB: stripped GA related stuff */
3913
+	hrefs.scanContents = mctx->ctx->engine->dboptions&CL_DB_PHISHING_URLS;
3913 3914
 
3914 3915
 #if    (!defined(FOLLOWURLS)) || (FOLLOWURLS <= 0)
3915 3916
 	if(!hrefs.scanContents)
... ...
@@ -5246,7 +5247,7 @@ do_multipart(message *mainMessage, message **messages, int i, int *rc, mbox_ctx
5246 5246
 					if((mctx->ctx->options&CL_SCAN_MAILURL) && is_html)
5247 5247
 						checkURLs(aMessage, mctx, rc, 1);
5248 5248
 #ifdef	CL_EXPERIMENTAL
5249
-					else if(!(mctx->ctx->engine->dboptions&CL_DB_NOPHISHING_URLS))
5249
+					else if(mctx->ctx->engine->dboptions&CL_DB_PHISHING_URLS)
5250 5250
 						checkURLs(aMessage, mctx, rc, is_html);
5251 5251
 #endif
5252 5252
 					messageAddArgument(aMessage,