Browse code

Various fixes

git-svn: trunk@378

Tomasz Kojm authored on 2004/03/08 07:29:48
Showing 22 changed files
... ...
@@ -57,6 +57,7 @@ ClamAV patches were submitted by (in alphabetical order):
57 57
 Kamil Andrusz <wizz*mniam.net>
58 58
 Patrick Bihan-Faou <patrick*mindstep.com>
59 59
 Len Budney <lbudney*pobox.com>
60
+Andrey Cherezov <andrey*cherezov.koenig.su>
60 61
 Damien Curtain <damien*pagefault.org>
61 62
 Michael Dankov <misha*btrc.ru>
62 63
 Alejandro Dubrovsky <s328940*student.uq.edu.au>
... ...
@@ -64,6 +65,7 @@ Magnus Ekdahl <magnus*debian.org>
64 64
 Jason Englander <jason*englanders.cc>
65 65
 David Ford <david+cert*blue-labs.org>
66 66
 Michel Gaudet <Michel.Gaudet*ehess.fr>
67
+Philippe Gay <ph.gay*free.fr>
67 68
 Luca 'NERvOus' Gibelli <nervous*clamav.net>
68 69
 Nigel Horne <njh*smsltd.demon.co.uk>
69 70
 Hrvoje Habjanic <hrvoje.habjanic*zg.hinet.hr>
... ...
@@ -79,10 +81,12 @@ Peter N Lewis <peter*stairways.com.au>
79 79
 David S. Madole <david*madole.net>
80 80
 Andrey V. Malyshev <amal*krasn.ru>
81 81
 Everton da Silva Marques <everton*lab.ipaccess.diveo.net.br>
82
+Andrey J. Melnikoff <temnota*kmv.ru>
82 83
 Denis De Messemacker <ddm*clamav.net>
83 84
 Mark Mielke <mark*mark.mielke.cc>
84 85
 Arkadiusz Miskiewicz <misiek*pld.org.pl>
85 86
 Dustin Mollo <dustin.mollo*sonoma.edu>
87
+Dirk Mueller <mueller*kde.org>
86 88
 Hendrik Muhs <Hendrik.Muhs*student.uni-magdeburg.de>
87 89
 Masaki Ogawa <proc*mac.com>
88 90
 Phil Oleson <oz*nixil.net>
... ...
@@ -1,3 +1,16 @@
1
+Sun Mar  7 23:29:25 CET 2004 (tk)
2
+---------------------------------
3
+  * Makefiles: allow building outside of the source tree (thanks to Philippe
4
+	       Gay <ph.gay*free.fr>)
5
+  * libclamav: improved checking for sscanf matching failure (thanks to
6
+	       Dirk Mueller <mueller*kde.org>)
7
+  * libclamav: fixed a typo in unrarlib (Dirk Mueller)
8
+  * libclamav: fixed detection of encrypted zip archives (Dirk Mueller)
9
+  * clamscan: pass libclamav options to checkfile() (bug introduced a few
10
+	      days ago, found by Dirk Mueller <mueller*kde.org>)
11
+  * clamd: fixed TemporaryDirectory option (don't call free() on putenv()'ed
12
+	   variable). Thanks to Andrey Cherezov <andrey*cherezov.koenig.su>.
13
+
1 14
 Sun Mar  7 15:19:51 GMT 2004 (njh)
2 15
 ----------------------------------
3 16
   * libclamav/message.c:	Fixed minor typo in bounce message
... ...
@@ -6,7 +19,7 @@ Sun Mar  7 15:19:51 GMT 2004 (njh)
6 6
 Sun Mar  7 12:40:05 GMT 2004 (njh)
7 7
 ----------------------------------
8 8
   * libclamav/message.c:	Added new bounce delimeter (thanks to Dirk
9
-	  Mueller <mueller@kde.org>)
9
+	  Mueller <mueller*kde.org>)
10 10
 	  Removed a warning generated by icc
11 11
 
12 12
 Fri Mar  5 14:25:52 CET 2004 (tk)
... ...
@@ -1,5 +1,5 @@
1 1
 #
2
-#  Copyright (C) 2003 Tomasz Kojm <zolw@konarski.edu.pl>
2
+#  Copyright (C) 2003 - 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
... ...
@@ -23,15 +23,15 @@ sbin_PROGRAMS = clamav-milter
23 23
 
24 24
 clamav_milter_SOURCES = clamav-milter.c
25 25
 
26
-clamav_milter_LDADD = ../clamd/cfgfile.o ../clamd/others.o ../clamscan/getopt.o
26
+clamav_milter_LDADD = $(tpop_builddir)/clamd/cfgfile.o $(tpop_builddir)/clamd/others.o $(tpop_builddir)/clamscan/getopt.o
27 27
 
28
-man_MANS = ../docs/man/clamav-milter.8
28
+man_MANS = $(top_srcdir)/docs/man/clamav-milter.8
29 29
 
30 30
 endif
31 31
 endif
32 32
 
33 33
 DEFS = @DEFS@ -DSENDMAIL_BIN=\"@SENDMAIL@\"
34 34
 # CLAMD_LIBS is used, because clamav-milter requires the same libraries as clamd
35
-LIBS = -L../libclamav -lclamav -L/usr/lib/libmilter -lmilter @CLAMAV_MILTER_LIBS@
36
-INCLUDES = -I../clamd -I../libclamav -I../clamscan
35
+LIBS = -L$(top_builddir)/libclamav -lclamav -L/usr/lib/libmilter -lmilter @CLAMAV_MILTER_LIBS@
36
+INCLUDES = -I$(top_srcdir)/clamd -I$(top_srcdir)/libclamav -I$(top_srcdir)/clamscan
37 37
 EXTRA_DIST = clamav-milter.c INSTALL
... ...
@@ -15,7 +15,7 @@
15 15
 @SET_MAKE@
16 16
 
17 17
 #
18
-#  Copyright (C) 2003 Tomasz Kojm <zolw@konarski.edu.pl>
18
+#  Copyright (C) 2003 - 2004 Tomasz Kojm <tkojm@clamav.net>
19 19
 #
20 20
 #  This program is free software; you can redistribute it and/or modify
21 21
 #  it under the terms of the GNU General Public License as published by
... ...
@@ -122,14 +122,14 @@ install_sh = @install_sh@
122 122
 
123 123
 @BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@clamav_milter_SOURCES = clamav-milter.c
124 124
 
125
-@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@clamav_milter_LDADD = ../clamd/cfgfile.o ../clamd/others.o ../clamscan/getopt.o
125
+@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@clamav_milter_LDADD = $(tpop_builddir)/clamd/cfgfile.o $(tpop_builddir)/clamd/others.o $(tpop_builddir)/clamscan/getopt.o
126 126
 
127
-@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@man_MANS = ../docs/man/clamav-milter.8
127
+@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@man_MANS = $(top_srcdir)/docs/man/clamav-milter.8
128 128
 
129 129
 DEFS = @DEFS@ -DSENDMAIL_BIN=\"@SENDMAIL@\"
130 130
 # CLAMD_LIBS is used, because clamav-milter requires the same libraries as clamd
131
-LIBS = -L../libclamav -lclamav -L/usr/lib/libmilter -lmilter @CLAMAV_MILTER_LIBS@
132
-INCLUDES = -I../clamd -I../libclamav -I../clamscan
131
+LIBS = -L$(top_builddir)/libclamav -lclamav -L/usr/lib/libmilter -lmilter @CLAMAV_MILTER_LIBS@
132
+INCLUDES = -I$(top_srcdir)/clamd -I$(top_srcdir)/libclamav -I$(top_srcdir)/clamscan
133 133
 EXTRA_DIST = clamav-milter.c INSTALL
134 134
 subdir = clamav-milter
135 135
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
... ...
@@ -148,9 +148,9 @@ clamav_milter_OBJECTS = $(am_clamav_milter_OBJECTS)
148 148
 @BUILD_CLAMD_FALSE@@HAVE_MILTER_TRUE@clamav_milter_DEPENDENCIES =
149 149
 @BUILD_CLAMD_FALSE@@HAVE_MILTER_FALSE@clamav_milter_DEPENDENCIES =
150 150
 @BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@clamav_milter_DEPENDENCIES = \
151
-@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@	../clamd/cfgfile.o \
152
-@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@	../clamd/others.o \
153
-@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@	../clamscan/getopt.o
151
+@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@	$(tpop_builddir)/clamd/cfgfile.o \
152
+@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@	$(tpop_builddir)/clamd/others.o \
153
+@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@	$(tpop_builddir)/clamscan/getopt.o
154 154
 @BUILD_CLAMD_TRUE@@HAVE_MILTER_FALSE@clamav_milter_DEPENDENCIES =
155 155
 clamav_milter_LDFLAGS =
156 156
 DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
... ...
@@ -1,5 +1,5 @@
1 1
 #
2
-#  Copyright (C) 2002 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
... ...
@@ -51,10 +51,10 @@ clamd_SOURCES = \
51 51
     tests.c \
52 52
     tests.h
53 53
 
54
-clamd_LDADD = ../clamscan/getopt.o
54
+clamd_LDADD = $(top_builddir)/clamscan/getopt.o
55 55
 
56 56
 endif
57 57
 
58 58
 DEFS = @DEFS@
59
-LIBS = -L../libclamav -lclamav @CLAMD_LIBS@
60
-INCLUDES = -I../clamscan -I../libclamav
59
+LIBS = -L$(top_builddir)/libclamav -lclamav @CLAMD_LIBS@
60
+INCLUDES = -I$(top_srcdir)/clamscan -I$(top_srcdir)/libclamav
... ...
@@ -15,7 +15,7 @@
15 15
 @SET_MAKE@
16 16
 
17 17
 #
18
-#  Copyright (C) 2002 Tomasz Kojm <zolw@konarski.edu.pl>
18
+#  Copyright (C) 2002 - 2004 Tomasz Kojm <tkojm@clamav.net>
19 19
 #
20 20
 #  This program is free software; you can redistribute it and/or modify
21 21
 #  it under the terms of the GNU General Public License as published by
... ...
@@ -151,11 +151,11 @@ install_sh = @install_sh@
151 151
 @BUILD_CLAMD_TRUE@    tests.h
152 152
 
153 153
 
154
-@BUILD_CLAMD_TRUE@clamd_LDADD = ../clamscan/getopt.o
154
+@BUILD_CLAMD_TRUE@clamd_LDADD = $(top_builddir)/clamscan/getopt.o
155 155
 
156 156
 DEFS = @DEFS@
157
-LIBS = -L../libclamav -lclamav @CLAMD_LIBS@
158
-INCLUDES = -I../clamscan -I../libclamav
157
+LIBS = -L$(top_builddir)/libclamav -lclamav @CLAMD_LIBS@
158
+INCLUDES = -I$(top_srcdir)/clamscan -I$(top_srcdir)/libclamav
159 159
 subdir = clamd
160 160
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
161 161
 CONFIG_HEADER = $(top_builddir)/clamav-config.h
... ...
@@ -172,7 +172,7 @@ PROGRAMS = $(sbin_PROGRAMS)
172 172
 @BUILD_CLAMD_TRUE@	clamuko.$(OBJEXT) dazukoio_compat12.$(OBJEXT) \
173 173
 @BUILD_CLAMD_TRUE@	dazukoio.$(OBJEXT) tests.$(OBJEXT)
174 174
 clamd_OBJECTS = $(am_clamd_OBJECTS)
175
-@BUILD_CLAMD_TRUE@clamd_DEPENDENCIES = ../clamscan/getopt.o
175
+@BUILD_CLAMD_TRUE@clamd_DEPENDENCIES = $(top_builddir)/clamscan/getopt.o
176 176
 @BUILD_CLAMD_FALSE@clamd_DEPENDENCIES =
177 177
 clamd_LDFLAGS =
178 178
 DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
... ...
@@ -209,7 +209,7 @@ void clamd(struct optstruct *opt)
209 209
 	    logg("Setting %s as global temporary directory\n", cpt->strarg);
210 210
 	else
211 211
 	    logg("!Can't set TMPDIR variable - insufficient space in the environment.\n");
212
-	free(var);
212
+	/* DON'T CALL free(var) - see putenv(3) */
213 213
     }
214 214
 
215 215
     /* load the database(s) */
... ...
@@ -25,9 +25,9 @@ clamdscan_SOURCES = \
25 25
     client.h \
26 26
     defaults.h
27 27
 
28
-clamdscan_LDADD = ../clamscan/getopt.o ../clamscan/options.o ../clamscan/others.o ../clamd/cfgfile.o
28
+clamdscan_LDADD = $(top_builddir)/clamscan/getopt.o $(top_builddir)/clamscan/options.o $(top_builddir)/clamscan/others.o $(top_builddir)/clamd/cfgfile.o
29 29
 
30 30
 endif
31 31
 
32
-INCLUDES = -I../clamscan -I../clamd -I../libclamav
33
-LIBS = -L../libclamav -lclamav @FRESHCLAM_LIBS@
32
+INCLUDES = -I$(top_srcdir)/clamscan -I$(top_srcdir)/clamd -I$(top_srcdir)/libclamav
33
+LIBS = -L$(top_builddir)/libclamav -lclamav @FRESHCLAM_LIBS@
... ...
@@ -125,10 +125,10 @@ install_sh = @install_sh@
125 125
 @BUILD_CLAMD_TRUE@    defaults.h
126 126
 
127 127
 
128
-@BUILD_CLAMD_TRUE@clamdscan_LDADD = ../clamscan/getopt.o ../clamscan/options.o ../clamscan/others.o ../clamd/cfgfile.o
128
+@BUILD_CLAMD_TRUE@clamdscan_LDADD = $(top_builddir)/clamscan/getopt.o $(top_builddir)/clamscan/options.o $(top_builddir)/clamscan/others.o $(top_builddir)/clamd/cfgfile.o
129 129
 
130
-INCLUDES = -I../clamscan -I../clamd -I../libclamav
131
-LIBS = -L../libclamav -lclamav @FRESHCLAM_LIBS@
130
+INCLUDES = -I$(top_srcdir)/clamscan -I$(top_srcdir)/clamd -I$(top_srcdir)/libclamav
131
+LIBS = -L$(top_builddir)/libclamav -lclamav @FRESHCLAM_LIBS@
132 132
 subdir = clamdscan
133 133
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
134 134
 CONFIG_HEADER = $(top_builddir)/clamav-config.h
... ...
@@ -140,9 +140,11 @@ PROGRAMS = $(bin_PROGRAMS)
140 140
 @BUILD_CLAMD_TRUE@am_clamdscan_OBJECTS = clamdscan.$(OBJEXT) \
141 141
 @BUILD_CLAMD_TRUE@	client.$(OBJEXT)
142 142
 clamdscan_OBJECTS = $(am_clamdscan_OBJECTS)
143
-@BUILD_CLAMD_TRUE@clamdscan_DEPENDENCIES = ../clamscan/getopt.o \
144
-@BUILD_CLAMD_TRUE@	../clamscan/options.o ../clamscan/others.o \
145
-@BUILD_CLAMD_TRUE@	../clamd/cfgfile.o
143
+@BUILD_CLAMD_TRUE@clamdscan_DEPENDENCIES = \
144
+@BUILD_CLAMD_TRUE@	$(top_builddir)/clamscan/getopt.o \
145
+@BUILD_CLAMD_TRUE@	$(top_builddir)/clamscan/options.o \
146
+@BUILD_CLAMD_TRUE@	$(top_builddir)/clamscan/others.o \
147
+@BUILD_CLAMD_TRUE@	$(top_builddir)/clamd/cfgfile.o
146 148
 @BUILD_CLAMD_FALSE@clamdscan_DEPENDENCIES =
147 149
 clamdscan_LDFLAGS =
148 150
 
... ...
@@ -34,5 +34,5 @@ clamscan_SOURCES = \
34 34
     defaults.h
35 35
 
36 36
 DEFS = @DEFS@
37
-LIBS = -L../libclamav -lclamav
38
-INCLUDES = -I.. -I../libclamav
37
+LIBS = -L$(top_builddir)/libclamav -lclamav
38
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/libclamav
... ...
@@ -136,8 +136,8 @@ clamscan_SOURCES = \
136 136
 
137 137
 
138 138
 DEFS = @DEFS@
139
-LIBS = -L../libclamav -lclamav
140
-INCLUDES = -I.. -I../libclamav
139
+LIBS = -L$(top_builddir)/libclamav -lclamav
140
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/libclamav
141 141
 subdir = clamscan
142 142
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
143 143
 CONFIG_HEADER = $(top_builddir)/clamav-config.h
... ...
@@ -375,7 +375,7 @@ int scanfile(const char *filename, struct cl_node *root, const struct passwd *us
375 375
 
376 376
     if((strbcasestr(filename, ".zip") || strbcasestr(filename, ".rar")) && (options & CL_ARCHIVE)) {
377 377
 	/* try to use internal archivers */
378
-	if((ret = checkfile(filename, root, limits, CL_ARCHIVE)) == CL_VIRUS) {
378
+	if((ret = checkfile(filename, root, limits, options)) == CL_VIRUS) {
379 379
 	    if(optl(opt, "remove")) {
380 380
 		if(unlink(filename)) {
381 381
 		    mprintf("%s: Can't remove.\n", filename);
... ...
@@ -172,7 +172,7 @@ void *mmalloc(size_t size)
172 172
     alloc = malloc(size);
173 173
 
174 174
     if(!alloc) {
175
-	printf("CRITICAL: Can't allocate memory (%d bytes).\n", size);
175
+	printf("CRITICAL: Can't allocate memory (%ld bytes).\n", size);
176 176
 	exit(71);
177 177
 	return NULL;
178 178
     } else return alloc;
... ...
@@ -185,7 +185,7 @@ void *mcalloc(size_t nmemb, size_t size)
185 185
     alloc = calloc(nmemb, size);
186 186
 
187 187
     if(!alloc) {
188
-	printf("CRITICAL: Can't allocate memory (%d bytes).\n", nmemb * size);
188
+	printf("CRITICAL: Can't allocate memory (%ld bytes).\n", nmemb * size);
189 189
 	exit(70);
190 190
 	return NULL;
191 191
     } else return alloc;
... ...
@@ -1,5 +1,5 @@
1 1
 #
2
-#  Copyright (C) 2002 Tomasz Kojm <zolw@konarski.edu.pl>
2
+#  Copyright (C) 2002 - 2004 Tomasz Kojm <tkojm@clamav.net>
3 3
 #  Fixes - Arkadiusz Miskiewicz <misiek@pld.org.pl>
4 4
 #
5 5
 #  This program is free software; you can redistribute it and/or modify
... ...
@@ -29,12 +29,12 @@ freshclam_SOURCES = \
29 29
     notify.h
30 30
 
31 31
 if BUILD_CLAMD
32
-freshclam_LDADD = ../clamscan/getopt.o ../clamscan/others.o ../clamd/cfgfile.o
32
+freshclam_LDADD = $(top_builddir)/clamscan/getopt.o $(top_builddir)/clamscan/others.o $(top_builddir)/clamd/cfgfile.o
33 33
 else
34
-freshclam_LDADD = ../clamscan/getopt.o ../clamscan/others.o
34
+freshclam_LDADD = $(top_builddir)/clamscan/getopt.o $(top_builddir)/clamscan/others.o
35 35
 endif
36 36
 
37 37
 
38 38
 DEFS = @DEFS@
39
-INCLUDES = -I../clamscan -I../clamd -I../libclamav
40
-LIBS = -L../libclamav -lclamav @FRESHCLAM_LIBS@
39
+INCLUDES = -I$(top_srcdir)/clamscan -I$(top_srcdir)/clamd -I$(top_srcdir)/libclamav
40
+LIBS = -L$(top_builddir)/libclamav -lclamav @FRESHCLAM_LIBS@
... ...
@@ -15,7 +15,7 @@
15 15
 @SET_MAKE@
16 16
 
17 17
 #
18
-#  Copyright (C) 2002 Tomasz Kojm <zolw@konarski.edu.pl>
18
+#  Copyright (C) 2002 - 2004 Tomasz Kojm <tkojm@clamav.net>
19 19
 #  Fixes - Arkadiusz Miskiewicz <misiek@pld.org.pl>
20 20
 #
21 21
 #  This program is free software; you can redistribute it and/or modify
... ...
@@ -130,12 +130,12 @@ freshclam_SOURCES = \
130 130
     notify.h
131 131
 
132 132
 
133
-@BUILD_CLAMD_TRUE@freshclam_LDADD = ../clamscan/getopt.o ../clamscan/others.o ../clamd/cfgfile.o
134
-@BUILD_CLAMD_FALSE@freshclam_LDADD = ../clamscan/getopt.o ../clamscan/others.o
133
+@BUILD_CLAMD_TRUE@freshclam_LDADD = $(top_builddir)/clamscan/getopt.o $(top_builddir)/clamscan/others.o $(top_builddir)/clamd/cfgfile.o
134
+@BUILD_CLAMD_FALSE@freshclam_LDADD = $(top_builddir)/clamscan/getopt.o $(top_builddir)/clamscan/others.o
135 135
 
136 136
 DEFS = @DEFS@
137
-INCLUDES = -I../clamscan -I../clamd -I../libclamav
138
-LIBS = -L../libclamav -lclamav @FRESHCLAM_LIBS@
137
+INCLUDES = -I$(top_srcdir)/clamscan -I$(top_srcdir)/clamd -I$(top_srcdir)/libclamav
138
+LIBS = -L$(top_builddir)/libclamav -lclamav @FRESHCLAM_LIBS@
139 139
 subdir = freshclam
140 140
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
141 141
 CONFIG_HEADER = $(top_builddir)/clamav-config.h
... ...
@@ -146,10 +146,13 @@ PROGRAMS = $(bin_PROGRAMS)
146 146
 am_freshclam_OBJECTS = freshclam.$(OBJEXT) options.$(OBJEXT) \
147 147
 	manager.$(OBJEXT) notify.$(OBJEXT)
148 148
 freshclam_OBJECTS = $(am_freshclam_OBJECTS)
149
-@BUILD_CLAMD_TRUE@freshclam_DEPENDENCIES = ../clamscan/getopt.o \
150
-@BUILD_CLAMD_TRUE@	../clamscan/others.o ../clamd/cfgfile.o
151
-@BUILD_CLAMD_FALSE@freshclam_DEPENDENCIES = ../clamscan/getopt.o \
152
-@BUILD_CLAMD_FALSE@	../clamscan/others.o
149
+@BUILD_CLAMD_TRUE@freshclam_DEPENDENCIES = \
150
+@BUILD_CLAMD_TRUE@	$(top_builddir)/clamscan/getopt.o \
151
+@BUILD_CLAMD_TRUE@	$(top_builddir)/clamscan/others.o \
152
+@BUILD_CLAMD_TRUE@	$(top_builddir)/clamd/cfgfile.o
153
+@BUILD_CLAMD_FALSE@freshclam_DEPENDENCIES = \
154
+@BUILD_CLAMD_FALSE@	$(top_builddir)/clamscan/getopt.o \
155
+@BUILD_CLAMD_FALSE@	$(top_builddir)/clamscan/others.o
153 156
 freshclam_LDFLAGS =
154 157
 DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
155 158
 CPPFLAGS = @CPPFLAGS@
... ...
@@ -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
... ...
@@ -16,7 +16,7 @@
16 16
 #  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 17
 
18 18
 
19
-INCLUDES = -I.. -I@srcdir@/zziplib
19
+INCLUDES = -I$(top_srcdir) -I@srcdir@/zziplib
20 20
 
21 21
 libclamav_la_LIBADD = @LIBCLAMAV_LIBS@
22 22
 
... ...
@@ -15,7 +15,7 @@
15 15
 @SET_MAKE@
16 16
 
17 17
 #
18
-#  Copyright (C) 2002, 2003 Tomasz Kojm <zolw@konarski.edu.pl>
18
+#  Copyright (C) 2002 - 2004 Tomasz Kojm <tkojm@clamav.net>
19 19
 #
20 20
 #  This program is free software; you can redistribute it and/or modify
21 21
 #  it under the terms of the GNU General Public License as published by
... ...
@@ -116,7 +116,7 @@ am__include = @am__include@
116 116
 am__quote = @am__quote@
117 117
 install_sh = @install_sh@
118 118
 
119
-INCLUDES = -I.. -I@srcdir@/zziplib
119
+INCLUDES = -I$(top_srcdir) -I@srcdir@/zziplib
120 120
 
121 121
 libclamav_la_LIBADD = @LIBCLAMAV_LIBS@
122 122
 
... ...
@@ -119,10 +119,8 @@ int cli_untgz(int fd, const char *destdir)
119 119
 
120 120
 	    strncpy(osize, block + 124, 12);
121 121
 	    osize[12] = '\0';
122
-	    size = -1;
123
-	    sscanf(osize, "%o", &size);
124 122
 
125
-	    if(size < 0) {
123
+	    if((sscanf(osize, "%o", &size)) == 0) {
126 124
 		cli_errmsg("Invalid size in header.\n");
127 125
 		free(fullname);
128 126
 	        gzclose(infile);
... ...
@@ -350,7 +350,7 @@ int cli_scanzip(int desc, char **virname, long int *scanned, const struct cl_nod
350 350
 	    break;
351 351
 	}
352 352
 
353
-	if(DETECT_ENCRYPTED && (zdirent.d_flags & (1 | 2^6))) {
353
+	if(DETECT_ENCRYPTED && (zdirent.d_flags & 1 )) {
354 354
 	    files++;
355 355
 	    cli_dbgmsg("Zip -> Encrypted files found in archive.\n");
356 356
 	    *virname = "Encrypted.Zip";
... ...
@@ -935,7 +935,7 @@ BOOL ExtrFile(int desc)
935 935
 #else
936 936
   /* open and identify archive                                              */
937 937
   newdesc = dup(desc);
938
-  cli_dbgmsg("ExtrFile(): dup(%d) = %d\n");
938
+  cli_dbgmsg("ExtrFile(): dup(%d) = %d\n", desc, newdesc);
939 939
   if ((ArcPtr=fdopen(newdesc,READBINARY))!=NULL)
940 940
   {
941 941
     if (!IsArchive())
... ...
@@ -1,5 +1,5 @@
1 1
 #
2
-#  Copyright (C) 2002 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
... ...
@@ -15,7 +15,7 @@
15 15
 #  along with this program; if not, write to the Free Software
16 16
 #  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 17
 
18
-INCLUDES = -I../clamscan -I../libclamav
18
+INCLUDES = -I$(top_srcdir)/clamscan -I$(top_srcdir)/libclamav
19 19
 
20 20
 bin_PROGRAMS = sigtool
21 21
 
... ...
@@ -23,7 +23,7 @@ sigtool_SOURCES = \
23 23
     options.c \
24 24
     sigtool.c
25 25
 
26
-sigtool_LDADD = ../clamscan/getopt.o ../clamscan/others.o
26
+sigtool_LDADD = $(top_builddir)/clamscan/getopt.o $(top_builddir)/clamscan/others.o
27 27
 
28 28
 DEFS = @DEFS@
29
-LIBS = -L../libclamav -lclamav @FRESHCLAM_LIBS@
29
+LIBS = -L$(top_builddir)/libclamav -lclamav @FRESHCLAM_LIBS@
... ...
@@ -15,7 +15,7 @@
15 15
 @SET_MAKE@
16 16
 
17 17
 #
18
-#  Copyright (C) 2002 Tomasz Kojm <zolw@konarski.edu.pl>
18
+#  Copyright (C) 2002 - 2004 Tomasz Kojm <tkojm@clamav.net>
19 19
 #
20 20
 #  This program is free software; you can redistribute it and/or modify
21 21
 #  it under the terms of the GNU General Public License as published by
... ...
@@ -116,7 +116,7 @@ am__include = @am__include@
116 116
 am__quote = @am__quote@
117 117
 install_sh = @install_sh@
118 118
 
119
-INCLUDES = -I../clamscan -I../libclamav
119
+INCLUDES = -I$(top_srcdir)/clamscan -I$(top_srcdir)/libclamav
120 120
 
121 121
 bin_PROGRAMS = sigtool
122 122
 
... ...
@@ -125,10 +125,10 @@ sigtool_SOURCES = \
125 125
     sigtool.c
126 126
 
127 127
 
128
-sigtool_LDADD = ../clamscan/getopt.o ../clamscan/others.o
128
+sigtool_LDADD = $(top_builddir)/clamscan/getopt.o $(top_builddir)/clamscan/others.o
129 129
 
130 130
 DEFS = @DEFS@
131
-LIBS = -L../libclamav -lclamav @FRESHCLAM_LIBS@
131
+LIBS = -L$(top_builddir)/libclamav -lclamav @FRESHCLAM_LIBS@
132 132
 subdir = sigtool
133 133
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
134 134
 CONFIG_HEADER = $(top_builddir)/clamav-config.h
... ...
@@ -138,7 +138,8 @@ PROGRAMS = $(bin_PROGRAMS)
138 138
 
139 139
 am_sigtool_OBJECTS = options.$(OBJEXT) sigtool.$(OBJEXT)
140 140
 sigtool_OBJECTS = $(am_sigtool_OBJECTS)
141
-sigtool_DEPENDENCIES = ../clamscan/getopt.o ../clamscan/others.o
141
+sigtool_DEPENDENCIES = $(top_builddir)/clamscan/getopt.o \
142
+	$(top_builddir)/clamscan/others.o
142 143
 sigtool_LDFLAGS =
143 144
 DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
144 145
 CPPFLAGS = @CPPFLAGS@