Browse code

enable RTF extractor by default

git-svn: trunk@2598

Tomasz Kojm authored on 2007/01/08 05:51:43
Showing 6 changed files
... ...
@@ -1,3 +1,7 @@
1
+Sun Jan  7 21:48:22 CET 2007 (tk)
2
+---------------------------------
3
+  * libclamav: enable RTF extractor by default
4
+
1 5
 Sun Jan  7 21:38:01 CET 2007 (tk)
2 6
 ---------------------------------
3 7
   * libclamav: avoid unicode name collisions when scanning OLE2 containers,
... ...
@@ -128,10 +128,8 @@ static const struct cli_magic_s cli_magic[] = {
128 128
     {0,  "\320\317\021\340\241\261\032\341", 8, "OLE2 container", CL_TYPE_MSOLE2},
129 129
     {0,  "\%PDF-",			 5, "PDF document", CL_TYPE_PDF},
130 130
     {0,  "\266\271\254\256\376\377\377\377", 8, "CryptFF", CL_TYPE_CRYPTFF},
131
-
132
-#ifdef CL_EXPERIMENTAL  
133 131
     {0,  "{\\rtf",                           5, "RTF", CL_TYPE_RTF}, 
134
-#endif    
132
+
135 133
     /* Ignored types */
136 134
 
137 135
     {0,  "\000\000\001\263",             4, "MPEG video stream",  CL_TYPE_DATA},
... ...
@@ -54,9 +54,8 @@ typedef enum {
54 54
     CL_TYPE_UUENCODED,
55 55
     CL_TYPE_PST,	/* Microsoft Outlook binary email folder (.pst file) */
56 56
     CL_TYPE_HTML_UTF16,
57
-#ifdef CL_EXPERIMENTAL
58 57
     CL_TYPE_RTF,
59
-#endif
58
+
60 59
     /* bigger numbers have higher priority (in o-t-f detection) */
61 60
     CL_TYPE_HTML, /* on the fly */
62 61
     CL_TYPE_MAIL,  /* magic + on the fly */
... ...
@@ -21,8 +21,6 @@
21 21
 #include "clamav-config.h"
22 22
 #endif
23 23
 
24
-#ifdef CL_EXPERIMENTAL
25
-
26 24
 #include <stdio.h>
27 25
 #include <string.h>
28 26
 #include <sys/types.h>
... ...
@@ -665,5 +663,3 @@ int cli_scanrtf(int desc, cli_ctx *ctx)
665 665
 	SCAN_CLEANUP;
666 666
 	return ret;
667 667
 }
668
-
669
-#endif
... ...
@@ -1,11 +1,27 @@
1
+/*
2

                
3
+ *
4
+ *  This program is free software; you can redistribute it and/or modify
5
+ *  it under the terms of the GNU General Public License as published by
6
+ *  the Free Software Foundation; either version 2 of the License, or
7
+ *  (at your option) any later version.
8
+ *
9
+ *  This program is distributed in the hope that it will be useful,
10
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
+ *  GNU General Public License for more details.
13
+ *
14
+ *  You should have received a copy of the GNU General Public License
15
+ *  along with this program; if not, write to the Free Software
16
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17
+ *  MA 02110-1301, USA.
18
+ */
19
+
1 20
 #ifndef _RTF_H
2 21
 #define _RTF_H
3
-#include <clamav-config.h>
4
-#ifdef CL_EXPERIMENTAL
5 22
 
23
+#include "others.h"
6 24
 
7 25
 int cli_scanrtf(int desc, cli_ctx *ctx);
8 26
 
9 27
 #endif
10
-
11
-#endif
... ...
@@ -79,10 +79,7 @@ extern short cli_leavetemps_flag;
79 79
 #include "str.h"
80 80
 #include "mspack.h"
81 81
 #include "cab.h"
82
-
83
-#ifdef CL_EXPERIMENTAL
84 82
 #include "rtf.h"
85
-#endif
86 83
 
87 84
 #ifdef HAVE_ZLIB_H
88 85
 #include <zlib.h>
... ...
@@ -1772,11 +1769,9 @@ int cli_magic_scandesc(int desc, cli_ctx *ctx)
1772 1772
 		ret = cli_scanhtml_utf16(desc, ctx);
1773 1773
 	    break;
1774 1774
 
1775
-#ifdef CL_EXPERIMENTAL
1776 1775
 	case CL_TYPE_RTF:
1777 1776
 	    ret = cli_scanrtf(desc, ctx);
1778 1777
 	    break;
1779
-#endif
1780 1778
 
1781 1779
 	case CL_TYPE_MAIL:
1782 1780
 	    if(SCAN_MAIL)