Browse code

Big update

git-svn: trunk@109

Tomasz Kojm authored on 2003/11/12 07:10:27
Showing 85 changed files
... ...
@@ -1,3 +1,15 @@
1
+Tue Nov 11 22:47:37 CET 2003 (tk)
2
+---------------------------------
3
+  * sigtool: CVD builder: now date contains a numeric timezone (suggested
4
+    by Tomasz Papszun)
5
+  * freshclam: fixed update message with --http-proxy (problem reported by
6
+	       Nigel and Kristof Petr). Proxy support must be enhanced in the
7
+	       next version.
8
+  * docs/manpages: updated
9
+  * docs/clamdoc.pdf: rewritten
10
+  * docs/Turkish: included Turish clamdoc.pdf translation by yavuz kaya and
11

                
12
+
1 13
 Tue Nov 11 13:51:23 IST 2003 (njh)
2 14
 ----------------------------------
3 15
   * clamav-milter: Fixed handling of % characters in e-mail addresses
... ...
@@ -8,7 +8,7 @@ here may not be available in a binary packages.
8 8
 ----
9 9
 
10 10
 -) clamd:
11
-    + fixed a race condition in database reloading code (random hangs
11
+    + fixed a race condition in database reloading code (random crashes
12 12
       under high load)
13 13
     + fixed PidFile permissions (Magnus Ekdahl, bug reported by Tomasz Papszun)
14 14
     + fixed LogFile permissions (Magnus Ekdahl)
... ...
@@ -41,13 +41,13 @@ here may not be available in a binary packages.
41 41
 
42 42
 
43 43
 New list of compatible software (see clamdoc.pdf for details):
44
-    + IVS Milter
44
+    + cgpav
45 45
     + smtp-vilter
46
+    + IVS Milter
46 47
     + scanexi
47 48
     + Mail::ClamAV
48 49
     + OpenAntiVirus samba-vscan
49
-    
50
-
50
+    + nclamd
51 51
 
52 52
 
53 53
 
... ...
@@ -25,7 +25,7 @@ clamav_milter_SOURCES = clamav-milter.c
25 25
 
26 26
 clamav_milter_LDADD = ../clamd/cfgfile.o ../clamd/others.o ../clamscan/getopt.o
27 27
 
28
-man_MANS = ../docs/clamav-milter.1
28
+man_MANS = ../docs/clamav-milter.8
29 29
 
30 30
 endif
31 31
 endif
... ...
@@ -122,7 +122,7 @@ install_sh = @install_sh@
122 122
 
123 123
 @BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@clamav_milter_LDADD = ../clamd/cfgfile.o ../clamd/others.o ../clamscan/getopt.o
124 124
 
125
-@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@man_MANS = ../docs/clamav-milter.1
125
+@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@man_MANS = ../docs/clamav-milter.8
126 126
 
127 127
 DEFS = @DEFS@
128 128
 # CLAMD_LIBS is used, because clamav-milter requires the same libraries as clamd
... ...
@@ -251,15 +251,15 @@ distclean-libtool:
251 251
 	-rm -f libtool
252 252
 uninstall-info-am:
253 253
 
254
-man1dir = $(mandir)/man1
255
-install-man1: $(man1_MANS) $(man_MANS)
254
+man8dir = $(mandir)/man8
255
+install-man8: $(man8_MANS) $(man_MANS)
256 256
 	@$(NORMAL_INSTALL)
257
-	$(mkinstalldirs) $(DESTDIR)$(man1dir)
258
-	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
257
+	$(mkinstalldirs) $(DESTDIR)$(man8dir)
258
+	@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
259 259
 	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
260 260
 	for i in $$l2; do \
261 261
 	  case "$$i" in \
262
-	    *.1*) list="$$list $$i" ;; \
262
+	    *.8*) list="$$list $$i" ;; \
263 263
 	  esac; \
264 264
 	done; \
265 265
 	for i in $$list; do \
... ...
@@ -269,16 +269,16 @@ install-man1: $(man1_MANS) $(man_MANS)
269 269
 	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
270 270
 	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
271 271
 	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
272
-	  echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
273
-	  $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
272
+	  echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man8dir)/$$inst"; \
273
+	  $(INSTALL_DATA) $$file $(DESTDIR)$(man8dir)/$$inst; \
274 274
 	done
275
-uninstall-man1:
275
+uninstall-man8:
276 276
 	@$(NORMAL_UNINSTALL)
277
-	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
277
+	@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
278 278
 	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
279 279
 	for i in $$l2; do \
280 280
 	  case "$$i" in \
281
-	    *.1*) list="$$list $$i" ;; \
281
+	    *.8*) list="$$list $$i" ;; \
282 282
 	  esac; \
283 283
 	done; \
284 284
 	for i in $$list; do \
... ...
@@ -286,8 +286,8 @@ uninstall-man1:
286 286
 	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
287 287
 	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
288 288
 	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
289
-	  echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
290
-	  rm -f $(DESTDIR)$(man1dir)/$$inst; \
289
+	  echo " rm -f $(DESTDIR)$(man8dir)/$$inst"; \
290
+	  rm -f $(DESTDIR)$(man8dir)/$$inst; \
291 291
 	done
292 292
 
293 293
 ETAGS = etags
... ...
@@ -356,7 +356,7 @@ check: check-am
356 356
 all-am: Makefile $(PROGRAMS) $(MANS)
357 357
 
358 358
 installdirs:
359
-	$(mkinstalldirs) $(DESTDIR)$(sbindir) $(DESTDIR)$(man1dir)
359
+	$(mkinstalldirs) $(DESTDIR)$(sbindir) $(DESTDIR)$(man8dir)
360 360
 
361 361
 install: install-am
362 362
 install-exec: install-exec-am
... ...
@@ -405,7 +405,7 @@ install-exec-am: install-sbinPROGRAMS
405 405
 
406 406
 install-info: install-info-am
407 407
 
408
-install-man: install-man1
408
+install-man: install-man8
409 409
 
410 410
 installcheck-am:
411 411
 
... ...
@@ -420,7 +420,7 @@ mostlyclean-am: mostlyclean-compile mostlyclean-generic \
420 420
 
421 421
 uninstall-am: uninstall-info-am uninstall-man uninstall-sbinPROGRAMS
422 422
 
423
-uninstall-man: uninstall-man1
423
+uninstall-man: uninstall-man8
424 424
 
425 425
 .PHONY: GTAGS all all-am check check-am clean clean-generic \
426 426
 	clean-libtool clean-sbinPROGRAMS distclean distclean-compile \
... ...
@@ -428,11 +428,11 @@ uninstall-man: uninstall-man1
428 428
 	distclean-tags distdir dvi dvi-am info info-am install \
429 429
 	install-am install-data install-data-am install-exec \
430 430
 	install-exec-am install-info install-info-am install-man \
431
-	install-man1 install-sbinPROGRAMS install-strip installcheck \
431
+	install-man8 install-sbinPROGRAMS install-strip installcheck \
432 432
 	installcheck-am installdirs maintainer-clean \
433 433
 	maintainer-clean-generic mostlyclean mostlyclean-compile \
434 434
 	mostlyclean-generic mostlyclean-libtool tags uninstall \
435
-	uninstall-am uninstall-info-am uninstall-man uninstall-man1 \
435
+	uninstall-am uninstall-info-am uninstall-man uninstall-man8 \
436 436
 	uninstall-sbinPROGRAMS
437 437
 
438 438
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
... ...
@@ -208,12 +208,12 @@ void help(void)
208 208
 {
209 209
 
210 210
     printf("\n");
211
-    printf("		   Clam AntiVirus Daemon, "VERSION"\n");
212
-    printf("		   (c) 2002 Tomasz Kojm <zolw@konarski.edu.pl>\n");
213
-    printf("	  \n");
214
-    printf("    --help		    -h		Show help.\n");
215
-    printf("    --version		    -V		Show version number.\n");
216
-    printf("    --config-file=FILE	    -c FILE	Read configuration from FILE.\n\n");
211
+    printf("                           Clam AntiVirus Daemon "VERSION"\n");
212
+    printf("                 (c) 2002, 2003 Tomasz Kojm <tkojm@clamav.net>\n\n");
213
+
214
+    printf("    --help                   -h             Show this help.\n");
215
+    printf("    --version                -V             Show version number.\n");
216
+    printf("    --config-file=FILE       -c FILE        Read configuration from FILE.\n\n");
217 217
 
218 218
     exit(0);
219 219
 }
... ...
@@ -20,14 +20,12 @@ if BUILD_CLAMD
20 20
 bin_PROGRAMS = clamdscan
21 21
 
22 22
 clamdscan_SOURCES = \
23
-    options.c \
24
-    options.h \
25 23
     clamdscan.c \
26 24
     client.c \
27 25
     client.h \
28 26
     defaults.h
29 27
 
30
-clamdscan_LDADD = ../clamscan/getopt.o ../clamscan/others.o ../clamd/cfgfile.o
28
+clamdscan_LDADD = ../clamscan/getopt.o ../clamscan/options.o ../clamscan/others.o ../clamd/cfgfile.o
31 29
 
32 30
 endif
33 31
 
... ...
@@ -117,15 +117,13 @@ install_sh = @install_sh@
117 117
 @BUILD_CLAMD_TRUE@bin_PROGRAMS = clamdscan
118 118
 
119 119
 @BUILD_CLAMD_TRUE@clamdscan_SOURCES = \
120
-@BUILD_CLAMD_TRUE@    options.c \
121
-@BUILD_CLAMD_TRUE@    options.h \
122 120
 @BUILD_CLAMD_TRUE@    clamdscan.c \
123 121
 @BUILD_CLAMD_TRUE@    client.c \
124 122
 @BUILD_CLAMD_TRUE@    client.h \
125 123
 @BUILD_CLAMD_TRUE@    defaults.h
126 124
 
127 125
 
128
-@BUILD_CLAMD_TRUE@clamdscan_LDADD = ../clamscan/getopt.o ../clamscan/others.o ../clamd/cfgfile.o
126
+@BUILD_CLAMD_TRUE@clamdscan_LDADD = ../clamscan/getopt.o ../clamscan/options.o ../clamscan/others.o ../clamd/cfgfile.o
129 127
 
130 128
 INCLUDES = -I../clamscan -I../clamd -I../libclamav
131 129
 LIBS = -L../libclamav -lclamav @FRESHCLAM_LIBS@
... ...
@@ -136,11 +134,12 @@ CONFIG_CLEAN_FILES =
136 136
 @BUILD_CLAMD_FALSE@bin_PROGRAMS =
137 137
 PROGRAMS = $(bin_PROGRAMS)
138 138
 
139
-@BUILD_CLAMD_TRUE@am_clamdscan_OBJECTS = options.$(OBJEXT) \
140
-@BUILD_CLAMD_TRUE@	clamdscan.$(OBJEXT) client.$(OBJEXT)
139
+@BUILD_CLAMD_TRUE@am_clamdscan_OBJECTS = clamdscan.$(OBJEXT) \
140
+@BUILD_CLAMD_TRUE@	client.$(OBJEXT)
141 141
 clamdscan_OBJECTS = $(am_clamdscan_OBJECTS)
142 142
 @BUILD_CLAMD_TRUE@clamdscan_DEPENDENCIES = ../clamscan/getopt.o \
143
-@BUILD_CLAMD_TRUE@	../clamscan/others.o ../clamd/cfgfile.o
143
+@BUILD_CLAMD_TRUE@	../clamscan/options.o ../clamscan/others.o \
144
+@BUILD_CLAMD_TRUE@	../clamd/cfgfile.o
144 145
 @BUILD_CLAMD_FALSE@clamdscan_DEPENDENCIES =
145 146
 clamdscan_LDFLAGS =
146 147
 
... ...
@@ -150,8 +149,7 @@ CPPFLAGS = @CPPFLAGS@
150 150
 LDFLAGS = @LDFLAGS@
151 151
 depcomp = $(SHELL) $(top_srcdir)/depcomp
152 152
 am__depfiles_maybe = depfiles
153
-@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/clamdscan.Po ./$(DEPDIR)/client.Po \
154
-@AMDEP_TRUE@	./$(DEPDIR)/options.Po
153
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/clamdscan.Po ./$(DEPDIR)/client.Po
155 154
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
156 155
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
157 156
 LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
... ...
@@ -212,7 +210,6 @@ distclean-compile:
212 212
 
213 213
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clamdscan.Po@am__quote@
214 214
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client.Po@am__quote@
215
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/options.Po@am__quote@
216 215
 
217 216
 distclean-depend:
218 217
 	-rm -rf ./$(DEPDIR)
... ...
@@ -38,7 +38,7 @@ void help(void);
38 38
 */
39 39
 #define mexit(i)    exit(i)
40 40
 
41
-void clamdscan(struct optstruct *opt)
41
+void clamscan(struct optstruct *opt)
42 42
 {
43 43
 	int ds, dms, ret;
44 44
 	struct timeval t1, t2;
... ...
@@ -120,19 +120,20 @@ void help(void)
120 120
     mprintf_stdout = 1;
121 121
 
122 122
     mprintf("\n");
123
-    mprintf("		   ClamAV Daemon Client "VERSION"\n");
124
-    mprintf("		   (c) 2002 Tomasz Kojm <zolw@konarski.edu.pl>\n");
125
-    mprintf("	  \n");
126
-    mprintf("    --help		    -h		Show help\n");
127
-    mprintf("    --version		    -V		Print version number and exit\n");
128
-    mprintf("    --verbose		    -v		Be verbose\n");
129
-    mprintf("    --quiet				Be quiet, only output error messages\n");
130
-    mprintf("    --stdout				Write to stdout instead of stderr\n");
131
-    mprintf("					(this help is always written to stdout)\n");
132
-    mprintf("    --log=FILE		    -l FILE	Save scan report in FILE\n");
133
-    mprintf("    --log-verbose			Save additional informations\n");
134
-    mprintf("    --config-file=FILE			Read configuration from FILE.\n");
135
-    mprintf("    --disable-summary			Disable summary at end of scanning\n");
123
+    mprintf("                          ClamAV Daemon Client "VERSION"\n");
124
+    mprintf("                (c) 2002, 2003 Tomasz Kojm <tkojm@clamav.net>\n\n");
125
+
126
+    mprintf("    --help              -h             Show help\n");
127
+    mprintf("    --version           -V             Print version number and exit\n");
128
+    mprintf("    --verbose           -v             Be verbose\n");
129
+    mprintf("    --quiet                            Be quiet, only output error messages\n");
130
+    mprintf("    --stdout                           Write to stdout instead of stderr\n");
131
+    mprintf("                                       (this help is always written to stdout)\n");
132
+    mprintf("    --log=FILE          -l FILE        Save scan report in FILE\n");
133
+    mprintf("    --log-verbose                      Log additional messages\n");
134
+    mprintf("    --config-file=FILE                 Read configuration from FILE.\n");
135
+    mprintf("    --disable-summary                  Disable summary at end of scanning\n");
136
+    mprintf("\n");
136 137
 
137 138
     exit(0);
138 139
 }
139 140
deleted file mode 100644
... ...
@@ -1,354 +0,0 @@
1
-/*
2
- *  Copyright (C) 2001-2002 Tomasz Kojm <zolw@konarski.edu.pl>
3
- *
4
- *  This program is free software; you can redistribute it and/or modify
5
- *  it under the terms of the GNU General Public License as published by
6
- *  the Free Software Foundation; either version 2 of the License, or
7
- *  (at your option) any later version.
8
- *
9
- *  This program is distributed in the hope that it will be useful,
10
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
- *  GNU General Public License for more details.
13
- *
14
- *  You should have received a copy of the GNU General Public License
15
- *  along with this program; if not, write to the Free Software
16
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
- *
18
- * Sat Sep 14 22:18:20 CEST 2002: included getfirst*(), getnext*() functions
19
- *			from Alejandro Dubrovsky <s328940@student.uq.edu.au>
20
- */
21
-
22
-#include <stdio.h>
23
-#include <stdlib.h>
24
-#include <string.h>
25
-#include <clamav.h>
26
-#define _GNU_SOURCE
27
-#include "getopt.h"
28
-
29
-#if defined(C_LINUX) && defined(CL_DEBUG)
30
-#include <sys/resource.h>
31
-#endif
32
-
33
-#include "options.h"
34
-#include "others.h"
35
-#include "shared.h"
36
-
37
-void clamdscan(struct optstruct *opt);
38
-
39
-int main(int argc, char **argv)
40
-{
41
-	int ret, opt_index, i, len;
42
-	struct optstruct *opt;
43
-
44
-	const char *getopt_parameters = "hvd:wriVl:m";
45
-
46
-	static struct option long_options[] = {
47
-	    {"help", 0, 0, 'h'},
48
-	    {"quiet", 0, 0, 0},
49
-	    {"verbose", 0, 0, 'v'},
50
-	    {"version", 0, 0, 'V'},
51
-	    {"config-file", 1, 0, 0},
52
-	    {"tempdir", 1, 0, 0},
53
-	    {"database", 1, 0, 'd'},
54
-	    {"whole-file", 0, 0, 'w'}, /* not used */
55
-	    {"force", 0, 0, 0},
56
-	    {"recursive", 0, 0, 'r'},
57
-	    {"disable-summary", 0, 0, 0},
58
-	    {"infected", 0, 0, 'i'},
59
-	    {"log", 1, 0, 'l'},
60
-	    {"log-verbose", 0, 0, 0},
61
-	    {"threads", 1, 0, 0},
62
-	    {"one-virus", 0, 0, 0}, /* not used */
63
-
64
-	    {"remove", 0, 0, 0},
65
-	    {"exclude", 1, 0, 0},
66
-	    {"include", 1, 0, 0},
67
-	    {"max-files", 1, 0, 0},
68
-	    {"max-space", 1, 0, 0},
69
-	    {"max-recursion", 1, 0, 0},
70
-	    {"disable-archive", 0, 0, 0},
71
-
72
-	    {"mbox", 0, 0, 'm'},
73
-	    {"stdout", 0, 0, 0},
74
-	    {"unzip", 2, 0, 0},
75
-	    {"unrar", 2, 0, 0},
76
-	    {"unace", 2, 0, 0},
77
-	    {"unarj", 2, 0, 0}, /* not used */
78
-	    {"arj", 2, 0, 0},
79
-	    {"zoo", 2, 0, 0}, /* not used */
80
-	    {"unzoo", 2, 0, 0},
81
-	    {"lha", 2, 0, 0},
82
-	    {"jar", 2, 0, 0},
83
-	    {"tar", 2, 0, 0},
84
-	    {"tgz", 2, 0, 0},
85
-	    {"deb", 2, 0, 0},
86
-	    {0, 0, 0, 0}
87
-    	};
88
-
89
-#if defined(C_LINUX) && defined(CL_DEBUG)
90
-	/* njh@bandsman.co.uk: create a dump if needed */
91
-	struct rlimit rlim;
92
-
93
-    rlim.rlim_cur = rlim.rlim_max = RLIM_INFINITY;
94
-    if(setrlimit(RLIMIT_CORE, &rlim) < 0)
95
-	perror("setrlimit");
96
-#endif
97
-
98
-    opt=(struct optstruct*) mmalloc(sizeof(struct optstruct));
99
-    opt->optlist = NULL;
100
-
101
-    while(1) {
102
-
103
-	opt_index=0;
104
-	ret=getopt_long(argc, argv, getopt_parameters, long_options, &opt_index);
105
-
106
-	if (ret == -1)
107
-	    break;
108
-
109
-	switch (ret) {
110
-	    case 0:
111
-		register_long_option(opt, long_options[opt_index].name);
112
-		break;
113
-
114
-    	    default:
115
-		if(strchr(getopt_parameters, ret))
116
-		    register_char_option(opt, ret);
117
-		else {
118
-		    mprintf("!Unknown option passed.\n");
119
-		    free_opt(opt);
120
-		    exit(40);
121
-		}
122
-        }
123
-    }
124
-
125
-    if (optind < argc) {
126
-
127
-        len=0;
128
-
129
-	/* count length of non-option arguments */
130
-
131
-	for(i=optind; i<argc; i++)
132
-	    len+=strlen(argv[i]);
133
-
134
-	len=len+argc-optind-1; /* add spaces between arguments */
135
-	opt->filename=(char*)mcalloc(len + 256, sizeof(char));
136
-
137
-        for(i=optind; i<argc; i++) {
138
-	    strncat(opt->filename, argv[i], strlen(argv[i]));
139
-	    if(i != argc-1)
140
-		strncat(opt->filename, " ", 1);
141
-	}
142
-
143
-    } else
144
-	/* FIXME !!! Without this, we have segfault */
145
-	opt->filename=(char*)mcalloc(1, sizeof(char));
146
-
147
-
148
-    clamdscan(opt);
149
-
150
-    return(0);
151
-}
152
-
153
-void register_char_option(struct optstruct *opt, char ch)
154
-{
155
-	struct optnode *newnode;
156
-
157
-    newnode = (struct optnode *) mmalloc(sizeof(struct optnode));
158
-    newnode->optchar = ch;
159
-    if(optarg != NULL) {
160
-	newnode->optarg = (char *) mcalloc(strlen(optarg) + 1, sizeof(char));
161
-	strcpy(newnode->optarg, optarg);
162
-    } else newnode->optarg = NULL;
163
-
164
-    newnode->optname = NULL;
165
-    newnode->next = opt->optlist;
166
-    opt->optlist = newnode;
167
-}
168
-
169
-void register_long_option(struct optstruct *opt, const char *optname)
170
-{
171
-	struct optnode *newnode;
172
-
173
-    newnode = (struct optnode *) mmalloc(sizeof(struct optnode));
174
-    newnode->optchar = 0;
175
-    if(optarg != NULL) {
176
-	newnode->optarg = (char *) mcalloc(strlen(optarg) + 1, sizeof(char));
177
-	strcpy(newnode->optarg, optarg);
178
-    } else newnode->optarg = NULL;
179
-
180
-    newnode->optname = (char *) mcalloc(strlen(optname) + 1, sizeof(char));
181
-    strcpy(newnode->optname, optname);
182
-    newnode->next = opt->optlist;
183
-    opt->optlist = newnode;
184
-}
185
-
186
-int optc(const struct optstruct *opt, char ch)
187
-{
188
-	struct optnode *handler;
189
-
190
-    handler = opt->optlist;
191
-
192
-    while(1) {
193
-	if(handler) {
194
-	    if(handler->optchar == ch) return 1;
195
-	} else break;
196
-	handler = handler->next;
197
-    }
198
-
199
-    return(0);
200
-}
201
-
202
-int optl(const struct optstruct *opt, const char *optname)
203
-{
204
-	struct optnode *handler;
205
-
206
-    handler = opt->optlist;
207
-
208
-    while(1) {
209
-	if(handler) {
210
-	    if(handler->optname)
211
-		if(!strcmp(handler->optname, optname)) return 1;
212
-	} else break;
213
-	handler = handler->next;
214
-    }
215
-
216
-    return(0);
217
-}
218
-
219
-char *getargc(const struct optstruct *opt, char ch)
220
-{
221
-	struct optnode *handler;
222
-
223
-    handler = opt->optlist;
224
-
225
-    while(1) {
226
-	if(handler) {
227
-	    if(handler->optchar == ch) return handler->optarg;
228
-	} else break;
229
-	handler = handler->next;
230
-    }
231
-
232
-    return(NULL);
233
-}
234
-
235
-char *getfirstargc(const struct optstruct *opt, char ch, struct optnode **optnode)
236
-{
237
-	struct optnode *handler;
238
-
239
-    handler = opt->optlist;
240
-
241
-    while(1) {
242
-	if(handler) {
243
-	    if(handler->optchar == ch) {
244
-	    	*optnode = handler;
245
-	    	return handler->optarg;
246
-	    }
247
-	} else break;
248
-	handler = handler->next;
249
-    }
250
-    *optnode = NULL;
251
-    return(NULL);
252
-}
253
-
254
-char *getnextargc(struct optnode **optnode, char ch)
255
-{
256
-	struct optnode *handler;
257
-
258
-    handler = (*optnode)->next;
259
-
260
-    while(1) {
261
-	if(handler) {
262
-	    if(handler->optchar == ch) {
263
-	    	*optnode = handler;
264
-	    	return handler->optarg;
265
-	    }
266
-	} else break;
267
-	handler = handler->next;
268
-    }
269
-    *optnode = NULL;
270
-    return(NULL);
271
-}
272
-
273
-char *getargl(const struct optstruct *opt, const char *optname)
274
-{
275
-	struct optnode *handler;
276
-
277
-    handler = opt->optlist;
278
-
279
-    while(1) {
280
-	if(handler) {
281
-	    if(handler->optname)
282
-		if(!strcmp(handler->optname, optname)) return handler->optarg;
283
-	} else break;
284
-	handler = handler->next;
285
-    }
286
-
287
-    return(NULL);
288
-}
289
-
290
-char *getfirstargl(const struct optstruct *opt, const char *optname, struct optnode **optnode)
291
-{
292
-	struct optnode *handler;
293
-
294
-    handler = opt->optlist;
295
-
296
-    while(1) {
297
-	if(handler) {
298
-	    if(handler->optname)
299
-		if(!strcmp(handler->optname, optname)) {
300
-			*optnode = handler;
301
-			return handler->optarg;
302
-		}
303
-	} else break;
304
-	handler = handler->next;
305
-    }
306
-    
307
-    *optnode = NULL;
308
-    return(NULL);
309
-}
310
-
311
-char *getnextargl(struct optnode **optnode, const char *optname)
312
-{
313
-	struct optnode *handler;
314
-
315
-    handler = (*optnode)->next;
316
-
317
-    while(1) {
318
-	if(handler) {
319
-	    if(handler->optname)
320
-		if(!strcmp(handler->optname, optname)) {
321
-			*optnode = handler;
322
-			return handler->optarg;
323
-		}
324
-	} else break;
325
-	handler = handler->next;
326
-    }
327
-    
328
-    *optnode = NULL;
329
-    return(NULL);
330
-}
331
-
332
-void free_opt(struct optstruct *opt)
333
-{
334
-	struct optnode *handler, *prev;
335
-
336
-    if(!opt || !opt->optlist)
337
-	return;
338
-
339
-    mprintf("*Freeing option list... ");
340
-    handler = opt->optlist;
341
-
342
-    while(handler != NULL) {
343
-	handler->optchar = 0;
344
-	if(handler->optarg) free(handler->optarg);
345
-	if(handler->optname) free(handler->optname);
346
-	prev = handler;
347
-	handler = handler->next;
348
-	free(prev);
349
-    }
350
-
351
-    free(opt->filename);
352
-    free(opt);
353
-    mprintf("*done\n");
354
-}
355 1
deleted file mode 100644
... ...
@@ -1,46 +0,0 @@
1
-/*
2
- *  Copyright (C) 2002 Tomasz Kojm <zolw@konarski.edu.pl>
3
- *
4
- *  This program is free software; you can redistribute it and/or modify
5
- *  it under the terms of the GNU General Public License as published by
6
- *  the Free Software Foundation; either version 2 of the License, or
7
- *  (at your option) any later version.
8
- *
9
- *  This program is distributed in the hope that it will be useful,
10
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
- *  GNU General Public License for more details.
13
- *
14
- *  You should have received a copy of the GNU General Public License
15
- *  along with this program; if not, write to the Free Software
16
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
- */
18
-
19
-#ifndef __OPTIONS_H
20
-#define __OPTIONS_H
21
-
22
-struct optnode {
23
-    char optchar;
24
-    char *optarg;
25
-    char *optname;
26
-    struct optnode *next;
27
-};
28
-
29
-struct optstruct {
30
-    struct optnode *optlist;
31
-    char *filename;
32
-};
33
-
34
-int optc(const struct optstruct *opt, char ch);
35
-int optl(const struct optstruct *opt, const char *optname);
36
-void register_char_option(struct optstruct *opt, char ch);
37
-void register_long_option(struct optstruct *opt, const char *optname);
38
-char *getargc(const struct optstruct *opt, char ch);
39
-char *getfirstargc(const struct optstruct *opt, char ch, struct optnode **optnode);
40
-char *getnextargc(struct optnode **optnode, char ch);
41
-char *getargl(const struct optstruct *opt, const char *optname);
42
-char *getfirstargl(const struct optstruct *opt, const char *optname, struct optnode **optnode);
43
-char *getnextargl(struct optnode **optnode, const char *optname);
44
-void free_opt(struct optstruct *opt);
45
-
46
-#endif
... ...
@@ -183,48 +183,47 @@ void help(void)
183 183
     mprintf_stdout = 1;
184 184
 
185 185
     mprintf("\n");
186
-    mprintf("		   Clam AntiVirus Scanner "VERSION"\n");
187
-    mprintf("	    (c) 2002, 2003 Tomasz Kojm <zolw@konarski.edu.pl>\n");
188
-    mprintf("	  \n");
189
-    mprintf("    --help		    -h		Show help\n");
190
-    mprintf("    --version		    -V		Print version number and exit\n");
191
-    mprintf("    --verbose		    -v		Be verbose\n");
192
-    mprintf("    --debug				Enable debug messages\n");
193
-    mprintf("    --quiet				Be quiet, output only error messages\n");
194
-    mprintf("    --stdout				Write to stdout instead of stderr\n");
195
-    mprintf("					(this help is always written to stdout)\n");
196
-    mprintf("    --force				Try to ignore some errors\n");
186
+    mprintf("                          Clam AntiVirus Scanner "VERSION"\n");
187
+    mprintf("                (c) 2002, 2003 Tomasz Kojm <tkojm@clamav.net>\n\n");
188
+
189
+    mprintf("    --help                -h             Show help\n");
190
+    mprintf("    --version             -V             Print version number and exit\n");
191
+    mprintf("    --verbose             -v             Be verbose\n");
192
+    mprintf("    --debug                              Enable debug messages\n");
193
+    mprintf("    --quiet                              Be quiet - only output error messages\n");
194
+    mprintf("    --stdout                             Write to stdout instead of stderr\n");
195
+    mprintf("                                         (this help is always written to stdout)\n");
197 196
     mprintf("\n");
198
-    mprintf("    --tempdir=DIRECTORY			create temporary files in DIRECTORY\n");
199
-    mprintf("    --database=FILE/DIR    -d FILE/DIR	Load virus database from FILE or load\n");
200
-    mprintf("					all .db and .db2 files from DIR\n");
201
-    mprintf("    --log=FILE		    -l FILE	Save scan report in FILE\n");
202
-    mprintf("    --log-verbose			Save additional informations\n");
203
-    mprintf("    --recursive    	    -r	    	Scan directories recursively\n");
204
-    mprintf("    --infected		    -i		Print infected files only\n");
205
-    mprintf("    --remove				Remove infected files. Be careful.\n");
206
-    mprintf("    --move=DIRECTORY			Move infected files into DIRECTORY\n");
207
-    mprintf("    --exclude=PATT			Don't scan file names containing PATT\n");
208
-    mprintf("    --include=PATT			Only scan file names containing PATT\n");
209
-    mprintf("    --disable-summary			Disable summary at end of scanning\n");
210
-    mprintf("    --mbox		    -m		Treat stdin as a mailbox\n");
197
+    mprintf("    --tempdir=DIRECTORY                  create temporary files in DIRECTORY\n");
198
+    mprintf("    --database=FILE/DIR   -d FILE/DIR    Load virus database from FILE or load\n");
199
+    mprintf("                                         all .db and .db2 files from DIR\n");
200
+    mprintf("    --log=FILE            -l FILE        Save scan report in FILE\n");
201
+    mprintf("    --log-verbose                        Save additional informations\n");
202
+    mprintf("    --recursive           -r             Scan directories recursively\n");
203
+    mprintf("    --infected            -i             Print infected files only\n");
204
+    mprintf("    --remove                             Remove infected files. Be careful.\n");
205
+    mprintf("    --move=DIRECTORY                     Move infected files into DIRECTORY\n");
206
+    mprintf("    --exclude=PATT                       Don't scan file names containing PATT\n");
207
+    mprintf("    --include=PATT                       Only scan file names containing PATT\n");
208
+    mprintf("    --disable-summary                    Disable summary at end of scanning\n");
209
+    mprintf("    --mbox                -m             Treat stdin as a mailbox\n");
211 210
     mprintf("\n");
212
-    mprintf("    --disable-archive			Disable libclamav archive support\n");
213
-    mprintf("    --max-space=#n			Extract first #n kilobytes only\n");
214
-    mprintf("    --max-files=#n			Extract first #n files only\n");
215
-    mprintf("    --max-recursion=#n			Maximal recursion level\n");
216
-    mprintf("    --unzip[=FULLPATH]			Enable support for .zip files\n");
217
-    mprintf("    --unrar[=FULLPATH]			Enable support for .rar files\n");
218
-    mprintf("    --unace[=FULLPATH]			Enable support for .ace files\n");
219
-    mprintf("    --arj[=FULLPATH]			Enable support for .arj files\n");
220
-    mprintf("    --unzoo[=FULLPATH]			Enable support for .zoo files\n");
221
-    mprintf("    --lha[=FULLPATH]			Enable support for .lha files\n");
222
-    mprintf("    --jar[=FULLPATH]			Enable support for .jar files\n");
223
-    mprintf("    --tar[=FULLPATH]			Enable support for .tar files\n");
224
-    mprintf("    --deb[=FULLPATH to ar]    		Enable support for .deb files,\n");
225
-    mprintf("					implies --tgz , but doesn't conflict\n");
226
-    mprintf("					with --tgz=FULLPATH.\n");
227
-    mprintf("    --tgz[=FULLPATH]			enable support for .tar.gz, .tgz files\n\n");
211
+    mprintf("    --disable-archive                    Disable libclamav archive support\n");
212
+    mprintf("    --max-space=#n                       Extract first #n kilobytes only\n");
213
+    mprintf("    --max-files=#n                       Extract first #n files only\n");
214
+    mprintf("    --max-recursion=#n                   Maximal recursion level\n");
215
+    mprintf("    --unzip[=FULLPATH]                   Enable support for .zip files\n");
216
+    mprintf("    --unrar[=FULLPATH]                   Enable support for .rar files\n");
217
+    mprintf("    --unace[=FULLPATH]                   Enable support for .ace files\n");
218
+    mprintf("    --arj[=FULLPATH]                     Enable support for .arj files\n");
219
+    mprintf("    --unzoo[=FULLPATH]                   Enable support for .zoo files\n");
220
+    mprintf("    --lha[=FULLPATH]                     Enable support for .lha files\n");
221
+    mprintf("    --jar[=FULLPATH]                     Enable support for .jar files\n");
222
+    mprintf("    --tar[=FULLPATH]                     Enable support for .tar files\n");
223
+    mprintf("    --deb[=FULLPATH to ar]               Enable support for .deb files,\n");
224
+    mprintf("                                         implies --tgz , but doesn't conflict\n");
225
+    mprintf("                                         with --tgz=FULLPATH.\n");
226
+    mprintf("    --tgz[=FULLPATH]                     enable support for .tar.gz, .tgz files\n\n");
228 227
 
229 228
     exit(0);
230 229
 }
... ...
@@ -47,6 +47,7 @@ int main(int argc, char **argv)
47 47
 	    {"debug", 0, 0, 0},
48 48
 	    {"version", 0, 0, 'V'},
49 49
 	    {"tempdir", 1, 0, 0},
50
+	    {"config-file", 1, 0, 0}, /* clamdscan */
50 51
 	    {"database", 1, 0, 'd'},
51 52
 	    {"whole-file", 0, 0, 'w'}, /* not used */
52 53
 	    {"force", 0, 0, 0},
... ...
@@ -15,5 +15,5 @@
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
-EXTRA_DIST = clamscan.1 freshclam.1 sigtool.1 clamd.8 clamdscan.1 clamav.conf.5 clamav-milter.1 clamdoc.tex clamdoc.pdf DMS Spanish Japanese html FreeBSD-HowTo Portugese
19
-man_MANS = clamscan.1 freshclam.1 sigtool.1 clamd.8 clamav.conf.5 clamdscan.1 clamav-milter.1
18
+EXTRA_DIST = clamscan.1 freshclam.1 sigtool.1 clamd.8 clamdscan.1 clamav.conf.5 clamav-milter.8 clamdoc.pdf DMS Spanish Japanese html FreeBSD-HowTo Portugese Turkish
19
+man_MANS = clamscan.1 freshclam.1 sigtool.1 clamd.8 clamav.conf.5 clamdscan.1 clamav-milter.8
... ...
@@ -114,8 +114,8 @@ am__include = @am__include@
114 114
 am__quote = @am__quote@
115 115
 install_sh = @install_sh@
116 116
 
117
-EXTRA_DIST = clamscan.1 freshclam.1 sigtool.1 clamd.8 clamdscan.1 clamav.conf.5 clamav-milter.1 clamdoc.tex clamdoc.pdf DMS Spanish Japanese html FreeBSD-HowTo Portugese
118
-man_MANS = clamscan.1 freshclam.1 sigtool.1 clamd.8 clamav.conf.5 clamdscan.1 clamav-milter.1
117
+EXTRA_DIST = clamscan.1 freshclam.1 sigtool.1 clamd.8 clamdscan.1 clamav.conf.5 clamav-milter.8 clamdoc.pdf DMS Spanish Japanese html FreeBSD-HowTo Portugese Turkish
118
+man_MANS = clamscan.1 freshclam.1 sigtool.1 clamd.8 clamav.conf.5 clamdscan.1 clamav-milter.8
119 119
 subdir = docs
120 120
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
121 121
 CONFIG_CLEAN_FILES =
122 122
deleted file mode 100644
... ...
@@ -1,49 +0,0 @@
1
-.TH "clamav-milter" "1" "June 21, 2003" "" "Clam AntiVirus"
2
-.SH "NAME"
3
-.LP 
4
-clamav\-milter \- milter compatible mail scanner
5
-.SH "SYNOPSIS"
6
-.LP 
7
-clamscan [options] socket_address
8
-.SH "DESCRIPTION"
9
-.LP 
10
-clamav\-milter is a filter for sendmail mail server. It uses a mail scanning engine built into clamd.
11
-.SH "OPTIONS"
12
-.LP 
13
-
14
-.TP 
15
-\fB\-h, \-\-help\fR
16
-Output the help information and exit.
17
-.TP 
18
-\fB\-V, \-\-version\fR
19
-Print the version number and exit.
20
-.TP 
21
-\fB\-c FILE, \-\-config\-file=FILE\fR
22
-By default clamav\-milter uses a default configuration file, this option allows you to specify another one.
23
-.TP 
24
-\fB\-x n, \-\-debug\-level=n\fR
25
-Set the debug level to n (where n from [0..9]).
26
-.TP 
27
-\fB\-b, \-\-bounce\fR
28
-Send a failure message to the sender.
29
-.TP 
30
-\fB\-l, \-\-local\fR
31
-Also scan messages sent from LAN.
32
-.TP 
33
-\fB\-o, \-\-outgoing\fR
34
-Scan outgoing messages from this machine.
35
-.TP 
36
-\fB\-\-server=ADDRESS, \-s ADDRESS\fR
37
-IP address of server running clamd (when using TCPsocket).
38
-.TP 
39
-\fB\-\-max\-children=n, \-m n\fR
40
-Maximum number of children.
41
-.SH "EXAMPLES"
42
-.LP 
43
-clamav\-milter \-\-max\-children=2 \-obl local:/var/run/clmilter.sock
44
-.SH "AUTHOR"
45
-.LP 
46
-clamav\-milter was written by Nigel Horne <njh@bandsman.co.uk>, the manual page was created by Tomasz Kojm <zolw@konarski.edu.pl>.
47
-.SH "SEE ALSO"
48
-.LP 
49
-clamd(8), clamscan(1), freshclam(1), sigtool(1), clamav.conf(5)
... ...
@@ -1,48 +1,48 @@
1
-.\" Manual page created by Tomasz Kojm, 1.10.2002.
2
-.TH "clamav.conf" "5" "June 6, 2003" "Tomasz Kojm" "Clam AntiVirus"
1
+.\" Manual page created by Tomasz Kojm, 20021001.
2
+.TH "clamav.conf" "5" "November 11, 2003" "Tomasz Kojm" "Clam AntiVirus"
3 3
 .SH "NAME"
4 4
 .LP 
5
-\fBclamav.conf\fR \- Configuration file for Clam AntiVirus Daemon
5
+\fBclamav.conf\fR \- a configuration file for Clam AntiVirus Daemon
6 6
 .SH "DESCRIPTION"
7 7
 .LP 
8
-The clamav.conf configures the Clam AntiVirus daemon, clamd(8).
8
+clamav.conf configures the Clam AntiVirus daemon, clamd(8).
9 9
 .SH "FILE FORMAT"
10
-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:
10
+The file consists of comments and options with optional arguments. Each line that starts with a hash (\fB#\fR) symbol is ignored. Option names are case sensitive and of the form \fBOption Argument\fR. There are a few types of arguments:
11 11
 .TP 
12 12
 \fBSTRING\fR
13
-String without a blank characters.
13
+String without blank characters.
14 14
 .TP 
15 15
 \fBSIZE\fR
16
-Size in bytes. You can use a 'M' or 'm' modifiers for megabytes and a 'K' or 'k' for kilobytes.
16
+Size in bytes. You can use the 'M' or 'm' modifiers for megabytes and 'K' or 'k' for kilobytes.
17 17
 .TP 
18 18
 \fBNUMBER\fR
19 19
 Unsigned integer.
20 20
 .SH "DIRECTIVES"
21 21
 .LP 
22
-When some option is not used (hashed or doesn't exist in the configuration file), clamd takes a default action.
22
+If some option is not used (hashed or doesn't exist in the configuration file), clamd takes a default action.
23 23
 .TP 
24 24
 \fBExample\fR
25
-When this option is set, clamd will stop and ask you to modify the configuration file.
25
+If this option is set clamd will not run.
26 26
 .TP 
27 27
 \fBLogFile STRING\fR
28
-Enable logging to a specified file.
28
+Enable logging to selected file.
29 29
 .br 
30 30
 Default: disabled.
31 31
 .TP 
32 32
 \fBLogFileUnlock\fR
33
-Disable the lock, that protects against running clamd with the same configuration multiple times. Enabling this option is not recommended.
33
+Disable a system lock that protects against running clamd with a same configuration multiple times.
34 34
 .br 
35 35
 Default: disabled.
36 36
 .TP 
37 37
 \fBLogFileMaxSize SIZE\fR
38
-Limit the size of the log file. When SIZE is reached, the logger is automatically disabled. Value of 0 disables the limit.
38
+Limit a size of a log file. The logger will be automatically disabled  if the file is greater than SIZE. Value of 0 disables the limit.
39 39
 .br 
40 40
 Default: 1M
41 41
 .TP 
42 42
 \fBLogTime\fR
43
-Log time information with each message.
43
+Log time with each message.
44 44
 .br 
45
-Default: disabled.
45
+Defayult: disabled.
46 46
 .TP 
47 47
 \fBLogSyslog\fR
48 48
 Use system logger (can work together with LogFile).
... ...
@@ -50,17 +50,22 @@ Use system logger (can work together with LogFile).
50 50
 Default: disabled.
51 51
 .TP 
52 52
 \fBPidFile STRING\fR
53
-Save the process identifier of the listening daemon (main thread) to a specified file.
53
+Save a process identifier of a listening daemon (main thread) to a specified file.
54 54
 .br 
55 55
 Default: disabled.
56 56
 .TP 
57 57
 \fBDataDirectory STRING\fR
58
-Path to the directory containing database files.
58
+Path to a directory containing database files.
59 59
 .br 
60 60
 Default: hardcoded directory.
61 61
 .TP 
62 62
 \fBLocalSocket STRING\fR
63
-Path to the local (Unix) socket the daemon will listen on.
63
+Path to a local (Unix) socket the daemon will listen on.
64
+.br 
65
+Default: disabled.
66
+.TP 
67
+\fBFixStaleSocket\fR
68
+Remove stale socket after unclean shutdown.
64 69
 .br 
65 70
 Default: disabled.
66 71
 .TP 
... ...
@@ -69,13 +74,18 @@ TCP port number the daemon will listen on.
69 69
 .br 
70 70
 Default: disabled.
71 71
 .TP 
72
+\fBTCPAddr STRING\fR
73
+TCP address to bind to. By default clamd binds to INADDR_ANY.
74
+.br 
75
+Default: disabled.
76
+.TP 
72 77
 \fBMaxConnectionQueueLength NUMBER\fR
73 78
 Maximum length the queue of pending connections may grow to.
74 79
 .br 
75 80
 Default: 15
76 81
 .TP 
77 82
 \fBMaxThreads NUMBER\fR
78
-Maximal number of a threads running at the same time.
83
+Maximal number of threads running at the same time.
79 84
 .br 
80 85
 Default: 5.
81 86
 .TP 
... ...
@@ -85,7 +95,7 @@ Stop thread\-scanner after specified time (in seconds). Value of 0 disables the
85 85
 Default: 180
86 86
 .TP 
87 87
 \fBMaxDirectoryRecursion NUMBER\fR
88
-Maximal depth the directories are scanned at.
88
+Maximal depth a directories are scanned at.
89 89
 .br 
90 90
 Default: disabled.
91 91
 .TP 
... ...
@@ -95,24 +105,24 @@ Follow a directory symlinks. You should have enabled directory recursion limit t
95 95
 Default: disabled.
96 96
 .TP 
97 97
 \fBFollowFileSymlinks\fR
98
-Follow a regular file symlinks.
98
+Follow regular file symlinks.
99 99
 .br 
100 100
 Default: disabled.
101 101
 .TP 
102 102
 \fBSelfCheck NUMBER\fR
103
-Do internal checks every NUMBER seconds. In some cases it's able to fix a problem (eg. rebuild a broken graph).
103
+Do internal checks every NUMBER seconds.
104 104
 .br 
105 105
 Default: 3600
106 106
 .TP 
107 107
 \fBVirusEvent COMMAND\fR
108
-Execute COMMAND when virus is found. In the command string %v and %f will be replaced by the virus name and the infected file name respectively.
109
-\fBSECURITY WARNING: Make sure the virus event command cannot be exploited, eg. by using some special file name when %f is used. Always use a full path to the command. Never delete/move files with this directive !
108
+Execute the COMMAND when virus is found. In the command string %v and %f will be replaced by a virus name and an infected file name respectively.
109
+\fBSECURITY WARNING: Make sure the virus event command cannot be exploited eg. by using some special file name when %f is in use. Always use a full path to the command. Never delete/move files with this directive !
110 110
 \fR
111 111
 .br 
112 112
 Default: disabled.
113 113
 .TP 
114 114
 \fBUser STRING\fR
115
-When started by root, drop priviledges to a specified user.
115
+Drop priviledges to a selected user.
116 116
 .br 
117 117
 Default: disabled.
118 118
 .TP 
... ...
@@ -126,17 +136,21 @@ Don't fork into background. Useful in debugging.
126 126
 .br 
127 127
 Default: disabled.
128 128
 .TP 
129
+\fBDebug\fR
130
+Enable debug messages from libclamav. You need to enable the \fBForeground\fR option to see them.
131
+.TP 
129 132
 \fBStreamSaveToDisk\fR
130
-When activated, input stream (see STREAM command) will be saved to disk before scanning \- this allows scanning within archives.
133
+When activated the input stream (see STREAM command) will be saved to disk before scanning \- this allows scanning within archives.
131 134
 .br 
132 135
 Default: disabled.
133 136
 .TP 
134 137
 \fBStreamMaxLength SIZE\fR
135
-Close the connection if this limit is exceeded
138
+Close the connection when this limit is exceeded.
136 139
 .br 
137 140
 Default: disabled.
141
+.TP 
138 142
 \fBScanMail\fR
139
-Enable scanning of mail files.
143
+Enable scanning of Mbox, Maildir and raw mail files.
140 144
 .br 
141 145
 Default: disabled.
142 146
 .TP 
... ...
@@ -145,6 +159,11 @@ Enable archive scanning.
145 145
 .br 
146 146
 Default: disabled.
147 147
 .TP 
148
+\fBScanRAR\fR
149
+The built\-in RAR unpacker is disabled by default because the code leaks.
150
+.br 
151
+Default: disabled.
152
+.TP 
148 153
 \fBArchiveMaxFileSize SIZE\fR
149 154
 Files in archives larger than this limit won't be scanned. Value of 0 disables the limit.
150 155
 .br 
... ...
@@ -186,7 +205,7 @@ Scan a file on execute.
186 186
 Default: disabled.
187 187
 .TP 
188 188
 \fBClamukoIncludePath STRING\fR
189
-Set the include paths (all files and directories in them will be scanned). You can have multiple ClamukoIncludePath options, but each directory must be added in a seperate option.
189
+Set the include paths (all files and directories in them will be scanned). You can have multiple ClamukoIncludePath options but each directory must be added with a seperate option.
190 190
 .br 
191 191
 Default: disabled. Required.
192 192
 .TP 
... ...
@@ -211,7 +230,7 @@ Default: disabled.
211 211
 /usr/local/etc/clamav.conf
212 212
 .SH "AUTHOR"
213 213
 .LP 
214
-Tomasz Kojm <zolw@konarski.edu.pl>
214
+Tomasz Kojm <tkojm@clamav.net>
215 215
 .SH "SEE ALSO"
216 216
 .LP 
217
-clamd(8), clamdscan(1), clamscan(1), freshclam(1), sigtool(1)
217
+clamd(8), clamdscan(1), clamscan(1), freshclam(1), sigtool(1), clamav\-milter(8)
... ...
@@ -1,5 +1,5 @@
1
-.\" Manual page created by Tomasz Kojm, 29.09.2002
2
-.TH "Clam Daemon" "8" "June 21, 2003" "Tomasz Kojm" "Clam AntiVirus"
1
+.\" Manual page created by Tomasz Kojm, 20020929
2
+.TH "Clam Daemon" "8" "November 11, 2003" "Tomasz Kojm" "Clam AntiVirus"
3 3
 .SH "NAME"
4 4
 .LP 
5 5
 clamd \- an anti\-virus daemon
... ...
@@ -17,10 +17,10 @@ clamd recognizes the following commands:
17 17
 Check the server's state. It should reply with "PONG".
18 18
 .TP 
19 19
 \fBVERSION\fR
20
-Print the version information.
20
+Print a version information.
21 21
 .TP 
22 22
 \fBRELOAD\fR
23
-Reload the databases.
23
+Reload the virus databases.
24 24
 .TP 
25 25
 \fBQUIT\fR
26 26
 Perform a clean exit.
... ...
@@ -32,7 +32,7 @@ Scan a file or directory (recursively) with archive support enabled (if not disa
32 32
 Scan a file or directory (recursively) with archive support disabled. A full path is required.
33 33
 .TP 
34 34
 \fBCONTSCAN file/directory\fR
35
-Scan a file or directory (recursively) with archive support enabled and continue scanning even when virus was found. A full path is required.
35
+Scan a file or directory (recursively) with archive support enabled and continue scanning even when virus is found. A full path is required.
36 36
 .TP 
37 37
 \fBSTREAM\fR
38 38
 Scan stream \- on this command clamd will return "PORT number" and you can connect to that port and send a data to scan.
... ...
@@ -47,12 +47,12 @@ Output help information and exit.
47 47
 Print the version number and exit.
48 48
 .TP 
49 49
 \fB\-c FILE, \-\-config\-file=FILE\fR
50
-Read the configuration from FILE.
50
+Read configuration from FILE.
51 51
 .SH "CREDITS"
52 52
 Please check the full documentation for credits.
53 53
 .SH "AUTHOR"
54 54
 .LP 
55
-Tomasz Kojm <zolw@konarski.edu.pl>
55
+Tomasz Kojm <tkojm@clamav.net>
56 56
 .SH "SEE ALSO"
57 57
 .LP 
58
-clamdscan(1), clamscan(1), freshclam(1), sigtool(1), clamav.conf(5)
58
+clamdscan(1), clamscan(1), freshclam(1), sigtool(1), clamav.conf(5), clamav\-milter(8)
59 59
Binary files a/clamav-devel/docs/clamdoc.pdf and b/clamav-devel/docs/clamdoc.pdf differ
60 60
deleted file mode 100644
... ...
@@ -1,1121 +0,0 @@
1
-% Clam AntiVirus: User Manual
2
-% (c) 2002, 2003 Tomasz Kojm <zolw@konarski.edu.pl>
3
-% Version 0.2x corrected by Dennis Leeuw <dleeuw@made-it.com>
4
-\documentclass[a4paper,titlepage,12pt]{article}
5
-\usepackage{amssymb}
6
-\usepackage{pslatex}
7
-\usepackage[dvips]{graphicx}
8
-\usepackage{wrapfig}
9
-\usepackage{url}
10
-%\usepackage{fancyhdr}
11
-\usepackage{fancybox}
12
-\usepackage{titlesec}
13
-\cornersize{.4}
14
-%\fancyhf{}
15
-\headheight 14pt
16
-
17
-\usepackage{color}
18
-\definecolor{grey1}{gray}{0.8}
19
-\definecolor{grey2}{gray}{0.3}
20
-
21
-% Based on Antonina Liedtke's article in Linux+ 6/2003
22
-\def\greyp{%
23
-    \unitlength=1mm%
24
-    \begin{picture}(0,0)
25
-	\put(0,-1.5){\textcolor{grey1}{\rule{12.9cm}{5.3mm}}\textcolor{grey2}%
26
-	{\rule{9mm}{5.3mm}}\hss}
27
-    \end{picture}
28
-}
29
-
30
-\usepackage{fancyhdr}
31
-\pagestyle{fancy}
32
-\fancyhead{}
33
-\fancyfoot{}
34
-\renewcommand{\headrulewidth}{0pt}
35
-\fancyhead[RO]{\textbf{\sffamily{{\textcolor{white}{\thepage}}~}}}
36
-\fancyhead[RE]{\footnotesize{\nouppercase{\rightmark~}}}
37
-\fancyhead[LO]{\footnotesize{\greyp{\nouppercase{\leftmark}}}}
38
-
39
-
40
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%
41
-
42
-
43
-%\fancyhead[L,RO]{\small\bfseries\thepage}
44
-%\fancyhead[LO]{\small\bfseries{CLAM ANTIVIRUS: USER MANUAL}}
45
-\date{}
46
-
47
-\newcommand{\pl}{\vspace{.3cm}}
48
-\newcommand{\rc}[2]{\textbf{#1: } #2\\[4pt]}
49
-\newcommand{\up}[2]{\textbf{--#1: } #2\\[4pt]}
50
-\newcommand{\email}[1]{\texttt{#1}}
51
-\newcommand{\cons}[1]{\vspace{2mm} \noindent \ovalbox {\sffamily #1}
52
-		      \vspace{2mm}}
53
-
54
-\begin{document}
55
-    \setcounter{page}{0}
56
-
57
-    \pagestyle{empty}
58
-    %\includegraphics[width=350pt]{clam.eps}
59
-    \begin{center}
60
-	\huge Clam AntiVirus: User Manual \\
61
-	\vspace{1cm}
62
-	\LARGE version 0.60 \\
63
-	\vspace{5cm}
64
-	\LARGE Tomasz Kojm
65
-    \end{center}
66
-
67
-    \newpage
68
-    \pagestyle{fancy}
69
-    \tableofcontents
70
-    \newpage
71
-
72
-
73
-    \section{Introduction}
74
-
75
-
76
-    Clam AntiVirus is an anti-virus toolkit for UNIX. The main purpose of this
77
-    software is the integration with mail servers (attachment scanning).
78
-    The package provides a flexible and scalable multi-threaded daemon, a
79
-    command line scanner, and a tool for automatic updating via Internet. The
80
-    programs are based on a shared library distributed with the Clam AntiVirus
81
-    package, which you can use with your own software. The virus database
82
-    is based on the virus database from OpenAntiVirus.org, but contains
83
-    additional signatures (including signatures for popular polymorphic viruses,
84
-    too) and is \textbf{kept up to date}.
85
-
86
-    \subsection{Features}
87
-
88
-    \begin{itemize}
89
-	\item{GNU GPL v2 license}
90
-	\item{POSIX compliant, portable}
91
-	\item{Secure}
92
-	\item{Very fast}
93
-	\item{Multi-threaded}
94
-	\item{User friendly}
95
-	\item{On-access scanning (Linux only)}
96
-	\item{Detects over 7000 viruses, worms and trojans}
97
-	\item{Supports compressed files and archives}
98
-	\item{Built-in support for RAR (2.0), Zip, Gzip, Bzip2}
99
-    \end{itemize}
100
-
101
-    \subsection{Mailing lists}
102
-    There are four mailing lists available:
103
-    \begin{itemize}
104
-    \item \textbf{announce@clamav.elektrapro.com} - info about new versions\\
105
-    (including debian package releases), moderated\footnote{That means, the
106
-    subscribers are not allowed to write into the mailing list}.
107
-    \item \textbf{users@clamav.elektrapro.com} - user questions
108
-    \item \textbf{devel@clamav.elektrapro.com} - developement
109
-    \item \textbf{virusdb@clamav.elektrapro.com} - database update information
110
-    \end{itemize}
111
-
112
-    \noindent You can subscribe by sending an empty email to\\
113
-    listname-subscribe@clamav.elektrapro.com, or via www at\\
114
-    \indent \url{http://clamav.elektrapro.com/ml}\\
115
-    After subscribing you must reply to a special message sent at your address.
116
-
117
-    \noindent Mailing lists are archived at: \\
118
-    \indent \url{http://archive.elektrapro.com/clamav.elektrapro.com/users/}\\
119
-    \indent \url{http://archive.elektrapro.com/clamav.elektrapro.com/devel/}\\
120
-
121
-
122
-    \subsection{Virus submitting}
123
-    If you have a virus that is not detected by ClamAV with the latest database,
124
-    please send it (as a normal attachment) to:
125
-    \begin{center}
126
-	\email{virus@clamav.elektrapro.com}
127
-    \end{center}
128
-    If your system doesn't allow you to send infected files, please
129
-    archive the virus sample into a zip archive with password: \emph{virus}
130
-
131
-
132
-
133
-    \section{Installation}
134
-
135
-    \subsection{Requirements}
136
-    You will need the \emph{zlib} and \emph{zlib-devel} packages and the
137
-    \emph{gcc} compiler (both 2.9x and 3.x are supported). You can install
138
-    the \emph{bzip2} library (and its development files) to get bzip2
139
-    support, but this is not required.
140
-
141
-    \subsection{Supported platforms}
142
-    Clam AntiVirus is prepared for the installation on the following
143
-    operating systems / architectures (tested platforms in brackets):
144
-    \begin{itemize}
145
-	\item{GNU/Linux 2.2/2.4 (All flavours, Intel/SPARC/Alpha/zSeries/S/390)}
146
-	\item{Solaris 2.6/7/8/9 (Intel/SPARC)}
147
-	\item{FreeBSD 4.5/6/7 5.0 (Intel/Alpha)}
148
-	\item{OpenBSD 3.0/1/2 (Intel)}
149
-	\item{AIX 4.1/4.2/4.3/5.1 (RISC 6000)}
150
-	\item{HPUX 11.0}
151
-	\item{SCO UNIX}
152
-	\item{Mac OS X}
153
-	\item{BeOS}
154
-	\item{Cobalt MIPS boxes (RAQ1, RAQ2, QUBE2)}
155
-	\item{Windows/Cygwin}
156
-    \end{itemize}
157
-
158
-    Some features may not be available with your operating system. If you have
159
-    run Clam AntiVirus on the system not listed above, please let us know.
160
-
161
-    \subsection{Actual versions}
162
-    Clam AntiVirus can be obtained from: \\[4pt]
163
-    \begin{center}
164
-	\url{http://clamav.elektrapro.com}\pl
165
-    \end{center}
166
-
167
-    \noindent The site is sponsored by ElektraPro.com
168
-
169
-    \subsection{Binary packages}
170
-    There are high quality \emph{deb} and \emph{rpm} packages available
171
-    for Linux. The Debian package is maintained by Magnus Ekdahl and you will
172
-    find it on debian mirrors, \url{http://www.debian.org}.
173
-    The RPM package is maintained by Arkadiusz Miskiewicz and is distributed
174
-    with Polish(ed) Linux Distribution (\url{ftp://ftp.pld.org.pl}). There is
175
-    also the RPM package for Mandrake available, it's maintained by Oden
176
-    Eriksson and can be found on Mandrake mirrors.
177
-    The binary packages for AIX are available in AIX PDSLIB, UCLA
178
-    \url{http://aixpdslib.seas.ucla.edu/packages/clamav.html}. The official
179
-    FreeBSD port is maintained by Masahiro Teramoto. The unofficial port
180
-    for OpenBSD (maintained by Flinn Mueller) is available at:\\
181
-    \url{http://www.activeintra.net/openbsd/article.php?id=5}.
182
-
183
-
184
-
185
-    \subsection{Installation}
186
-
187
-    \noindent
188
-    Please read the README file in the current version, because it probably
189
-    contains some important release notes.
190
-    If you are installing Clam AV for the first time, you have to add a new user
191
-    and group to your system - \emph{clamav}: \footnote{Cygwin note:
192
-    If you don't have /etc/passwd, you don't need the \emph{clamav} user/group.}
193
-
194
-    \begin{verbatim}
195
-	# groupadd clamav
196
-	# useradd -g clamav -s /bin/false -c "Clam AntiVirus" clamav
197
-    \end{verbatim}
198
-
199
-    The above method works on Linux and Solaris, if you don't have
200
-    \emph{groupadd, useradd} please consult your system manual - the section
201
-    about creating new users and groups.
202
-    If you are not a system administrator or won't be using \textbf{clamscan}
203
-    in superuser mode, you may omit this step with the option
204
-    \emph{--disable-clamav} passed to the \emph{configure} script:
205
-    \begin{verbatim}
206
-	$ ./configure --disable-clamav 
207
-    \end{verbatim}
208
-    This disables test for the \emph{clamav} user and group. \textbf{clamscan}
209
-    still requires \emph{clamav} for superuser mode. Please don't set a password
210
-    on this account, just assure it's locked with "\textbf{!}" in
211
-    \emph{/etc/passwd} or \emph{/etc/shadow}. It must be a normal, unprivileged
212
-    user. Don't add it to any supplementary groups.\pl
213
-
214
-    \noindent
215
-    After you have created the clamav user/group, extract the archive:
216
-    \begin{verbatim}
217
-	$ zcat clamav-x.yz.tar.gz | tar xvf -
218
-	$ cd clamav-x.yz
219
-    \end{verbatim}
220
-    Assuming you want the configuration file installed in /etc, configure
221
-    the package as follows:
222
-    \begin{verbatim}
223
-	$ ./configure --sysconfdir=/etc
224
-    \end{verbatim}
225
-    Currently \emph{gcc} is required for the compilation. Support for other
226
-    compilers will be added in a near future.
227
-    \begin{verbatim}
228
-	$ make
229
-	$ su -c "make install"
230
-    \end{verbatim}
231
-    In the last step the software is installed in the /usr/local directory
232
-    and the config file in /etc.
233
-    \textbf{WARNING: Never set SUID/SGID bit on Clam AntiVirus programs.}
234
-
235
-    \subsection{Configuration}
236
-    If you are going to use the daemon, you need to configure it.
237
-
238
-    \begin{verbatim}
239
-	$ clamd
240
-	ERROR: Please edit the example config file
241
-	       /etc/clamav.conf.
242
-    \end{verbatim}
243
-
244
-    Now you know, where the configuration file is located ;). The format and
245
-    options of this file are fully described in the \emph{clamav.conf(5)}
246
-    manual. clamd configuration is rather easy, the config file is well
247
-    commented. Remember, you must remove the "Example" directive.
248
-
249
-    Another feature of clamd is on-access scanning based on the Dazuko module,
250
-    available from \url{http://dazuko.org}. \textbf{This is not required to
251
-    run clamd, furthermore you shouldn't run Dazuko on production systems}.
252
-    A special thread in clamd responsible for the communication with Dazuko
253
-    is called "Clamuko" (it's due to the funny name of Dazuko - I don't know
254
-    what Clamuko means). Clamuko is supported on Linux 2.2 and 2.4 only.
255
-    Dazuko instalation:
256
-
257
-
258
-    \begin{verbatim}
259
-	$ tar zxpvf dazuko-a.b.c.tar.gz
260
-	$ cd dazuko-a.b.c
261
-	$ make dazuko
262
-	or
263
-	$ make dazuko-smp (for smp kernels)
264
-	$ su
265
-	# insmod dazuko.o
266
-	# cp dazuko.o /lib/modules/`uname -r`/misc
267
-	# depmod -a
268
-    \end{verbatim}
269
-
270
-    Depending on your Linux distribution you have to add "dazuko" entry to\\
271
-    \emph{/etc/modules} or the following line:
272
-    \begin{verbatim}
273
-	modprobe dazuko
274
-    \end{verbatim}
275
-    to some startup file to load dazuko at the boot time. You must also create
276
-    the \emph{/dev/dazuko} device:
277
-    \begin{verbatim}
278
-	$ cat /proc/devices | grep dazuko
279
-	254 dazuko
280
-	$ su -c "mknod -m 600 /dev/dazuko c 254 0"