git-svn: trunk@199
Tomasz Kojm authored on 2004/01/23 20:06:00... | ... |
@@ -46,6 +46,7 @@ struct cfgstruct *parsecfg(const char *cfgfile) |
46 | 46 |
{"PidFile", OPT_STR}, |
47 | 47 |
{"MaxFileSize", OPT_COMPSIZE}, |
48 | 48 |
{"ScanMail", OPT_NOARG}, |
49 |
+ {"ScanOLE2", OPT_NOARG}, |
|
49 | 50 |
{"ScanArchive", OPT_NOARG}, |
50 | 51 |
{"ScanRAR", OPT_NOARG}, |
51 | 52 |
{"ArchiveMaxFileSize", OPT_COMPSIZE}, |
... | ... |
@@ -151,6 +151,13 @@ void *clamukoth(void *arg) |
151 | 151 |
logg("Clamuko: Archive support disabled.\n"); |
152 | 152 |
} |
153 | 153 |
|
154 |
+ if(cfgopt(tharg->copt, "ScanOLE2")) { |
|
155 |
+ logg("Clamuko: OLE2 support enabled.\n"); |
|
156 |
+ options |= CL_OLE2; |
|
157 |
+ } else { |
|
158 |
+ logg("Clamuko: OLE2 support disabled.\n"); |
|
159 |
+ } |
|
160 |
+ |
|
154 | 161 |
if((pt = cfgopt(tharg->copt, "ClamukoMaxFileSize"))) { |
155 | 162 |
sizelimit = pt->numarg; |
156 | 163 |
} else |
... | ... |
@@ -191,6 +191,13 @@ int acceptloop_proc(int socketd, struct cl_node *root, const struct cfgstruct *c |
191 | 191 |
logg("Mail support disabled.\n"); |
192 | 192 |
} |
193 | 193 |
|
194 |
+ if(cfgopt(copt, "ScanOLE2")) { |
|
195 |
+ logg("OLE2 support enabled.\n"); |
|
196 |
+ options |= CL_OLE2; |
|
197 |
+ } else { |
|
198 |
+ logg("OLE2 support disabled.\n"); |
|
199 |
+ } |
|
200 |
+ |
|
194 | 201 |
/* set up signal handling */ |
195 | 202 |
|
196 | 203 |
sigfillset(&sigset); |
... | ... |
@@ -39,6 +39,11 @@ |
39 | 39 |
pthread_t clamukoid; |
40 | 40 |
#endif |
41 | 41 |
|
42 |
+#ifdef TARGET_OS_DARWIN5_5 |
|
43 |
+#define pthread_sigmask(A, B, C) sigprocmask((A), (B), (C)) |
|
44 |
+#define pthread_kill(A, B) { } |
|
45 |
+#endif |
|
46 |
+ |
|
42 | 47 |
|
43 | 48 |
void *threadscanner(void *arg) |
44 | 49 |
{ |
... | ... |
@@ -398,9 +403,10 @@ int acceptloop_th(int socketd, struct cl_node *root, const struct cfgstruct *cop |
398 | 398 |
|
399 | 399 |
ths = (struct thrsession *) mcalloc(threads, sizeof(struct thrsession)); |
400 | 400 |
|
401 |
+ /* |
|
401 | 402 |
for(i = 0; i < threads; i++) |
402 | 403 |
pthread_mutex_init(&ths[i].mutex, NULL); |
403 |
- |
|
404 |
+ */ |
|
404 | 405 |
|
405 | 406 |
if(cfgopt(copt, "ScanArchive") || cfgopt(copt, "ClamukoScanArchive")) { |
406 | 407 |
|
... | ... |
@@ -475,6 +481,13 @@ int acceptloop_th(int socketd, struct cl_node *root, const struct cfgstruct *cop |
475 | 475 |
logg("Mail files support disabled.\n"); |
476 | 476 |
} |
477 | 477 |
|
478 |
+ if(cfgopt(copt, "ScanOLE2")) { |
|
479 |
+ logg("OLE2 support enabled.\n"); |
|
480 |
+ options |= CL_OLE2; |
|
481 |
+ } else { |
|
482 |
+ logg("OLE2 support disabled.\n"); |
|
483 |
+ } |
|
484 |
+ |
|
478 | 485 |
/* initialize important global variables */ |
479 | 486 |
progexit = 0; |
480 | 487 |
progpid = 0; |