Browse code

bytecode timeout 60s.

Török Edvin authored on 2010/03/25 01:34:58
Showing 4 changed files
... ...
@@ -467,5 +467,5 @@ Example
467 467
 
468 468
 # Set bytecode timeout in miliseconds.
469 469
 # 
470
-# Default: 5000
471
-# BytecodeTimeout 5000
470
+# Default: 60000
471
+# BytecodeTimeout 60000
... ...
@@ -68,7 +68,7 @@ static void context_safe(struct cli_bc_ctx *ctx)
68 68
 struct cli_bc_ctx *cli_bytecode_context_alloc(void)
69 69
 {
70 70
     struct cli_bc_ctx *ctx = cli_calloc(1, sizeof(*ctx));
71
-    ctx->bytecode_timeout = 5000;
71
+    ctx->bytecode_timeout = 60000;
72 72
     return ctx;
73 73
 }
74 74
 
... ...
@@ -300,7 +300,7 @@ struct cl_engine *cl_engine_new(void)
300 300
 
301 301
     new->bytecode_security = CL_BYTECODE_TRUST_SIGNED;
302 302
     /* 5 seconds timeout */
303
-    new->bytecode_timeout = 5000000;
303
+    new->bytecode_timeout = 60000;
304 304
     new->refcount = 1;
305 305
     new->ac_only = 0;
306 306
     new->ac_mindepth = CLI_DEFAULT_AC_MINDEPTH;
... ...
@@ -250,8 +250,8 @@ const struct clam_option __clam_options[] = {
250 250
     { "Bytecode", "bytecode", 0, TYPE_BOOL, MATCH_BOOL, 1, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "With this option enabled ClamAV will load bytecode from the database. It is highly recommended you keep this option on, otherwise you'll miss detections for many new viruses.", "yes" },
251 251
     { "BytecodeSecurity", NULL, 0, TYPE_STRING, "^(None|TrustSigned|Paranoid)$", -1, "TrustSigned", 0, OPT_CLAMD, 
252 252
 	"Set bytecode security level.\nPossible values:\n\tNone - no security at all, meant for debugging. DO NOT USE THIS ON PRODUCTION SYSTEMS\n\tTrustSigned - trust bytecode loaded from signed .c[lv]d files,\n\t\t insert runtime safety checks for bytecode loaded from other sources\n\tParanoid - don't trust any bytecode, insert runtime checks for all\nRecommended: TrustSigned, because bytecode in .cvd files already has these checks\n","TrustSigned"},
253
-    { "BytecodeTimeout", "bytecode-timeout", 0, TYPE_NUMBER, MATCH_NUMBER, 5000, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, 
254
-	"Set bytecode timeout in miliseconds.\n","5000"},
253
+    { "BytecodeTimeout", "bytecode-timeout", 0, TYPE_NUMBER, MATCH_NUMBER, 60000, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, 
254
+	"Set bytecode timeout in miliseconds.\n","60000"},
255 255
     { "DetectPUA", "detect-pua", 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "Detect Potentially Unwanted Applications.", "yes" },
256 256
 
257 257
     { "ExcludePUA", "exclude-pua", 0, TYPE_STRING, NULL, -1, NULL, FLAG_MULTIPLE, OPT_CLAMD | OPT_CLAMSCAN, "Exclude a specific PUA category. This directive can be used multiple times.\nSee http://www.clamav.net/support/pua for the complete list of PUA\ncategories.", "NetTool\nPWTool" },