various fixes

git-svn: trunk@575
remotes/push_mirror/metadata
Tomasz Kojm 21 years ago
parent 0abc0a5786
commit d6b5ae478c
  1. 1
      clamav-devel/AUTHORS
  2. 10
      clamav-devel/ChangeLog
  3. 4
      clamav-devel/aclocal.m4
  4. 4
      clamav-devel/clamd/session.c
  5. 1
      clamav-devel/clamdscan/Makefile.am
  6. 3
      clamav-devel/clamdscan/Makefile.in
  7. 2
      clamav-devel/clamscan/Makefile.am
  8. 2
      clamav-devel/clamscan/Makefile.in
  9. 4
      clamav-devel/database/Makefile.am
  10. 4
      clamav-devel/database/Makefile.in
  11. 2
      clamav-devel/docs/Makefile.am
  12. 2
      clamav-devel/docs/Makefile.in
  13. 93
      clamav-devel/docs/man/freshclam.conf.5
  14. 4
      clamav-devel/etc/Makefile.am
  15. 4
      clamav-devel/etc/Makefile.in
  16. 2
      clamav-devel/freshclam/Makefile.am
  17. 2
      clamav-devel/freshclam/Makefile.in
  18. 13
      clamav-devel/libclamav/scanners.c
  19. 4
      clamav-devel/shared/output.c
  20. 2
      clamav-devel/sigtool/Makefile.am
  21. 2
      clamav-devel/sigtool/Makefile.in

@ -65,6 +65,7 @@ Len Budney <lbudney*pobox.com>
Andrey Cherezov <andrey*cherezov.koenig.su>
Alex Cherney <alex*cher.id.au>
Tom G. Christensen <tgc*statsbiblioteket.dk>
Eugene Crosser <crosser*rol.ru>
Damien Curtain <damien*pagefault.org>
Michael Dankov <misha*btrc.ru>
Maxim Dounin <mdounin*rambler-co.ru>

@ -1,3 +1,13 @@
Tue May 25 22:30:33 CEST 2004 (tk)
----------------------------------
* libclamav: + report oversized archives (just like clamav-0.6x did)
+ do not trigger off file type recognizer in raw mode
(fixes stdin scanning in clamscan - Debian Bug #250806)
* clamd: harden read() in command parser
* Makefiles: fix *.cvd and *.conf installation in VPATHed directory
(patch by Eugene Crosser <crosser*rol.ru>)
* doc: include manual page for freshclam.conf (from Debian)
Tue May 25 17:24:48 BST 2004 (njh)
----------------------------------
* clamav-milter: X-Virus-Status: Not Scanned - StreamMaxLength exceeded

@ -81,7 +81,7 @@ dnl there is now a CREATE_PREFIX_TARGET_H in this file as a shorthand for
dnl PREFIX_CONFIG_H from a target.h file, however w/o the target.h ever created
dnl (the prefix is a bit different, since we add an extra -target- and -host-)
dnl
dnl @version: $Id: aclocal.m4,v 1.37 2004/05/16 01:09:43 kojm Exp $
dnl @version: $Id: aclocal.m4,v 1.38 2004/05/25 20:38:23 kojm Exp $
dnl @author Guido Draheim <guidod@gmx.de> STATUS: used often
AC_DEFUN([AC_CREATE_TARGET_H],
@ -4041,7 +4041,7 @@ dnl AC_COMPILE_CHECK_SIZEOF(ptrdiff_t, $headers)
dnl AC_COMPILE_CHECK_SIZEOF(off_t, $headers)
dnl
dnl @author Kaveh Ghazi <ghazi@caip.rutgers.edu>
dnl @version $Id: aclocal.m4,v 1.37 2004/05/16 01:09:43 kojm Exp $
dnl @version $Id: aclocal.m4,v 1.38 2004/05/25 20:38:23 kojm Exp $
dnl
AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
[changequote(<<, >>)dnl

@ -83,7 +83,9 @@ int command(int desc, const struct cl_node *root, const struct cl_limits *limits
return -1;
}
if((bread = read(desc, buff, 1024)) == -1) {
while((bread = read(desc, buff, 1024)) == -1 && errno == EINTR);
if(bread <= 0) {
logg("!Command parser: read() failed.\n");
/* at least try to display this error message */
mdprintf(desc, "ERROR: Command parser: read() failed.\n");

@ -35,5 +35,6 @@ clamdscan_LDADD = $(top_builddir)/clamscan/options.o $(top_builddir)/clamscan/ge
endif
DEFS = @DEFS@ -DCL_NOTHREADS
INCLUDES = -I$(top_srcdir)/clamscan -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
LIBS = -L$(top_builddir)/libclamav -lclamav @FRESHCLAM_LIBS@ @ADDITIONAL_LIBS@

@ -134,6 +134,7 @@ install_sh = @install_sh@
@BUILD_CLAMD_TRUE@clamdscan_LDADD = $(top_builddir)/clamscan/options.o $(top_builddir)/clamscan/getopt.o
DEFS = @DEFS@ -DCL_NOTHREADS
INCLUDES = -I$(top_srcdir)/clamscan -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
LIBS = -L$(top_builddir)/libclamav -lclamav @FRESHCLAM_LIBS@ @ADDITIONAL_LIBS@
subdir = clamdscan
@ -153,8 +154,6 @@ clamdscan_OBJECTS = $(am_clamdscan_OBJECTS)
@BUILD_CLAMD_TRUE@ $(top_builddir)/clamscan/getopt.o
@BUILD_CLAMD_FALSE@clamdscan_DEPENDENCIES =
clamdscan_LDFLAGS =
DEFS = @DEFS@
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@

@ -39,6 +39,6 @@ clamscan_SOURCES = \
treewalk.h \
defaults.h
DEFS = @DEFS@
DEFS = @DEFS@ -DCL_NOTHREADS
LIBS = -L$(top_builddir)/libclamav -lclamav @ADDITIONAL_LIBS@
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav

@ -142,7 +142,7 @@ clamscan_SOURCES = \
defaults.h
DEFS = @DEFS@
DEFS = @DEFS@ -DCL_NOTHREADS
LIBS = -L$(top_builddir)/libclamav -lclamav @ADDITIONAL_LIBS@
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
subdir = clamscan

@ -24,8 +24,8 @@ CLAMAVGROUP = @CLAMAVGROUP@
install:
$(mkinstalldirs) $(DESTDIR)$(DBINST)
@test -f $(DESTDIR)$(DBINST)/main.cvd || $(INSTALL_DATA) main.cvd $(DESTDIR)$(DBINST)
@test -f $(DESTDIR)$(DBINST)/daily.cvd || $(INSTALL_DATA) daily.cvd $(DESTDIR)$(DBINST)
@test -f $(DESTDIR)$(DBINST)/main.cvd || $(INSTALL_DATA) $(srcdir)/main.cvd $(DESTDIR)$(DBINST)
@test -f $(DESTDIR)$(DBINST)/daily.cvd || $(INSTALL_DATA) $(srcdir)/daily.cvd $(DESTDIR)$(DBINST)
@test -f $(DESTDIR)$(DBINST)/mirrors.txt && rm -f $(DESTDIR)$(DBINST)/mirrors.txt || true
@test -f $(DESTDIR)$(DBINST)/viruses.db && rm -f $(DESTDIR)$(DBINST)/viruses.db || true
@test -f $(DESTDIR)$(DBINST)/viruses.db2 && rm -f $(DESTDIR)$(DBINST)/viruses.db2 || true

@ -250,8 +250,8 @@ uninstall-am: uninstall-info-am
install:
$(mkinstalldirs) $(DESTDIR)$(DBINST)
@test -f $(DESTDIR)$(DBINST)/main.cvd || $(INSTALL_DATA) main.cvd $(DESTDIR)$(DBINST)
@test -f $(DESTDIR)$(DBINST)/daily.cvd || $(INSTALL_DATA) daily.cvd $(DESTDIR)$(DBINST)
@test -f $(DESTDIR)$(DBINST)/main.cvd || $(INSTALL_DATA) $(srcdir)/main.cvd $(DESTDIR)$(DBINST)
@test -f $(DESTDIR)$(DBINST)/daily.cvd || $(INSTALL_DATA) $(srcdir)/daily.cvd $(DESTDIR)$(DBINST)
@test -f $(DESTDIR)$(DBINST)/mirrors.txt && rm -f $(DESTDIR)$(DBINST)/mirrors.txt || true
@test -f $(DESTDIR)$(DBINST)/viruses.db && rm -f $(DESTDIR)$(DBINST)/viruses.db || true
@test -f $(DESTDIR)$(DBINST)/viruses.db2 && rm -f $(DESTDIR)$(DBINST)/viruses.db2 || true

@ -16,4 +16,4 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
EXTRA_DIST = clamdoc.pdf DMS German Spanish Japanese html man FreeBSD-HowTo Portugese Turkish clamd_supervised clamav-mirror-howto.pdf signatures.pdf French Polish
man_MANS = man/clamscan.1 man/freshclam.1 man/sigtool.1 man/clamd.8 man/clamav.conf.5 man/clamdscan.1 man/clamav-milter.8
man_MANS = man/clamscan.1 man/freshclam.1 man/sigtool.1 man/clamd.8 man/clamav.conf.5 man/clamdscan.1 man/clamav-milter.8 man/freshclam.conf.5

@ -118,7 +118,7 @@ am__quote = @am__quote@
install_sh = @install_sh@
EXTRA_DIST = clamdoc.pdf DMS German Spanish Japanese html man FreeBSD-HowTo Portugese Turkish clamd_supervised clamav-mirror-howto.pdf signatures.pdf French Polish
man_MANS = man/clamscan.1 man/freshclam.1 man/sigtool.1 man/clamd.8 man/clamav.conf.5 man/clamdscan.1 man/clamav-milter.8
man_MANS = man/clamscan.1 man/freshclam.1 man/sigtool.1 man/clamd.8 man/clamav.conf.5 man/clamdscan.1 man/clamav-milter.8 man/freshclam.conf.5
subdir = docs
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/clamav-config.h

@ -0,0 +1,93 @@
.\" Based on work by by Tomasz Kojm, 1.10.2002.
.\" Manual page created by Magnus Ekdahl and Thomas Lamy
.TH "freshclam.conf" "5" "June 6, 2003" "Thomas Lamy" "Clam AntiVirus"
.SH "NAME"
.LP
\fBfreshclam.conf\fR \- Configuration file for Clam AntiVirus Database Updater
.SH "DESCRIPTION"
.LP
The file freshclam.conf configures the Clam AntiVirus Database Updater, freshclam(1).
.SH "FILE FORMAT"
The file consists of comments and options with arguments. Each line that starts with a hash (\fB#\fR) symbol is ignored. Everything is case sensitive. Options are of the form \fBOption Argument\fR, some options don't use arguments. There are few types of the arguments:
.TP
\fBSTRING\fR
String without blank characters.
.TP
\fBSIZE\fR
Size in bytes. You can use a 'M' or 'm' modifiers for megabytes and a 'K' or 'k' for kilobytes.
.TP
\fBNUMBER\fR
Unsigned integer.
.SH "OPTIONS"
.LP
When some option is not used (hashed or doesn't exist in the configuration file), freshclam takes a default action.
.TP
\fBExample\fR
When this option is set, freshclam will stop and ask you to modify the configuration file.
.TP
\fBDatabaseOwner STRING\fR
When started by root, drop privileges to a specified user. Default is \"clamav\".
.TP
\fBDatabaseDirectory STRING\fR
One can change the default database directory here. Note that clamd and clamscan expect the hardcoded path \/var\/lib\/clamav.
.TP
\fBChecks NUM\fR
Number of new database checks per day. Default is to check 6 times \(every 4 hours\).
.TP
\fBUpdateLogFile STRING\fR
Enable logging to a specified file. Highly recommended.
.br
Default: disabled.
.TP
\fBLogSyslog\fR
Enable logging to Syslog. May be used in combination with UpdateLogFile
.br
Default: disabled.
.TP
\fBLogVerbose\fR
Enable verbose logging.
.TP
\fBDatabaseMirror STRING\fR
Server name where database updates are downloaded from. The default is database.clamav.net, which points to all official mirrors.
.br.
If this option is given multiple times, freshclam(1) tries them in the order given if one download fails.
.br
There is no default, which results in an error when running freshclam(1).
.TP
\fBMaxAttempts NUM\fR
Freshclam(1) tries every mirror this number of times before switching to the next mirror.
.br.
Default is to try once per mirror.
.TP
\fBHTTPProxyServer STR\fR, \fBHTTPProxyPort NUM\fR
Use given proxy server and TCP port for database downloads.
.TP
\fBHTTPProxyUsername STR\fR,\fBHTTPProxyPassword STR\fR
Proxy usage is authenticated through given username and password.
.br.
Default: no proxy authentication
.TP
\fBNotifyClamd \[STRING\]\fR
Notify a running clamd(8) to reload it\'s database after a download has occured. Optionally a clamav.conf(5) file location may be given to tell freshclam(1) how to communicate with clamd(8).
.br.
The default is to not notify clamd. See clamav.conf(5)\'s option SelfCheck for how clamd(8) handles database updates in this case.
.TP
\fBOnUpdateExecute STRING\fR
Execute this command after the database has been successfully updated.
.TP
\fBOnErrorExecute\fR
Execute this command after a database update has failed.
.SH "NOTE"
While not reasonable, any configuration option from clamav.conf(5) may be given.
.SH "FILES"
.LP
/usr/local/etc/freshclam.conf
.br
/etc/clamav/freshclam.conf
.SH "AUTHOR"
.LP
Thomas Lamy <thomas.lamy@netwake.de>
.SH "SEE ALSO"
.LP
freshclam(1), clamav.conf(5), clamd(8), clamscan(1)

@ -23,8 +23,8 @@ CFGINST = @CFGDIR@
install:
$(mkinstalldirs) $(DESTDIR)$(CFGINST)
if INSTALL_CLAMAV_CONF
@$(INSTALL_DATA) clamav.conf $(DESTDIR)$(CFGINST)
@$(INSTALL_DATA) $(srcdir)/clamav.conf $(DESTDIR)$(CFGINST)
endif
if INSTALL_FRESHCLAM_CONF
@$(INSTALL_DATA) freshclam.conf $(DESTDIR)$(CFGINST)
@$(INSTALL_DATA) $(srcdir)/freshclam.conf $(DESTDIR)$(CFGINST)
endif

@ -250,8 +250,8 @@ uninstall-am: uninstall-info-am
install:
$(mkinstalldirs) $(DESTDIR)$(CFGINST)
@INSTALL_CLAMAV_CONF_TRUE@ @$(INSTALL_DATA) clamav.conf $(DESTDIR)$(CFGINST)
@INSTALL_FRESHCLAM_CONF_TRUE@ @$(INSTALL_DATA) freshclam.conf $(DESTDIR)$(CFGINST)
@INSTALL_CLAMAV_CONF_TRUE@ @$(INSTALL_DATA) $(srcdir)/clamav.conf $(DESTDIR)$(CFGINST)
@INSTALL_FRESHCLAM_CONF_TRUE@ @$(INSTALL_DATA) $(srcdir)/freshclam.conf $(DESTDIR)$(CFGINST)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

@ -38,6 +38,6 @@ freshclam_SOURCES = \
notify.h
DEFS = @DEFS@
DEFS = @DEFS@ -DCL_NOTHREADS
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
LIBS = -L$(top_builddir)/libclamav -lclamav @FRESHCLAM_LIBS@ @ADDITIONAL_LIBS@

@ -140,7 +140,7 @@ freshclam_SOURCES = \
notify.h
DEFS = @DEFS@
DEFS = @DEFS@ -DCL_NOTHREADS
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
LIBS = -L$(top_builddir)/libclamav -lclamav @FRESHCLAM_LIBS@ @ADDITIONAL_LIBS@
subdir = freshclam

@ -73,7 +73,7 @@ static const struct cli_magic_s cli_magic[] = {
/* Executables */
/* {0, "MZ", 2, "DOS/W32 executable", CL_DOSEXE}, */
{0, "MZ", 2, "DOS/W32 executable", CL_DOSEXE},
/* Archives */
@ -401,8 +401,9 @@ static int cli_scanzip(int desc, const char **virname, long int *scanned, const
}
if(limits && limits->maxratio > 0 && ((unsigned) zdirent.st_size / (unsigned) zdirent.d_csize) >= limits->maxratio) {
files++;
continue;
*virname = "Oversized.Zip";
ret = CL_VIRUS;
break;
}
/* work-around for problematic zips (zziplib crashes with them) */
@ -967,6 +968,12 @@ static int cli_magic_scandesc(int desc, const char **virname, long int *scanned,
return -1;
}
if(!options) { /* raw mode (stdin, etc.) */
if((ret = cli_scandesc(desc, virname, scanned, root) == CL_VIRUS))
cli_dbgmsg("%s virus found in descriptor %d.\n", *virname, desc);
return ret;
}
if(SCAN_ARCHIVE && limits && limits->maxreclevel)
if(*reclev > limits->maxreclevel)
/* return CL_EMAXREC; */

@ -20,6 +20,10 @@
#include "clamav-config.h"
#endif
#ifdef CL_NOTHREADS
#undef CL_THREAD_SAFE
#endif
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>

@ -32,6 +32,6 @@ sigtool_SOURCES = \
sigtool_LDADD = $(top_builddir)/clamscan/others.o
DEFS = @DEFS@
DEFS = @DEFS@ -DCL_NOTHREADS
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
LIBS = -L$(top_builddir)/libclamav -lclamav @FRESHCLAM_LIBS@ @ADDITIONAL_LIBS@

@ -135,7 +135,7 @@ sigtool_SOURCES = \
sigtool_LDADD = $(top_builddir)/clamscan/others.o
DEFS = @DEFS@
DEFS = @DEFS@ -DCL_NOTHREADS
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
LIBS = -L$(top_builddir)/libclamav -lclamav @FRESHCLAM_LIBS@ @ADDITIONAL_LIBS@
subdir = sigtool

Loading…
Cancel
Save