]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
smtp: fix file logging and matching
authorVictor Julien <victor@inliniac.net>
Thu, 21 Apr 2016 12:37:43 +0000 (14:37 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 25 Apr 2016 13:32:14 +0000 (15:32 +0200)
When no rules with 'file content' keywords like filemd5 or filestore
were used, and non of the file outputs would force 'output' like
'force-md5' and 'force-magic', the file would not be tracked at all.

This meant that logging wouldn't work and neither would filename and
fileext inspection.

This patch removes the tracking bypass from the SMTP code and leaves
decisions to the file API.

src/app-layer-smtp.c

index 701b97dcf07dbe4a496ad216ba341725fc8833d9..79d4f16b83cc693ab322297e37827dd10d782ed2 100644 (file)
@@ -406,13 +406,6 @@ int SMTPProcessDataChunk(const uint8_t *chunk, uint32_t len,
         flags |= FILE_NOMD5;
     }
 
-    /* Determine whether to process files */
-    if ((flags & (FILE_NOSTORE | FILE_NOMAGIC | FILE_NOMD5)) ==
-            (FILE_NOSTORE | FILE_NOMAGIC | FILE_NOMD5)) {
-        SCLogDebug("File content ignored");
-        return 0;
-    }
-
     /* Find file */
     if (entity->ctnt_flags & CTNT_IS_ATTACHMENT) {