Small bugfixes

git-svn: trunk@233
remotes/push_mirror/metadata
Tomasz Kojm 22 years ago
parent be11d05896
commit 6ccc6990f0
  1. 13
      clamav-devel/ChangeLog
  2. 11
      clamav-devel/clamscan/manager.c
  3. 4
      clamav-devel/freshclam/freshclam.c
  4. 2
      clamav-devel/freshclam/manager.c
  5. 19
      clamav-devel/libclamav/scanners.c

@ -1,7 +1,18 @@
Tue Feb 3 02:31:55 CET 2004 (tk)
---------------------------------
* libclamav: + don't report errors when archive limits are reached
+ enabled scanning of "X-UIDL" mail files
* clamscan: + don't count broken archives twice (bug reported by Przemyslaw
Holowczyc <doozer*skc.com.pl>)
+ don't try to drop privileges in normal user mode when
clamscan is started with --mbox in stdin scanning mode
(bug reported by Ed Ravin <eravin*panix.com>)
* freshclam: + fixed -c handling (bug reported by scsi <scsi*softland.ru>)
Mon Feb 2 17:12:25 GMT 2004 (njh)
----------------------------------
* libclamav: Scan a rare form of bounce message identified by
Denis De Messemacker <ddm@e-labs.org>
Denis De Messemacker <ddm*e-labs.org>
Mon Feb 2 13:46:51 GMT 2004 (njh)
----------------------------------

@ -1,5 +1,5 @@
/*
* Copyright (C) 2002, 2003 Tomasz Kojm <zolw@konarski.edu.pl>
* Copyright (C) 2002 - 2004 Tomasz Kojm <tkojm@clamav.net>
*
* 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
@ -174,9 +174,11 @@ int scanmanager(const struct optstruct *opt)
/* njh@bandsman.co.uk: BeOS */
#if !defined(C_CYGWIN) && !defined(C_BEOS)
if((user = getpwnam(UNPUSER)) == NULL) {
mprintf("@Can't get information about user %s\n", UNPUSER);
exit(60); /* this is critical problem, so we just exit here */
if(!getuid()) {
if((user = getpwnam(UNPUSER)) == NULL) {
mprintf("@Can't get information about user %s\n", UNPUSER);
exit(60); /* this is critical problem, so we just exit here */
}
}
#endif
@ -385,6 +387,7 @@ int scanfile(const char *filename, struct cl_node *root, const struct passwd *us
return 0;
/* in other case try to continue with external archivers */
options &= ~CL_ARCHIVE; /* and disable decompression for the below checkfile() */
claminfo.files--; /* don't count it */
}
if((strbcasestr(filename, ".zip") && optl(opt, "unzip"))

@ -1,5 +1,5 @@
/*
* Copyright (C) 2002, 2003 Tomasz Kojm <zolw@konarski.edu.pl>
* Copyright (C) 2002 - 2004 Tomasz Kojm <tkojm@clamav.net>
* Damien Curtain <damien@pagefault.org>
*
* This program is free software; you can redistribute it and/or modify
@ -55,7 +55,7 @@ int freshclam(struct optstruct *opt)
}
/* parse the config file */
if((cfgfile = getargc(opt, 'c'))) {
if((cfgfile = getargl(opt, "config-file"))) {
copt = parsecfg(cfgfile);
} else {
/* TODO: force strict permissions on freshclam.conf */

@ -1,5 +1,5 @@
/*
* Copyright (C) 2002, 2003 Tomasz Kojm <zolw@konarski.edu.pl>
* Copyright (C) 2002 - 2004 Tomasz Kojm <tkojm@clamav.net>
* HTTP/1.1 compliance by Arkadiusz Miskiewicz <misiek@pld.org.pl>
* Proxy support by Nigel Horne <njh@bandsman.co.uk>
* Proxy authorization support by Gernot Tenchio <g.tenchio@telco-tech.de>

@ -60,6 +60,7 @@ int cli_scanrar_inuse = 0;
#define RAWMAIL_MAGIC_STR "Received: "
#define MAILDIR_MAGIC_STR "Return-Path: "
#define DELIVERED_MAGIC_STR "Delivered-To: "
#define XUIDL_MAGIC_STR "X-UIDL: "
#define BZIP_MAGIC_STR "BZh"
#define OLE2_MAGIC_STR "\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1"
@ -152,13 +153,13 @@ int cli_scanrar(int desc, char **virname, long int *scanned, const struct cl_nod
cli_dbgmsg("RAR->%s: Size exceeded (%d, max: %d)\n", rarlist->item.Name, rarlist->item.UnpSize, limits->maxfilesize);
rarlist = rarlist->next;
files++;
ret = CL_EMAXSIZE;
/* ret = CL_EMAXSIZE; */
continue;
}
if(limits->maxfiles && (files > limits->maxfiles)) {
cli_dbgmsg("RAR: Files limit reached (max: %d)\n", limits->maxfiles);
ret = CL_EMAXFILES;
/* ret = CL_EMAXFILES; */
break;
}
}
@ -302,13 +303,13 @@ int cli_scanzip(int desc, char **virname, long int *scanned, const struct cl_nod
if(limits->maxfilesize && (zdirent.st_size > limits->maxfilesize)) {
cli_dbgmsg("Zip -> %s: Size exceeded (%d, max: %d)\n", zdirent.d_name, zdirent.st_size, limits->maxfilesize);
files++;
ret = CL_EMAXSIZE;
/* ret = CL_EMAXSIZE; */
continue; /* this is not a bug */
}
if(limits->maxfiles && (files > limits->maxfiles)) {
cli_dbgmsg("Zip: Files limit reached (max: %d)\n", limits->maxfiles);
ret = CL_EMAXFILES;
/* ret = CL_EMAXFILES; */
break;
}
}
@ -416,7 +417,7 @@ int cli_scangzip(int desc, char **virname, long int *scanned, const struct cl_no
if(limits)
if(limits->maxfilesize && (size + FILEBUFF > limits->maxfilesize)) {
cli_dbgmsg("Gzip->desc(%d): Size exceeded (stopped at %d, max: %d)\n", desc, size, limits->maxfilesize);
ret = CL_EMAXSIZE;
/* ret = CL_EMAXSIZE; */
break;
}
@ -504,7 +505,7 @@ int cli_scanbzip(int desc, char **virname, long int *scanned, const struct cl_no
if(limits)
if(limits->maxfilesize && (size + FILEBUFF > limits->maxfilesize)) {
cli_dbgmsg("Bzip2->desc(%d): Size exceeded (stopped at %d, max: %d)\n", desc, size, limits->maxfilesize);
ret = CL_EMAXSIZE;
/* ret = CL_EMAXSIZE; */
break;
}
@ -710,7 +711,8 @@ int cli_magic_scandesc(int desc, char **virname, long int *scanned, const struct
if(SCAN_ARCHIVE && limits && limits->maxreclevel)
if(*reclev > limits->maxreclevel)
return CL_EMAXREC;
/* return CL_EMAXREC; */
return CL_CLEAN;
(*reclev)++;
@ -770,6 +772,9 @@ int cli_magic_scandesc(int desc, char **virname, long int *scanned, const struct
} else if(SCAN_MAIL && !strncmp(magic, DELIVERED_MAGIC_STR, strlen(DELIVERED_MAGIC_STR))) {
cli_dbgmsg("Recognized (Delivered-To) mail file.\n");
ret = cli_scanmail(desc, virname, scanned, root, limits, options, reclev);
} else if(SCAN_MAIL && !strncmp(magic, XUIDL_MAGIC_STR, strlen(XUIDL_MAGIC_STR))) {
cli_dbgmsg("Recognized (X-UIDL) mail file.\n");
ret = cli_scanmail(desc, virname, scanned, root, limits, options, reclev);
}
(*reclev)--;
}

Loading…
Cancel
Save