add support for new database names

git-svn: trunk@885
remotes/push_mirror/metadata
Tomasz Kojm 21 years ago
parent 50df411808
commit 26720e3f28
  1. 4
      clamav-devel/ChangeLog
  2. 5
      clamav-devel/libclamav/readdb.c
  3. 9
      clamav-devel/sigtool/sigtool.c

@ -1,3 +1,7 @@
Thu Sep 16 21:14:08 CEST 2004 (tk)
----------------------------------
* sigtool: add support for new database names
Thu Sep 16 19:02:38 BST 2004 (njh)
----------------------------------
* libclamav/mbox.c: Handle RFC2047 encoded headers

@ -665,7 +665,7 @@ int cl_loaddb(const char *filename, struct cl_node **root, unsigned int *signo)
ret = cli_cvdload(fd, root, signo, warn);
} else if(cli_strbcasestr(filename, ".hdb") || cli_strbcasestr(filename, ".hdb2")) {
} else if(cli_strbcasestr(filename, ".hdb")) {
ret = cli_loadhdb(fd, root, signo);
} else if(cli_strbcasestr(filename, ".ndb")) {
@ -708,7 +708,6 @@ int cl_loaddbdir(const char *dirname, struct cl_node **root, unsigned int *signo
cli_strbcasestr(dent->d_name, ".db2") ||
cli_strbcasestr(dent->d_name, ".db3") ||
cli_strbcasestr(dent->d_name, ".hdb") ||
cli_strbcasestr(dent->d_name, ".hdb2") ||
cli_strbcasestr(dent->d_name, ".ndb") ||
cli_strbcasestr(dent->d_name, ".cvd"))) {
@ -773,7 +772,6 @@ int cl_statinidir(const char *dirname, struct cl_stat *dbstat)
cli_strbcasestr(dent->d_name, ".db2") ||
cli_strbcasestr(dent->d_name, ".db3") ||
cli_strbcasestr(dent->d_name, ".hdb") ||
cli_strbcasestr(dent->d_name, ".hdb2") ||
cli_strbcasestr(dent->d_name, ".ndb") ||
cli_strbcasestr(dent->d_name, ".cvd"))) {
@ -822,7 +820,6 @@ int cl_statchkdir(const struct cl_stat *dbstat)
cli_strbcasestr(dent->d_name, ".db2") ||
cli_strbcasestr(dent->d_name, ".db3") ||
cli_strbcasestr(dent->d_name, ".hdb") ||
cli_strbcasestr(dent->d_name, ".hdb2") ||
cli_strbcasestr(dent->d_name, ".ndb") ||
cli_strbcasestr(dent->d_name, ".cvd"))) {

@ -227,7 +227,7 @@ int build(struct optstruct *opt)
struct cl_cvd *oldcvd = NULL;
/* build a tar.gz archive
* we need: COPYING and {viruses.db, viruses.db2}+
* we need: COPYING and {main.db, main.hdb, daily.db, daily.hdb}+
* in current working directory
*/
@ -236,7 +236,7 @@ int build(struct optstruct *opt)
exit(1);
}
if(stat("viruses.db", &foo) == -1 && stat("viruses.db2", &foo) == -1 && stat("malware.hdb", &foo) == -1 && stat("malware.hdb2", &foo)) {
if(stat("main.db", &foo) == -1 && stat("daily.db", &foo) == -1 && stat("main.hdb", &foo) == -1 && stat("daily.hdb", &foo)) {
mprintf("Virus database not found in current working directory.\n");
exit(1);
}
@ -256,8 +256,7 @@ int build(struct optstruct *opt)
mprintf("WARNING: There are no signatures in the database(s).\n");
} else {
mprintf("Signatures: %d\n", no);
realno = countlines("viruses.db") + countlines("viruses.db2") + countlines("malware.hdb") + countlines("malware.hdb2");
realno = countlines("main.db") + countlines("daily.db") + countlines("main.hdb") + countlines("daily.hdb");
if(realno != no) {
mprintf("!Signatures in database: %d. Loaded: %d.\n", realno, no);
mprintf("Please check the current directory and remove unnecessary databases\n");
@ -274,7 +273,7 @@ int build(struct optstruct *opt)
exit(1);
case 0:
{
char *args[] = { "tar", "-cvf", NULL, "COPYING", "viruses.db", "viruses.db2", "Notes", "viruses.db3", "malware.hdb", "malware.hdb2", NULL };
char *args[] = { "tar", "-cvf", NULL, "COPYING", "main.db", "daily.db", "Notes", "viruses.db3", "main.hdb", "daily.hdb", NULL };
args[2] = tarfile;
execv("/bin/tar", args);
mprintf("!Can't execute tar\n");

Loading…
Cancel
Save