git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@398 77e5149b-7576-45b1-b177-96237e5ba77b
Tomasz Kojm authored on 2004/03/14 05:08:10... | ... |
@@ -96,7 +96,7 @@ Ed Phillips <ed*UDel.Edu> |
96 | 96 |
Andreas Piesk <Andreas.Piesk*heise.de> |
97 | 97 |
Ant La Porte <ant*dvere.net> |
98 | 98 |
Thomas Quinot <thomas*cuivre.fr.eu.org> |
99 |
-Hector M. Rulot Segovia <Hector.Rulot@uv.es> |
|
99 |
+Hector M. Rulot Segovia <Hector.Rulot*uv.es> |
|
100 | 100 |
David Santinoli <david*santinoli.com> |
101 | 101 |
Vijay Sarvepalli <vssarvep*office.uncg.edu> |
102 | 102 |
Matt Sullivan <matt*sullivan.gen.nz> |
... | ... |
@@ -45,7 +45,7 @@ Wed Mar 10 11:40:14 GMT 2004 (njh) |
45 | 45 |
---------------------------------- |
46 | 46 |
* clamav-milter: Use new HAVE_STRERROR_R rather than TARGET_OS_SOLARIS |
47 | 47 |
to determine if strerror_r exists |
48 |
- Thanks to Phil Oleson <oz@nixil.net>. |
|
48 |
+ Thanks to Phil Oleson <oz*nixil.net>. |
|
49 | 49 |
* docs/man: Corrected documentation of --postmaster-only flag. |
50 | 50 |
|
51 | 51 |
Wed Mar 10 05:43:34 GMT 2004 (njh) |
... | ... |
@@ -53,7 +53,7 @@ Wed Mar 10 05:43:34 GMT 2004 (njh) |
53 | 53 |
* libclamav/message.c: Implemented a couple of small speed ups: |
54 | 54 |
1) Only save arguments that we're going to retrieve |
55 | 55 |
2) No need to store \n in messageToText fast copy mode, which allows |
56 |
- an sprintf to be removed (Dirk Mueller <dmuell@gmx.net>) |
|
56 |
+ an sprintf to be removed (Dirk Mueller <dmuell*gmx.net>) |
|
57 | 57 |
|
58 | 58 |
Wed Mar 10 01:35:40 CET 2004 (tk) |
59 | 59 |
--------------------------------- |
... | ... |
@@ -324,7 +324,7 @@ Fri Feb 20 16:49:05 CET 2004 (tk) |
324 | 324 |
--------------------------------- |
325 | 325 |
* clamscan, freshclam: removed --log-verbose (but it's still accepted by the |
326 | 326 |
option parser) |
327 |
- * libclamav: cli_rmdirs() fixed directory permission problem (reported by |
|
327 |
+ * libclamav: cli_rmdirs(): fixed directory permission problem (reported by |
|
328 | 328 |
Brian J. France <list*firehawksystems.com> and Nigel) |
329 | 329 |
* doc: clamscan, clamdscan and freshclam manual pages updated |
330 | 330 |
|
... | ... |
@@ -81,7 +81,7 @@ dnl there is now a CREATE_PREFIX_TARGET_H in this file as a shorthand for |
81 | 81 |
dnl PREFIX_CONFIG_H from a target.h file, however w/o the target.h ever created |
82 | 82 |
dnl (the prefix is a bit different, since we add an extra -target- and -host-) |
83 | 83 |
dnl |
84 |
-dnl @version: $Id: aclocal.m4,v 1.27 2004/03/10 00:37:55 kojm Exp $ |
|
84 |
+dnl @version: $Id: aclocal.m4,v 1.28 2004/03/13 20:08:10 kojm Exp $ |
|
85 | 85 |
dnl @author Guido Draheim <guidod@gmx.de> STATUS: used often |
86 | 86 |
|
87 | 87 |
AC_DEFUN([AC_CREATE_TARGET_H], |
... | ... |
@@ -4041,7 +4041,7 @@ dnl AC_COMPILE_CHECK_SIZEOF(ptrdiff_t, $headers) |
4041 | 4041 |
dnl AC_COMPILE_CHECK_SIZEOF(off_t, $headers) |
4042 | 4042 |
dnl |
4043 | 4043 |
dnl @author Kaveh Ghazi <ghazi@caip.rutgers.edu> |
4044 |
-dnl @version $Id: aclocal.m4,v 1.27 2004/03/10 00:37:55 kojm Exp $ |
|
4044 |
+dnl @version $Id: aclocal.m4,v 1.28 2004/03/13 20:08:10 kojm Exp $ |
|
4045 | 4045 |
dnl |
4046 | 4046 |
AC_DEFUN([AC_COMPILE_CHECK_SIZEOF], |
4047 | 4047 |
[changequote(<<, >>)dnl |
... | ... |
@@ -40,15 +40,7 @@ |
40 | 40 |
|
41 | 41 |
void help(void); |
42 | 42 |
|
43 |
-/* this local macro takes care about freeing memory at exit */ |
|
44 |
-/* |
|
45 |
-#define mexit(i) if(opt) free_opt(opt); \ |
|
46 |
- mprintf("*Memory freed. Exit code: %d\n", i); \ |
|
47 |
- exit(i); |
|
48 |
-*/ |
|
49 |
-#define mexit(i) exit(i) |
|
50 |
- |
|
51 |
-void clamscan(struct optstruct *opt) |
|
43 |
+int clamscan(struct optstruct *opt) |
|
52 | 44 |
{ |
53 | 45 |
int ds, dms, ret; |
54 | 46 |
double mb; |
... | ... |
@@ -84,7 +76,7 @@ void clamscan(struct optstruct *opt) |
84 | 84 |
|
85 | 85 |
if(optc(opt, 'V')) { |
86 | 86 |
mprintf("clamscan / ClamAV version "VERSION"\n"); |
87 |
- mexit(0); |
|
87 |
+ return 0; |
|
88 | 88 |
} |
89 | 89 |
|
90 | 90 |
if(optc(opt, 'h')) { |
... | ... |
@@ -108,7 +100,7 @@ void clamscan(struct optstruct *opt) |
108 | 108 |
logfile = getargc(opt, 'l'); |
109 | 109 |
if(logg("--------------------------------------\n")) { |
110 | 110 |
mprintf("!Problem with internal logger.\n"); |
111 |
- mexit(1); |
|
111 |
+ return 1; |
|
112 | 112 |
} |
113 | 113 |
} else |
114 | 114 |
logfile = NULL; |
... | ... |
@@ -177,7 +169,7 @@ void clamscan(struct optstruct *opt) |
177 | 177 |
logg("Time: %d.%3.3d sec (%d m %d s)\n", ds, dms/1000, ds/60, ds%60); |
178 | 178 |
} |
179 | 179 |
|
180 |
- mexit(ret); |
|
180 |
+ return ret; |
|
181 | 181 |
} |
182 | 182 |
|
183 | 183 |
void help(void) |
... | ... |
@@ -35,7 +35,7 @@ |
35 | 35 |
#include "others.h" |
36 | 36 |
#include "shared.h" |
37 | 37 |
|
38 |
-void clamscan(struct optstruct *opt); |
|
38 |
+extern int clamscan(struct optstruct *opt); |
|
39 | 39 |
|
40 | 40 |
int main(int argc, char **argv) |
41 | 41 |
{ |
... | ... |
@@ -143,11 +143,11 @@ int main(int argc, char **argv) |
143 | 143 |
} |
144 | 144 |
|
145 | 145 |
} |
146 |
- clamscan(opt); |
|
146 |
+ ret = clamscan(opt); |
|
147 | 147 |
|
148 | 148 |
free_opt(opt); |
149 | 149 |
|
150 |
- return(0); |
|
150 |
+ return ret; |
|
151 | 151 |
} |
152 | 152 |
|
153 | 153 |
void register_char_option(struct optstruct *opt, char ch) |
... | ... |
@@ -1007,7 +1007,6 @@ Optional Features: |
1007 | 1007 |
--enable-id-check Use id utility instead of /etc/passwd parsing |
1008 | 1008 |
--enable-yp-check Use ypmatch utility instead of /etc/passwd parsing |
1009 | 1009 |
--disable-clamav Disable test for clamav user/group |
1010 |
- --disable-clamuko Don't include Clamuko code /Linux/ |
|
1011 | 1010 |
--enable-debug Enable debug messages. |
1012 | 1011 |
--enable-bigstack Increase thread stack size. |
1013 | 1012 |
|
... | ... |
@@ -4543,7 +4542,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes |
4543 | 4543 |
case $host in |
4544 | 4544 |
*-*-irix6*) |
4545 | 4545 |
# Find out which ABI we are using. |
4546 |
- echo '#line 4546 "configure"' > conftest.$ac_ext |
|
4546 |
+ echo '#line 4545 "configure"' > conftest.$ac_ext |
|
4547 | 4547 |
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
4548 | 4548 |
(eval $ac_compile) 2>&5 |
4549 | 4549 |
ac_status=$? |
... | ... |
@@ -5079,7 +5078,7 @@ chmod -w . |
5079 | 5079 |
save_CFLAGS="$CFLAGS" |
5080 | 5080 |
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" |
5081 | 5081 |
compiler_c_o=no |
5082 |
-if { (eval echo configure:5082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then |
|
5082 |
+if { (eval echo configure:5081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then |
|
5083 | 5083 |
# The compiler can only warn and ignore the option if not recognized |
5084 | 5084 |
# So say no if there are warnings |
5085 | 5085 |
if test -s out/conftest.err; then |
... | ... |
@@ -6872,7 +6871,7 @@ else |
6872 | 6872 |
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
6873 | 6873 |
lt_status=$lt_dlunknown |
6874 | 6874 |
cat > conftest.$ac_ext <<EOF |
6875 |
-#line 6875 "configure" |
|
6875 |
+#line 6874 "configure" |
|
6876 | 6876 |
#include "confdefs.h" |
6877 | 6877 |
|
6878 | 6878 |
#if HAVE_DLFCN_H |
... | ... |
@@ -6970,7 +6969,7 @@ else |
6970 | 6970 |
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
6971 | 6971 |
lt_status=$lt_dlunknown |
6972 | 6972 |
cat > conftest.$ac_ext <<EOF |
6973 |
-#line 6973 "configure" |
|
6973 |
+#line 6972 "configure" |
|
6974 | 6974 |
#include "confdefs.h" |
6975 | 6975 |
|
6976 | 6976 |
#if HAVE_DLFCN_H |
... | ... |
@@ -9225,13 +9224,6 @@ if test "${enable_clamav+set}" = set; then |
9225 | 9225 |
test_clamav=no |
9226 | 9226 |
fi; |
9227 | 9227 |
|
9228 |
-want_clamuko=yes |
|
9229 |
-# Check whether --enable-clamuko or --disable-clamuko was given. |
|
9230 |
-if test "${enable_clamuko+set}" = set; then |
|
9231 |
- enableval="$enable_clamuko" |
|
9232 |
- want_clamuko=no |
|
9233 |
-fi; |
|
9234 |
- |
|
9235 | 9228 |
# Check whether --enable-debug or --disable-debug was given. |
9236 | 9229 |
if test "${enable_debug+set}" = set; then |
9237 | 9230 |
enableval="$enable_debug" |
... | ... |
@@ -143,11 +143,6 @@ AC_ARG_ENABLE(clamav, |
143 | 143 |
[ --disable-clamav Disable test for clamav user/group], |
144 | 144 |
test_clamav=no,) |
145 | 145 |
|
146 |
-want_clamuko=yes |
|
147 |
-AC_ARG_ENABLE(clamuko, |
|
148 |
-[ --disable-clamuko Don't include Clamuko code /Linux/], |
|
149 |
-want_clamuko=no,) |
|
150 |
- |
|
151 | 146 |
AC_ARG_ENABLE(debug, |
152 | 147 |
[ --enable-debug Enable debug messages.], |
153 | 148 |
AC_DEFINE(CL_DEBUG,1,[enable debugging]),) |
... | ... |
@@ -81,7 +81,7 @@ static void writepid(char *pidfile) { |
81 | 81 |
if((fd = fopen(pidfile, "w")) == NULL) { |
82 | 82 |
logg("!Can't save PID to file %s: %s\n", pidfile, strerror(errno)); |
83 | 83 |
} else { |
84 |
- fprintf(fd, "%d", getpid()); |
|
84 |
+ fprintf(fd, "%d", (int) getpid()); |
|
85 | 85 |
fclose(fd); |
86 | 86 |
} |
87 | 87 |
umask(old_umask); |
... | ... |
@@ -90,7 +90,7 @@ static void writepid(char *pidfile) { |
90 | 90 |
|
91 | 91 |
int freshclam(struct optstruct *opt) |
92 | 92 |
{ |
93 |
- int ret; |
|
93 |
+ int ret = 52; |
|
94 | 94 |
char *newdir, *cfgfile; |
95 | 95 |
char *pidfile = NULL; |
96 | 96 |
struct cfgstruct *copt, *cpt; |
... | ... |
@@ -226,7 +226,7 @@ int freshclam(struct optstruct *opt) |
226 | 226 |
daemonize(); |
227 | 227 |
if (optc(opt, 'p')) { |
228 | 228 |
pidfile = getargc(opt, 'p'); |
229 |
- } else if (cpt = cfgopt(copt, "PidFile")) { |
|
229 |
+ } else if ((cpt = cfgopt(copt, "PidFile"))) { |
|
230 | 230 |
pidfile = cpt->strarg; |
231 | 231 |
} |
232 | 232 |
if (pidfile) { |
... | ... |
@@ -1,5 +1,5 @@ |
1 | 1 |
/* |
2 |
- * Copyright (C) 2002, 2003 Tomasz Kojm <zolw@konarski.edu.pl> |
|
2 |
+ * Copyright (C) 2002 - 2004 Tomasz Kojm <tkojm@clamav.net> |
|
3 | 3 |
* |
4 | 4 |
* This program is free software; you can redistribute it and/or modify |
5 | 5 |
* it under the terms of the GNU General Public License as published by |
... | ... |
@@ -90,11 +90,15 @@ struct cl_node { |
90 | 90 |
}; |
91 | 91 |
|
92 | 92 |
struct cl_limits { |
93 |
- int maxreclevel; |
|
94 |
- int maxfiles; |
|
95 |
- int maxratio; |
|
96 |
- short archivememlim; |
|
97 |
- long int maxfilesize; |
|
93 |
+ int maxreclevel; /* maximal recursion level */ |
|
94 |
+ int maxfiles; /* maximal number of files to be |
|
95 |
+ * scanned within an archive |
|
96 |
+ */ |
|
97 |
+ int maxratio; /* maximal compression ratio */ |
|
98 |
+ short archivememlim; /* limit memory usage for bzip2 (0/1) */ |
|
99 |
+ long int maxfilesize; /* files in an archive larger than |
|
100 |
+ * this value will not be scanned |
|
101 |
+ */ |
|
98 | 102 |
}; |
99 | 103 |
|
100 | 104 |
struct cl_stat { |