Hi,
I prepared a patch for database loading from the cvd archives without unpacking
the
database to tmp space first. It should fit to current CVS. Right now its only
implemented for clamd. To test, please add the following clamd.conf option:
LoadPackedDatabase yes
Please test, any suggestions are welcome.
Cheers
Peter
--
Peter Vollmer
Software Engineer
Innominate Security Technologies AG /device attached security/
Albert-Einstein-Str. 14
D-12489 Berlin, Germany
www.innominate.com
Index: clamd/clamd.c
===================================================================
RCS file: /cvsroot/clamav/clamav-devel/clamd/clamd.c,v
retrieving revision 1.41
diff -b -w -u -r1.41 clamd.c
--- clamd/clamd.c 15 May 2006 18:30:18 -0000 1.41
+++ clamd/clamd.c 30 May 2006 11:09:56 -0000
@@ -259,7 +259,22 @@
logg("Not loading phishing signatures.\n");
}
- if((ret = cl_load(dbdir, &root, &virnum, dboptions))) {
+
+ if (cfgopt(copt, "LoadPackedDatabase")) {
+ char path[256];
+ fprintf(stderr, "loading packed databases\n");
+ snprintf(path, sizeof(path), "%s/main.cvd", dbdir);
+ if((ret = cl_loaddb_packed(path, &root, &virnum, 0))) {
+ logg("!cant load %s: %s\n", path, cl_strerror(ret));
+ exit(1);
+ }
+ snprintf(path, sizeof(path), "%s/daily.cvd", dbdir);
+ if((ret = cl_loaddb_packed(path, &root, &virnum, 1))) {
+ logg("!cant load %s: %s\n", path, cl_strerror(ret));
+ exit(1);
+ }
+ }
+ else if((ret = cl_load(dbdir, &root, &virnum, dboptions))) {
fprintf(stderr, "ERROR: %s\n", cl_strerror(ret));
logg("!%s\n", cl_strerror(ret));
exit(1);
Index: libclamav/cvd.c
===================================================================
RCS file: /cvsroot/clamav/clamav-devel/libclamav/cvd.c,v
retrieving revision 1.27
diff -b -w -u -r1.27 cvd.c
--- libclamav/cvd.c 9 Apr 2006 19:59:27 -0000 1.27
+++ libclamav/cvd.c 30 May 2006 11:10:01 -0000
@@ -439,3 +439,41 @@
return 0;
}
+
+int cli_cvdload_packed(FILE *fd, short warn, unsigned int options)
+{
+ char *tmp, *buffer;
+ struct cl_cvd cvd;
+ int bytes, ret;
+ FILE *tmpd;
+ time_t stime;
+
+
+ cli_dbgmsg("in cli_cvdload()\n");
+
+ /* verify */
+
+ if((ret = cli_cvdverify(fd, &cvd)))
+ return ret;
+
+ if(cvd.stime && warn) {
+ time(&stime);
+ if((int) stime - cvd.stime > 604800) {
+ cli_warnmsg("**************************************************\n");
+ cli_warnmsg("*** The virus database is older than 7 days. ***\n");
+ cli_warnmsg("*** Please update it IMMEDIATELY! ***\n");
+ cli_warnmsg("**************************************************\n");
+ }
+ }
+
+ if(cvd.fl > cl_retflevel()) {
+
cli_warnmsg("********************************************************\n");
+ cli_warnmsg("*** This version of the ClamAV engine is outdated.
***\n");
+ cli_warnmsg("*** DON'T PANIC! Read http://www.clamav.net/faq.html
***\n");
+
cli_warnmsg("********************************************************\n");
+ }
+
+ fseek(fd, 512, SEEK_SET);
+
+ return 0;
+}
Index: libclamav/cvd.h
===================================================================
RCS file: /cvsroot/clamav/clamav-devel/libclamav/cvd.h,v
retrieving revision 1.7
diff -b -w -u -r1.7 cvd.h
--- libclamav/cvd.h 9 Apr 2006 19:59:27 -0000 1.7
+++ libclamav/cvd.h 30 May 2006 11:10:01 -0000
@@ -24,6 +24,7 @@
#include "clamav.h"
int cli_cvdload(FILE *fd, struct cl_engine **engine, unsigned int *signo,
short warn, unsigned int options);
+int cli_cvdload_packed(FILE *fd, short warn, unsigned int options);
int cli_untgz(int fd, const char *destdir);
#endif
Index: libclamav/readdb.c
===================================================================
RCS file: /cvsroot/clamav/clamav-devel/libclamav/readdb.c,v
retrieving revision 1.74
diff -b -w -u -r1.74 readdb.c
--- libclamav/readdb.c 18 May 2006 11:29:24 -0000 1.74
+++ libclamav/readdb.c 30 May 2006 11:10:03 -0000
@@ -1,6 +1,10 @@
/*
* Copyright (C) 2002 - 2006 Tomasz Kojm <[EMAIL PROTECTED]>
*
+ * read packed database:
+ * 2006 Peter Vollmer , Innominate Security Technologies
AG
+ * <[EMAIL PROTECTED]>
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -31,6 +35,7 @@
#include <sys/stat.h>
#include <sys/param.h>
#include <fcntl.h>
+#include <zlib.h>
#include "clamav.h"
#include "cvd.h"
@@ -1494,3 +1499,599 @@
return engine;
}
+
+
+/* read archived database directly */
+
+#define TAR_BLOCKSIZE 512
+
+typedef enum {
+ cvd_undef,
+ cvd_db,
+ cvd_db2,
+ cvd_db3,
+ cvd_hdb,
+ cvd_fp,
+ cvd_ndb,
+ cvd_sdb,
+ cvd_zmd,
+ cvd_rmd,
+ cvd_copying,
+} cvd_type;
+
+static int cli_parse_db(char *buffer, int line, struct cl_engine **engine,
unsigned int *signo, unsigned int options)
+{
+ char *pt, *start;
+ int ret = 0;
+ struct cli_matcher *root;
+
+ root = (*engine)->root[0];
+
+ pt = strchr(buffer, '=');
+ if(!pt) {
+ cli_errmsg("Malformed pattern line %d\n", line);
+ return CL_EMALFDB;
+ }
+
+ start = buffer;
+ *pt++ = 0;
+
+ if(*pt == '=')
+ return 0;
+
+ if((ret = cli_parse_add(root, start, pt, 0, NULL, 0))) {
+ return CL_EMALFDB;
+ }
+
+ if(signo)
+ (*signo)++;
+ return 0;
+}
+
+static int cli_parse_ndb(char *buffer, int line, struct cl_engine **engine,
unsigned int *signo, unsigned int options)
+{
+ char *sig = NULL, *virname = NULL, *offset = NULL, *pt= NULL;
+ struct cli_matcher *root;
+ int sigs = 0, ret = 0;
+ unsigned short target;
+
+ if(!strncmp(buffer, "Exploit.JPEG.Comment", 20)) /* temporary */
+ return 0;
+
+ if((options & CL_DB_NOPHISHING) &&
+ (!strncmp(buffer, "HTML.Phishing", 13) || !strncmp(buffer,
"Email.Phishing", 14)))
+ return 0;
+
+ if(!(virname = cli_strtok(buffer, 0, ":"))) {
+ ret = CL_EMALFDB;
+ goto cli_parse_ndb_error;
+ }
+
+ if((pt = cli_strtok(buffer, 4, ":"))) { /* min version */
+ if(!isdigit(*pt)) {
+ ret = CL_EMALFDB;
+ goto cli_parse_ndb_error;
+ }
+
+ if(atoi(pt) > cl_retflevel()) {
+ cli_warnmsg("Signature for %s requires new ClamAV version. Please
update!\n", virname);
+ ret = 0;
+ goto cli_parse_ndb_error;
+ }
+
+ free(pt);
+ pt = NULL;
+
+ if((pt = cli_strtok(buffer, 5, ":"))) { /* max version */
+ if(!isdigit(*pt)) {
+ ret = CL_EMALFDB;
+ goto cli_parse_ndb_error;
+ }
+
+ if(atoi(pt) < cl_retflevel()) {
+ ret = 0;
+ goto cli_parse_ndb_error;
+ }
+ free(pt);
+ pt = NULL;
+ }
+ }
+
+ if(!(pt = cli_strtok(buffer, 1, ":")) || !isdigit(*pt)) {
+ ret = CL_EMALFDB;
+ goto cli_parse_ndb_error;
+ }
+ target = (unsigned short) atoi(pt);
+ free(pt);
+ pt = NULL;
+
+ if(target >= CL_TARGET_TABLE_SIZE) {
+ cli_dbgmsg("Not supported target type in signature for %s\n", virname);
+ ret = 0;
+ goto cli_parse_ndb_error;
+ }
+
+ root = (*engine)->root[target];
+
+ if(!(offset = cli_strtok(buffer, 2, ":"))) {
+ ret = CL_EMALFDB;
+ goto cli_parse_ndb_error;
+ } else if(!strcmp(offset, "*")) {
+ free(offset);
+ offset = NULL;
+ }
+
+ if(!(sig = cli_strtok(buffer, 3, ":"))) {
+ ret = CL_EMALFDB;
+ goto cli_parse_ndb_error;
+ }
+ if((ret = cli_parse_add(root, virname, sig, 0, offset, target))) {
+ ret = CL_EMALFDB;
+ goto cli_parse_ndb_error;
+ }
+
+ if(signo)
+ (*signo)++;
+
+ return 0;
+
+ cli_parse_ndb_error:
+ if (pt) free(pt);
+ if (virname) free(virname);
+ if (offset) free(offset);
+ if (sig) free(sig);
+
+ return ret;
+}
+
+static int cli_parse_hdb(char* buffer, int line, struct cl_engine **engine,
unsigned int *signo, unsigned short fp, unsigned int options)
+{
+ char *pt;
+ int ret = 0;
+ struct cli_md5_node *new = NULL;
+
+ new = (struct cli_md5_node *) cli_calloc(1, sizeof(struct cli_md5_node));
+ if(!new) {
+ ret = CL_EMEM;
+ goto cli_parse_hdb_error;
+ }
+
+ new->fp = fp;
+
+ if(!(pt = cli_strtok(buffer, 0, ":"))) {
+ ret = CL_EMALFDB;
+ goto cli_parse_hdb_error;
+ }
+
+ if(!(new->md5 = (unsigned char *) cli_hex2str(pt))) {
+ cli_errmsg("Malformed MD5 string at line %d\n", line);
+ ret = CL_EMALFDB;
+ goto cli_parse_hdb_error;
+ }
+ free(pt);
+ pt = NULL;
+
+ if(!(pt = cli_strtok(buffer, 1, ":"))) {
+ ret = CL_EMALFDB;
+ goto cli_parse_hdb_error;
+ }
+ new->size = atoi(pt);
+ free(pt);
+ pt = NULL;
+
+ if(!(new->virname = cli_strtok(buffer, 2, ":"))) {
+ ret = CL_EMALFDB;
+ goto cli_parse_hdb_error;
+ }
+
+ new->viralias = cli_strtok(buffer, 3, ":"); /* aliases are optional */
+
+ new->next = (*engine)->md5_hlist[new->md5[0] & 0xff];
+ (*engine)->md5_hlist[new->md5[0] & 0xff] = new;
+
+ if(signo)
+ (*signo)++;
+
+ return 0;
+
+ cli_parse_hdb_error:
+ if (pt) free(pt);
+ if(new) {
+ if (new->md5) free(new->md5);
+ if (new->viralias) free(new->viralias);
+ if (new->virname) free(new->virname);
+ free(new);
+ }
+ return ret;
+}
+
+static int cli_parse_md(char *buffer, int line, struct cl_engine **engine,
unsigned int *signo, int type, unsigned int options)
+{
+ char *pt;
+ int ret = 0;
+ struct cli_meta_node *new;
+
+ if(buffer[0] == '#') {
+ /* skip comment */
+ return 0;
+ }
+
+ new = (struct cli_meta_node *) cli_calloc(1, sizeof(struct cli_meta_node));
+ if(!new) {
+ ret = CL_EMEM;
+ goto cli_parse_md_error;
+ }
+
+ if(!(new->virname = cli_strtok(buffer, 0, ":"))) {
+ ret = CL_EMALFDB;
+ goto cli_parse_md_error;
+ }
+
+ if(!(pt = cli_strtok(buffer, 1, ":"))) {
+ ret = CL_EMALFDB;
+ goto cli_parse_md_error;
+ } else {
+ new->encrypted = atoi(pt);
+ free(pt);
+ pt = NULL;
+ }
+
+ if(!(new->filename = cli_strtok(buffer, 2, ":"))) {
+ ret = CL_EMALFDB;
+ goto cli_parse_md_error;
+ } else {
+ if(!strcmp(new->filename, "*")) {
+ free(new->filename);
+ new->filename = NULL;
+ }
+ }
+
+ if(!(pt = cli_strtok(buffer, 3, ":"))) {
+ ret = CL_EMALFDB;
+ goto cli_parse_md_error;
+ } else {
+ if(!strcmp(pt, "*"))
+ new->size = -1;
+ else
+ new->size = atoi(pt);
+ free(pt);
+ pt = NULL;
+ }
+
+ if(!(pt = cli_strtok(buffer, 4, ":"))) {
+ ret = CL_EMALFDB;
+ goto cli_parse_md_error;
+ } else {
+ if(!strcmp(pt, "*"))
+ new->csize = -1;
+ else
+ new->csize = atoi(pt);
+ free(pt);
+ pt = NULL;
+ }
+
+ if(!(pt = cli_strtok(buffer, 5, ":"))) {
+ ret = CL_EMALFDB;
+ goto cli_parse_md_error;
+ } else {
+ if(!strcmp(pt, "*")) {
+ new->crc32 = 0;
+ } else {
+ new->crc32 = cli_hex2num(pt);
+ if(new->crc32 == -1) {
+ ret = CL_EMALFDB;
+ goto cli_parse_md_error;
+ }
+ }
+ free(pt);
+ pt = NULL;
+ }
+
+ if(!(pt = cli_strtok(buffer, 6, ":"))) {
+ ret = CL_EMALFDB;
+ goto cli_parse_md_error;
+ } else {
+ if(!strcmp(pt, "*"))
+ new->method = -1;
+ else
+ new->method = atoi(pt);
+ free(pt);
+ pt = NULL;
+ }
+
+ if(!(pt = cli_strtok(buffer, 7, ":"))) {
+ ret = CL_EMALFDB;
+ goto cli_parse_md_error;
+ } else {
+ if(!strcmp(pt, "*"))
+ new->fileno = 0;
+ else
+ new->fileno = atoi(pt);
+ free(pt);
+ pt = NULL;
+ }
+
+ if(!(pt = cli_strtok(buffer, 8, ":"))) {
+ ret = CL_EMALFDB;
+ goto cli_parse_md_error;
+ } else {
+ if(!strcmp(pt, "*"))
+ new->maxdepth = 0;
+ else
+ new->maxdepth = atoi(pt);
+ free(pt);
+ pt = NULL;
+ }
+
+ if(type == 1) {
+ new->next = (*engine)->zip_mlist;
+ (*engine)->zip_mlist = new;
+ } else {
+ new->next = (*engine)->rar_mlist;
+ (*engine)->rar_mlist = new;
+ }
+
+ if(signo)
+ (*signo)++;
+
+ return 0;
+
+ cli_parse_md_error:
+ if (pt) free(pt);
+ if (new) {
+ if (new->virname) free(new->virname);
+ if (new->filename) free(new->filename);
+ free(new);
+ }
+ return ret;
+}
+
+int cl_loaddb_packed(char *cvdname, struct cl_engine **engine, unsigned int
*signo, int warn, unsigned int options)
+{
+ FILE *fd=NULL;
+ int ret;
+
+ char osize[13], filename[101], type;
+ char block[TAR_BLOCKSIZE];
+ char *linebuf = NULL;
+ int linebuf_len, inpos, outpos;
+ int line=0;
+
+ int nbytes, nread, nwritten, in_block = 0;
+ unsigned int size;
+ cvd_type cvdtype = cvd_undef;
+ gzFile *infile = NULL;
+
+ cli_dbgmsg("in cl_loaddb_packed(): %s\n", cvdname);
+
+ if((fd = fopen(cvdname, "rb")) == NULL) {
+ cli_errmsg("cl_loaddb(): Can't open file %s\n", cvdname);
+ ret = CL_EOPEN;
+ goto cl_loaddb_packed_error;
+ }
+ if(!cli_strbcasestr(cvdname, ".cvd")) {
+ cli_errmsg("%s is not a .cvd file\n", cvdname);
+ ret = CL_EOPEN;
+ goto cl_loaddb_packed_error;
+ }
+ ret = cli_cvdload_packed(fd, warn, options);
+ if (ret) {
+ cli_errmsg("cant parse cvd header in %s\n", cvdname);
+ ret = CL_EOPEN;
+ goto cl_loaddb_packed_error;
+ }
+
+ if((infile = gzdopen(fileno(fd), "rb")) == NULL) {
+ cli_errmsg("Can't gzdopen() descriptor %d\n", fd);
+ ret = CL_EOPEN;
+ goto cl_loaddb_packed_error;
+ }
+ linebuf_len = TAR_BLOCKSIZE * 2;
+ linebuf = cli_calloc(linebuf_len, sizeof(char));
+ if (!linebuf) {
+ cli_errmsg("Can't gzdopen() descriptor %d\n", fd);
+ ret = CL_EOPEN;
+ goto cl_loaddb_packed_error;
+ }
+ outpos = 0;
+
+ if((ret = cli_initengine(engine, options))) {
+ cl_free(*engine);
+ goto cl_loaddb_packed_error;
+ }
+
+ if((ret = cli_initroots(*engine, options))) {
+ cl_free(*engine);
+ goto cl_loaddb_packed_error;
+ }
+
+ if(!(*engine)->md5_hlist) {
+ cli_dbgmsg("Initializing md5 list structure\n");
+ (*engine)->md5_hlist = (struct cli_md5_node **) cli_calloc(256,
sizeof(struct cli_md5_node *));
+ if(!(*engine)->md5_hlist) {
+ ret=CL_EMEM;
+ goto cl_loaddb_packed_error;
+ }
+ }
+
+ while(1) {
+ /* start to read in tar file at offset 512, skipping the cvd header */
+
+ nread = gzread(infile, block, TAR_BLOCKSIZE);
+
+ if(!in_block && nread == 0)
+ break;
+
+ if(nread != TAR_BLOCKSIZE) {
+ cli_errmsg("Incomplete block read.\n");
+ ret = CL_EOPEN;
+ goto cl_loaddb_packed_error;
+ }
+
+ if(!in_block) {
+ if (block[0] == '\0') /* We're done */
+ break;
+ strncpy(filename, block, 100);
+ filename[100] = '\0';
+
+ /* filename sanity check */
+ if(strchr(filename, '/')) {
+ cli_errmsg("Slash separators are not allowed in CVD.\n");
+ ret = CL_EOPEN;
+ goto cl_loaddb_packed_error;
+ }
+ /* determine database type */
+ if(cli_strbcasestr(filename, ".db")) {
+ cvdtype = cvd_db;
+ }
+ else if (cli_strbcasestr(filename, ".db2")){
+ cvdtype = cvd_db2;
+ }
+ else if (cli_strbcasestr(filename, ".db3")){
+ cvdtype = cvd_db3;
+ }
+ else if (cli_strbcasestr(filename, ".hdb")){
+ cvdtype = cvd_hdb;
+ }
+ else if (cli_strbcasestr(filename, ".fp")){
+ cvdtype = cvd_fp;
+ }
+ else if (cli_strbcasestr(filename, ".ndb")){
+ cvdtype = cvd_ndb;
+ }
+ else if (cli_strbcasestr(filename, ".sdb")){
+ cvdtype = cvd_sdb;
+ if(!(*engine)->sdb) {
+ (*engine)->sdb = 1;
+ cli_dbgmsg("*** Self protection mechanism activated.\n");
+ }
+ }
+ else if (cli_strbcasestr(filename, ".zmd")){
+ cvdtype = cvd_zmd;
+ }
+ else if (cli_strbcasestr(filename, ".rmd")){
+ cvdtype = cvd_rmd;
+ }
+ else if (cli_strbcasestr(filename, "COPYING")){
+ cvdtype = cvd_copying;
+ }
+ else {
+ cli_errmsg("invalid filename in CVD: %s.\n", filename);
+ ret = CL_EOPEN;
+ goto cl_loaddb_packed_error;
+ }
+
+ cli_dbgmsg("Unpacking %s\n",filename);
+ type = block[156];
+
+ switch(type) {
+ case '0':
+ case '\0':
+ break;
+ case '5':
+ cli_errmsg("Directories in CVD are not supported.\n");
+ ret = CL_EOPEN;
+ goto cl_loaddb_packed_error;
+ break;
+ default:
+ cli_errmsg("Unknown cvdtype flag %c.\n",type);
+ ret = CL_EOPEN;
+ goto cl_loaddb_packed_error;
+ break;
+ }
+
+ in_block = 1;
+ outpos = 0;
+ strncpy(osize, block + 124, 12);
+ osize[12] = '\0';
+
+ if((sscanf(osize, "%o", &size)) == 0) {
+ cli_errmsg("Invalid size in header.\n");
+ ret = CL_EOPEN;
+ goto cl_loaddb_packed_error;
+ }
+ line = 0;
+ } else {
+ /* get complete lines from the database file and parse them*/
+ nbytes = size > TAR_BLOCKSIZE ? TAR_BLOCKSIZE : size;
+ inpos = 0;
+ //fprintf(stderr,"parsing %s / %d\n",block, nbytes);
+ while(1) {
+ while ((block[inpos] != '\n') &&
+ (block[inpos] != '\r') &&
+ (inpos < TAR_BLOCKSIZE ) &&
+ (outpos < linebuf_len)) {
+ linebuf[outpos] = block[inpos];
+ inpos++;
+ outpos++;
+ }
+ if ((block[inpos] == '\n')||(block[inpos] == '\r')) {
+ /* one complete line in linebuf , parse it and add signature */
+ linebuf[outpos] = 0;
+ inpos++;
+ //fprintf(stderr,"line: %s (%d bytes/%d)\n",linebuf, outpos, size);
+ if (outpos > 0) {
+ line ++;
+ /* skip empty lines */
+ outpos = 0;
+ switch (cvdtype) {
+ case cvd_db:
+ case cvd_db2:
+ case cvd_db3:
+ ret = cli_parse_db(linebuf, line, engine, signo, options);
+ break;
+ case cvd_zmd:
+ ret = cli_parse_md(linebuf, line, engine, signo, 1, options);
+ break;
+ case cvd_rmd:
+ ret = cli_parse_md(linebuf, line, engine, signo, 2, options);
+ break;
+ case cvd_hdb:
+ ret = cli_parse_hdb(linebuf, line, engine, signo, 0, options);
+ break;
+ case cvd_fp:
+ ret = cli_parse_hdb(linebuf, line, engine, signo, 1, options);
+ break;
+ case cvd_ndb:
+ ret = cli_parse_ndb(linebuf, line, engine, signo, options);
+ break;
+ case cvd_sdb:
+ ret = cli_parse_ndb(linebuf, line, engine, signo, options);
+ break;
+ case cvd_copying:
+ ret = 0;
+ break;
+ default:
+ ret = CL_EOPEN;
+ cli_errmsg("invalid CVD file (cvdtype %d).\n", cvdtype);
+ break;
+ }
+ if (ret) {
+ cli_errmsg("Problem parsing database at line %d\n", line);
+ cl_free(*engine);
+ ret = CL_EOPEN;
+ goto cl_loaddb_packed_error;
+ }
+ }
+ }
+ if (outpos >= linebuf_len) {
+ /* extend linebuf */
+ linebuf_len += TAR_BLOCKSIZE;
+ linebuf = (char*) realloc(linebuf, linebuf_len);
+ }
+ if (inpos >= TAR_BLOCKSIZE) {
+ /* tar block exhausted, need a new one */
+ break;
+ }
+ }
+ size -= nbytes;
+ if(size == 0)
+ in_block = 0;
+ }
+ }
+ cl_loaddb_packed_error:
+ if (fd) fclose(fd);
+ if (linebuf) free(linebuf);
+ if (infile) gzclose(infile);
+ return ret;
+}
Index: libclamav/readdb.h
===================================================================
RCS file: /cvsroot/clamav/clamav-devel/libclamav/readdb.h,v
retrieving revision 1.5
diff -b -w -u -r1.5 readdb.h
--- libclamav/readdb.h 9 Apr 2006 19:59:27 -0000 1.5
+++ libclamav/readdb.h 30 May 2006 11:10:04 -0000
@@ -21,5 +21,6 @@
#define __READDB_H
int cli_parse_add(struct cli_matcher *root, const char *virname, const char
*hexsig, unsigned short type, char *offset, unsigned short target);
+int cl_loaddb_packed(char *filename, struct cl_engine **engine, unsigned int
*signo, int warn);
#endif
Index: shared/cfgparser.c
===================================================================
RCS file: /cvsroot/clamav/clamav-devel/shared/cfgparser.c,v
retrieving revision 1.41
diff -b -w -u -r1.41 cfgparser.c
--- shared/cfgparser.c 12 May 2006 18:07:19 -0000 1.41
+++ shared/cfgparser.c 30 May 2006 11:10:04 -0000
@@ -91,6 +91,7 @@
{"ClamukoMaxFileSize", OPT_COMPSIZE, 5242880, NULL, 0, OPT_CLAMD},
{"ClamukoScanArchive", OPT_BOOL, 0, NULL, 0, OPT_CLAMD},
{"DatabaseOwner", OPT_STR, -1, NULL, 0, OPT_FRESHCLAM},
+ {"LoadPackedDatabase", OPT_BOOL, 1, NULL, 0, OPT_CLAMD},
{"Checks", OPT_NUM, 12, NULL, 0, OPT_FRESHCLAM},
{"UpdateLogFile", OPT_STR, -1, NULL, 0, OPT_FRESHCLAM},
{"DNSDatabaseInfo", OPT_STR, -1, "current.cvd.clamav.net", 0,
OPT_FRESHCLAM},
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html