git-svn: trunk@955
remotes/push_mirror/metadata
Tomasz Kojm 21 years ago
parent 2c7d1edd75
commit 02b4b0c7f1
  1. 8
      clamav-devel/ChangeLog
  2. 1
      clamav-devel/clamd/defaults.h
  3. 9
      clamav-devel/clamd/server-th.c
  4. 1
      clamav-devel/clamscan/manager.c
  5. 18
      clamav-devel/clamscan/others.c
  6. 4
      clamav-devel/docs/man/clamdscan.1
  7. 2
      clamav-devel/docs/man/clamscan.1
  8. 3
      clamav-devel/docs/man/sigtool.1
  9. 4
      clamav-devel/etc/clamd.conf
  10. 2
      clamav-devel/libclamav/Makefile.am
  11. 2
      clamav-devel/libclamav/Makefile.in
  12. 2
      clamav-devel/libclamav/matcher.c
  13. 1
      clamav-devel/shared/cfgparser.c

@ -1,3 +1,11 @@
Fri Oct 1 02:28:08 CEST 2004 (tk)
----------------------------------
* clamd: add new directive IdleTimeout (patch by Andrey J. Melnikoff (TEMHOTA)
<temnota*kmv.ru>)
* clamscan/others.c: preserve Mac OS X resource forks in filecopy()
(thanks to Remi Mommsen <remigius.mommsen*cern.ch>)
* cosmetic fixes (thanks to Damian Menscher <menscherr*uiuc.edu>)
Thu Sep 30 22:48:53 BST 2004 (njh) Thu Sep 30 22:48:53 BST 2004 (njh)
---------------------------------- ----------------------------------
* libclamav/mbox.c: Remove unneeded strdup() calls * libclamav/mbox.c: Remove unneeded strdup() calls

@ -30,5 +30,6 @@
#define CL_DEFAULT_MAXPORTSCAN 1000 #define CL_DEFAULT_MAXPORTSCAN 1000
#define CL_DEFAULT_MAXDIRREC 15 #define CL_DEFAULT_MAXDIRREC 15
#define CL_DEFAULT_STREAMMAXLEN 10 * 1048576 #define CL_DEFAULT_STREAMMAXLEN 10 * 1048576
#define CL_DEFAULT_IDLETIMEOUT 30
#endif #endif

@ -211,6 +211,7 @@ int acceptloop_th(int socketd, struct cl_node *root, const struct cfgstruct *cop
unsigned int selfchk; unsigned int selfchk;
time_t start_time, current_time; time_t start_time, current_time;
pid_t mainpid; pid_t mainpid;
int idletimeout;
#if defined(C_BIGSTACK) || defined(C_BSD) #if defined(C_BIGSTACK) || defined(C_BSD)
size_t stacksize; size_t stacksize;
@ -452,7 +453,13 @@ int acceptloop_th(int socketd, struct cl_node *root, const struct cfgstruct *cop
pthread_mutex_init(&exit_mutex, NULL); pthread_mutex_init(&exit_mutex, NULL);
pthread_mutex_init(&reload_mutex, NULL); pthread_mutex_init(&reload_mutex, NULL);
if((thr_pool=thrmgr_new(max_threads, 30, scanner_thread)) == NULL) {
if((cpt = cfgopt(copt, "IdleTimeout")))
idletimeout = cpt->numarg;
else
idletimeout = CL_DEFAULT_IDLETIMEOUT;
if((thr_pool=thrmgr_new(max_threads, idletimeout, scanner_thread)) == NULL) {
logg("!thrmgr_new failed\n"); logg("!thrmgr_new failed\n");
exit(-1); exit(-1);
} }

@ -821,6 +821,7 @@ int checkstdin(const struct cl_node *root, const struct cl_limits *limits, int o
fclose(fs); fclose(fs);
mprintf("*Checking %s\n", file);
claminfo.files++; claminfo.files++;
if((ret = cl_scanfile(file, &virname, &claminfo.blocks, root, limits, options)) == CL_VIRUS) { if((ret = cl_scanfile(file, &virname, &claminfo.blocks, root, limits, options)) == CL_VIRUS) {

@ -115,6 +115,21 @@ int checkaccess(const char *path, const char *username, int mode)
int filecopy(const char *src, const char *dest) int filecopy(const char *src, const char *dest)
{ {
#ifdef C_DARWIN
/* On Mac OS X use ditto and copy resource fork, too. */
char *ditto = (char *) mcalloc(strlen(src) + strlen(dest) + 30, sizeof(char));
sprintf(ditto, "/usr/bin/ditto --rsrc %s %s", src, dest);
if(system(ditto)) {
free(ditto);
return -1;
}
free(ditto);
return 0;
#else
char buffer[FILEBUFF]; char buffer[FILEBUFF];
int s, d, bytes; int s, d, bytes;
@ -133,6 +148,9 @@ int filecopy(const char *src, const char *dest)
/* njh@bandsman.co.uk: check result of close for NFS file */ /* njh@bandsman.co.uk: check result of close for NFS file */
return close(d); return close(d);
#endif //__APPLE_CC__
} }
int isnumb(const char *str) int isnumb(const char *str)

@ -37,8 +37,8 @@ Save the scan report to FILE.
\fB\-\-log\-verbose\fR \fB\-\-log\-verbose\fR
Save additional messages (mostly useless) to the report file. Save additional messages (mostly useless) to the report file.
.TP .TP
\fB\-\-disable\-summary\fR \fB\-\-no\-summary\fR
Disable summary at the end of scanning. Do not display summary at the end of scanning.
.SH "EXAMPLES" .SH "EXAMPLES"
.LP .LP
.TP .TP

@ -50,7 +50,7 @@ Scan directories recursively. All the subdirectories in the given directory will
Sound bell on virus detection. Sound bell on virus detection.
.TP .TP
\fB\-\-no\-summary\fR \fB\-\-no\-summary\fR
Disable summary printing at the end of scanning. Do not display summary at the end of scanning.
.TP .TP
\fB\-\-exclude=PATT\fR \fB\-\-exclude=PATT\fR
Don't scan file names containing PATT. It may be used multiple times. Don't scan file names containing PATT. It may be used multiple times.

@ -49,6 +49,9 @@ Unpack a selected CVD file to a current directory.
.TP .TP
\fB\-\-unpack\-current\fR \fB\-\-unpack\-current\fR
Unpack a local CVD file to a current directory. Unpack a local CVD file to a current directory.
.TP
\fB\-l, \-\-list\-sigs\fR
List signature names.
.SH "EXAMPLES" .SH "EXAMPLES"
.LP .LP
.TP .TP

@ -103,6 +103,10 @@ FixStaleSocket
# Default: 120 # Default: 120
#ReadTimeout 300 #ReadTimeout 300
# Waiting for a new job will timeout after this time (seconds).
# Default: 30
#IdleTimeout 60
# Maximal depth directories are scanned at. # Maximal depth directories are scanned at.
# Default: 15 # Default: 15
#MaxDirectoryRecursion 20 #MaxDirectoryRecursion 20

@ -20,7 +20,7 @@ INCLUDES = -I$(top_srcdir) -I@srcdir@/zziplib -I@srcdir@/mspack
libclamav_la_LIBADD = @LIBCLAMAV_LIBS@ libclamav_la_LIBADD = @LIBCLAMAV_LIBS@
libclamav_la_LDFLAGS = @TH_SAFE@ -version-info @LIBCLAMAV_VERSION@ libclamav_la_LDFLAGS = @TH_SAFE@ -version-info @LIBCLAMAV_VERSION@ -no-undefined
include_HEADERS = clamav.h include_HEADERS = clamav.h

@ -234,7 +234,7 @@ target_os = @target_os@
target_vendor = @target_vendor@ target_vendor = @target_vendor@
INCLUDES = -I$(top_srcdir) -I@srcdir@/zziplib -I@srcdir@/mspack INCLUDES = -I$(top_srcdir) -I@srcdir@/zziplib -I@srcdir@/mspack
libclamav_la_LIBADD = @LIBCLAMAV_LIBS@ libclamav_la_LIBADD = @LIBCLAMAV_LIBS@
libclamav_la_LDFLAGS = @TH_SAFE@ -version-info @LIBCLAMAV_VERSION@ libclamav_la_LDFLAGS = @TH_SAFE@ -version-info @LIBCLAMAV_VERSION@ -no-undefined
include_HEADERS = clamav.h include_HEADERS = clamav.h
libclamav_la_SOURCES = \ libclamav_la_SOURCES = \
clamav.h \ clamav.h \

@ -214,7 +214,7 @@ int cli_scandesc(int desc, const char **virname, long int *scanned, const struct
/* prepare the buffer */ /* prepare the buffer */
buffsize = root->maxpatlen + SCANBUFF; buffsize = root->maxpatlen + SCANBUFF;
if(!(buffer = (char *) cli_calloc(buffsize, sizeof(char)))) { if(!(buffer = (char *) cli_calloc(buffsize, sizeof(char)))) {
cli_dbgmsg("cli_scandesc(): unable to cli_malloc(%d)\n", buffsize); cli_dbgmsg("cli_scandesc(): unable to cli_calloc(%d)\n", buffsize);
return CL_EMEM; return CL_EMEM;
} }

@ -86,6 +86,7 @@ struct cfgstruct *parsecfg(const char *cfgfile, int messages)
{"StreamMaxLength", OPT_COMPSIZE}, {"StreamMaxLength", OPT_COMPSIZE},
{"MaxThreads", OPT_NUM}, {"MaxThreads", OPT_NUM},
{"ReadTimeout", OPT_NUM}, {"ReadTimeout", OPT_NUM},
{"IdleTimeout", OPT_NUM},
{"MaxDirectoryRecursion", OPT_NUM}, {"MaxDirectoryRecursion", OPT_NUM},
{"FollowDirectorySymlinks", OPT_NOARG}, {"FollowDirectorySymlinks", OPT_NOARG},
{"FollowFileSymlinks", OPT_NOARG}, {"FollowFileSymlinks", OPT_NOARG},

Loading…
Cancel
Save