Hey all.
Now that clamav 0.93 is out which gets rid of the daily.inc directory
structure (daily.cvd turns into a single .cld file now) I real quick
hacked simscanmk.c to look for daily.cvd first and if not try daily.cld
instead.
Figured I'd post it if anyone else finds it useful. Diff attached.
| Bob Maple | bobm_at_burner_dot_com
|
| When love is gone, there's always justice. And when justice is gone,
| there's always force. And when force is gone, there's always Mom.
| Hi, Mom! -Laurie Anderson
--- simscanmk.c-dist 2008-04-20 13:47:56.000000000 -0600
+++ simscanmk.c 2008-04-20 13:47:17.000000000 -0600
@@ -123,6 +123,7 @@
char input[MAX_LINE];
char dbpath[MAX_LINE];
char *pos;
+ FILE *dbfp;
#if ENABLE_SPAM==1 || ENABLE_TROPHIE==1
int fnd_vsvers;
#endif
@@ -308,6 +309,15 @@
close(pin[0]); close(pin[1]);
strncpy(dbpath,CLAMAVDBPATH,MAX_DATA);
strcat(dbpath,"/daily.cvd");
+
+ /* handle new cld files if cvd doesn't exist - clamav 0.93 */
+ if( (dbfp=fopen( dbpath, "r" )) )
+ fclose(dbfp);
+ else {
+ strncpy(dbpath,CLAMAVDBPATH,MAX_DATA);
+ strcat(dbpath,"/daily.cld");
+ }
+
if (pipe(pin)){
printf("error opening pipe for sigtool\n");
}