Browse code

small improvements

git-svn: trunk@562

Tomasz Kojm authored on 2004/05/16 10:09:43
Showing 8 changed files
... ...
@@ -1,3 +1,9 @@
1
+Sun May 16 03:00:45 CEST 2004 (tk)
2
+----------------------------------
3
+  * clamd: fix logging wording in poll() error message (Joe Maimon
4
+	   <jmaimon*ttec.com>)
5
+  * configure: improve tcpwrappers compilation test
6
+
1 7
 Fri May 14 09:16:12 BST 2004 (njh)
2 8
 ----------------------------------
3 9
   * libclamav/mbox.c:	Use mkstemp() on Cygwin
... ...
@@ -2,6 +2,53 @@ Note: This README/NEWS file refers to the source tarball. Some things described
2 2
 here may not be available in binary packages.
3 3
 --
4 4
 
5
+0.71
6
+----
7
+
8
+This release fixes all bugs found in 0.70 and introduces a few new features,
9
+the noteworthy changes include:
10
+
11
+-) libclamav:
12
+    + support nested OLE2 files 
13
+    + support Word6 macro code
14
+    + ignore popular file types (media, graphics)
15
+    + support compress.exe (SZDD) compression (test/test1.msc)
16
+    + improve virus detection in e-mails
17
+
18
+-) clamscan:
19
+    + automatically decide (by comparing daily.cvd version numbers) which
20
+      database directory (hardcoded or clamav.conf's one) to use
21
+    + support compression ratio feature (--max-ratio)
22
+    + allow regular expressions in --[in|ex]clude
23
+    + do not overwrite old files in a quarantine directory but add a numerical
24
+      extension to new files
25
+    + respect --tempdir in libclamav
26
+    + fix access problem when calling external unpackers in a superuser mode
27
+    + fix file permission corruption with --deb in a superuser mode
28
+
29
+-) clamd
30
+    + support log facility specification in syslog style (LogFacility)
31
+    + new directive LeaveTemporaryFiles (Debug no longer leaves temporary
32
+      files not removed)
33
+
34
+-) clamav-milter:
35
+    + include the virus name in the 550 rejection
36
+    + support user defined template for virus notifications (--template-file)
37
+    + sort quarantine messages by date
38
+    + improve thread management
39
+    + add X-Virus-Scanned and X-Infected-Received-From: headers
40
+    + improve load balancing (when using remote servers with --server)
41
+    + send 554 after DATA received, not 550
42
+    + save PID (--pidfile)
43
+
44
+-) documentation:
45
+    + new Japanese documentation
46
+
47
+
48
+--
49
+The ClamAV team (http://www.clamav.net/team.html)
50
+
51
+
5 52
 
6 53
 0.70
7 54
 ----
... ...
@@ -60,7 +107,7 @@ of mirrors by looking at their ip source address when they try to resolve
60 60
 database.clamav.net. Our DNS servers can answer with a CNAME to:
61 61
 europe.clamav.net, america.clamav.net, asia.clamav.net or other.clamav.net.
62 62
 Our advanced push-mirroring mechanism (maintained by Luca Gibelli) allows
63
-database maintainers to update all the mirrors in less then one minute !
63
+database maintainers to update all the mirrors in less than one minute !
64 64
 
65 65
 
66 66
 There will be no major feature enhancements in the 0.7x series. Our work
... ...
@@ -2,6 +2,53 @@ Note: This README/NEWS file refers to the source tarball. Some things described
2 2
 here may not be available in binary packages.
3 3
 --
4 4
 
5
+0.71
6
+----
7
+
8
+This release fixes all bugs found in 0.70 and introduces a few new features,
9
+the noteworthy changes include:
10
+
11
+-) libclamav:
12
+    + support nested OLE2 files 
13
+    + support Word6 macro code
14
+    + ignore popular file types (media, graphics)
15
+    + support compress.exe (SZDD) compression (test/test1.msc)
16
+    + improve virus detection in e-mails
17
+
18
+-) clamscan:
19
+    + automatically decide (by comparing daily.cvd version numbers) which
20
+      database directory (hardcoded or clamav.conf's one) to use
21
+    + support compression ratio feature (--max-ratio)
22
+    + allow regular expressions in --[in|ex]clude
23
+    + do not overwrite old files in a quarantine directory but add a numerical
24
+      extension to new files
25
+    + respect --tempdir in libclamav
26
+    + fix access problem when calling external unpackers in a superuser mode
27
+    + fix file permission corruption with --deb in a superuser mode
28
+
29
+-) clamd
30
+    + support log facility specification in syslog style (LogFacility)
31
+    + new directive LeaveTemporaryFiles (Debug no longer leaves temporary
32
+      files not removed)
33
+
34
+-) clamav-milter:
35
+    + include the virus name in the 550 rejection
36
+    + support user defined template for virus notifications (--template-file)
37
+    + sort quarantine messages by date
38
+    + improve thread management
39
+    + add X-Virus-Scanned and X-Infected-Received-From: headers
40
+    + improve load balancing (when using remote servers with --server)
41
+    + send 554 after DATA received, not 550
42
+    + save PID (--pidfile)
43
+
44
+-) documentation:
45
+    + new Japanese documentation
46
+
47
+
48
+--
49
+The ClamAV team (http://www.clamav.net/team.html)
50
+
51
+
5 52
 
6 53
 0.70
7 54
 ----
... ...
@@ -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.36 2004/05/09 22:11:29 kojm Exp $
84
+dnl @version: $Id: aclocal.m4,v 1.37 2004/05/16 01:09:43 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.36 2004/05/09 22:11:29 kojm Exp $
4044
+dnl @version $Id: aclocal.m4,v 1.37 2004/05/16 01:09:43 kojm Exp $
4045 4045
 dnl
4046 4046
 AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
4047 4047
 [changequote(<<, >>)dnl
... ...
@@ -78,6 +78,9 @@
78 78
 /* Define to 1 if you have the <dlfcn.h> header file. */
79 79
 #undef HAVE_DLFCN_H
80 80
 
81
+/* Define to 1 if you have the `getpagesize' function. */
82
+#undef HAVE_GETPAGESIZE
83
+
81 84
 /* have gmp installed */
82 85
 #undef HAVE_GMP
83 86
 
... ...
@@ -99,6 +102,9 @@
99 99
 /* Define to 1 if you have the <memory.h> header file. */
100 100
 #undef HAVE_MEMORY_H
101 101
 
102
+/* Define to 1 if you have a working `mmap' system call. */
103
+#undef HAVE_MMAP
104
+
102 105
 /* Define to 1 if you have the <ndir.h> header file. */
103 106
 #undef HAVE_NDIR_H
104 107
 
... ...
@@ -344,11 +344,11 @@ int scanstream(int odesc, unsigned long int *scanned, const struct cl_node *root
344 344
 
345 345
     switch(retval) {
346 346
 	case 0: /* timeout */
347
-	    mdprintf(odesc, "Accept timeout ERROR\n");
348
-	    logg("!ScanStream: accept timeout.\n");
347
+	    mdprintf(odesc, "read timeout ERROR\n");
348
+	    logg("!ScanStream: read timeout.\n");
349 349
 	case -1:
350
-	    mdprintf(odesc, "accept poll ERROR\n");
351
-	    logg("!ScanStream: accept poll failed.\n");
350
+	    mdprintf(odesc, "read poll ERROR\n");
351
+	    logg("!ScanStream: read poll failed.\n");
352 352
     }
353 353
 
354 354
     lseek(tmpd, 0, SEEK_SET);
... ...
@@ -8307,6 +8307,368 @@ fi
8307 8307
 done
8308 8308
 
8309 8309
 
8310
+
8311
+for ac_header in stdlib.h unistd.h
8312
+do
8313
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8314
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
8315
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
8316
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8317
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
8318
+  echo $ECHO_N "(cached) $ECHO_C" >&6
8319
+fi
8320
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8321
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8322
+else
8323
+  # Is the header compilable?
8324
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
8325
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8326
+cat >conftest.$ac_ext <<_ACEOF
8327
+#line $LINENO "configure"
8328
+#include "confdefs.h"
8329
+$ac_includes_default
8330
+#include <$ac_header>
8331
+_ACEOF
8332
+rm -f conftest.$ac_objext
8333
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8334
+  (eval $ac_compile) 2>&5
8335
+  ac_status=$?
8336
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8337
+  (exit $ac_status); } &&
8338
+         { ac_try='test -s conftest.$ac_objext'
8339
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8340
+  (eval $ac_try) 2>&5
8341
+  ac_status=$?
8342
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8343
+  (exit $ac_status); }; }; then
8344
+  ac_header_compiler=yes
8345
+else
8346
+  echo "$as_me: failed program was:" >&5
8347
+cat conftest.$ac_ext >&5
8348
+ac_header_compiler=no
8349
+fi
8350
+rm -f conftest.$ac_objext conftest.$ac_ext
8351
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8352
+echo "${ECHO_T}$ac_header_compiler" >&6
8353
+
8354
+# Is the header present?
8355
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
8356
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8357
+cat >conftest.$ac_ext <<_ACEOF
8358
+#line $LINENO "configure"
8359
+#include "confdefs.h"
8360
+#include <$ac_header>
8361
+_ACEOF
8362
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8363
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8364
+  ac_status=$?
8365
+  egrep -v '^ *\+' conftest.er1 >conftest.err
8366
+  rm -f conftest.er1
8367
+  cat conftest.err >&5
8368
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8369
+  (exit $ac_status); } >/dev/null; then
8370
+  if test -s conftest.err; then
8371
+    ac_cpp_err=$ac_c_preproc_warn_flag
8372
+  else
8373
+    ac_cpp_err=
8374
+  fi
8375
+else
8376
+  ac_cpp_err=yes
8377
+fi
8378
+if test -z "$ac_cpp_err"; then
8379
+  ac_header_preproc=yes
8380
+else
8381
+  echo "$as_me: failed program was:" >&5
8382
+  cat conftest.$ac_ext >&5
8383
+  ac_header_preproc=no
8384
+fi
8385
+rm -f conftest.err conftest.$ac_ext
8386
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8387
+echo "${ECHO_T}$ac_header_preproc" >&6
8388
+
8389
+# So?  What about this header?
8390
+case $ac_header_compiler:$ac_header_preproc in
8391
+  yes:no )
8392
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8393
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8394
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8395
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
8396
+  no:yes )
8397
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8398
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8399
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8400
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8401
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8402
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
8403
+esac
8404
+echo "$as_me:$LINENO: checking for $ac_header" >&5
8405
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8406
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
8407
+  echo $ECHO_N "(cached) $ECHO_C" >&6
8408
+else
8409
+  eval "$as_ac_Header=$ac_header_preproc"
8410
+fi
8411
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8412
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8413
+
8414
+fi
8415
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
8416
+  cat >>confdefs.h <<_ACEOF
8417
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8418
+_ACEOF
8419
+
8420
+fi
8421
+
8422
+done
8423
+
8424
+
8425
+for ac_func in getpagesize
8426
+do
8427
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8428
+echo "$as_me:$LINENO: checking for $ac_func" >&5
8429
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8430
+if eval "test \"\${$as_ac_var+set}\" = set"; then
8431
+  echo $ECHO_N "(cached) $ECHO_C" >&6
8432
+else
8433
+  cat >conftest.$ac_ext <<_ACEOF
8434
+#line $LINENO "configure"
8435
+#include "confdefs.h"
8436
+/* System header to define __stub macros and hopefully few prototypes,
8437
+    which can conflict with char $ac_func (); below.  */
8438
+#include <assert.h>
8439
+/* Override any gcc2 internal prototype to avoid an error.  */
8440
+#ifdef __cplusplus
8441
+extern "C"
8442
+#endif
8443
+/* We use char because int might match the return type of a gcc2
8444
+   builtin and then its argument prototype would still apply.  */
8445
+char $ac_func ();
8446
+char (*f) ();
8447
+
8448
+#ifdef F77_DUMMY_MAIN
8449
+#  ifdef __cplusplus
8450
+     extern "C"
8451
+#  endif
8452
+   int F77_DUMMY_MAIN() { return 1; }
8453
+#endif
8454
+int
8455
+main ()
8456
+{
8457
+/* The GNU C library defines this for functions which it implements
8458
+    to always fail with ENOSYS.  Some functions are actually named
8459
+    something starting with __ and the normal name is an alias.  */
8460
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8461
+choke me
8462
+#else
8463
+f = $ac_func;
8464
+#endif
8465
+
8466
+  ;
8467
+  return 0;
8468
+}
8469
+_ACEOF
8470
+rm -f conftest.$ac_objext conftest$ac_exeext
8471
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8472
+  (eval $ac_link) 2>&5
8473
+  ac_status=$?
8474
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8475
+  (exit $ac_status); } &&
8476
+         { ac_try='test -s conftest$ac_exeext'
8477
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8478
+  (eval $ac_try) 2>&5
8479
+  ac_status=$?
8480
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8481
+  (exit $ac_status); }; }; then
8482
+  eval "$as_ac_var=yes"
8483
+else
8484
+  echo "$as_me: failed program was:" >&5
8485
+cat conftest.$ac_ext >&5
8486
+eval "$as_ac_var=no"
8487
+fi
8488
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8489
+fi
8490
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
8491
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8492
+if test `eval echo '${'$as_ac_var'}'` = yes; then
8493
+  cat >>confdefs.h <<_ACEOF
8494
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8495
+_ACEOF
8496
+
8497
+fi
8498
+done
8499
+
8500
+echo "$as_me:$LINENO: checking for working mmap" >&5
8501
+echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
8502
+if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
8503
+  echo $ECHO_N "(cached) $ECHO_C" >&6
8504
+else
8505
+  if test "$cross_compiling" = yes; then
8506
+  ac_cv_func_mmap_fixed_mapped=no
8507
+else
8508
+  cat >conftest.$ac_ext <<_ACEOF
8509
+#line $LINENO "configure"
8510
+#include "confdefs.h"
8511
+$ac_includes_default
8512
+/* malloc might have been renamed as rpl_malloc. */
8513
+#undef malloc
8514
+
8515
+/* Thanks to Mike Haertel and Jim Avera for this test.
8516
+   Here is a matrix of mmap possibilities:
8517
+	mmap private not fixed
8518
+	mmap private fixed at somewhere currently unmapped
8519
+	mmap private fixed at somewhere already mapped
8520
+	mmap shared not fixed
8521
+	mmap shared fixed at somewhere currently unmapped
8522
+	mmap shared fixed at somewhere already mapped
8523
+   For private mappings, we should verify that changes cannot be read()
8524
+   back from the file, nor mmap's back from the file at a different
8525
+   address.  (There have been systems where private was not correctly
8526
+   implemented like the infamous i386 svr4.0, and systems where the
8527
+   VM page cache was not coherent with the file system buffer cache
8528
+   like early versions of FreeBSD and possibly contemporary NetBSD.)
8529
+   For shared mappings, we should conversely verify that changes get
8530
+   propagated back to all the places they're supposed to be.
8531
+
8532
+   Grep wants private fixed already mapped.
8533
+   The main things grep needs to know about mmap are:
8534
+   * does it exist and is it safe to write into the mmap'd area
8535
+   * how to use it (BSD variants)  */
8536
+
8537
+#include <fcntl.h>
8538
+#include <sys/mman.h>
8539
+
8540
+#if !STDC_HEADERS && !HAVE_STDLIB_H
8541
+char *malloc ();
8542
+#endif
8543
+
8544
+/* This mess was copied from the GNU getpagesize.h.  */
8545
+#if !HAVE_GETPAGESIZE
8546
+/* Assume that all systems that can run configure have sys/param.h.  */
8547
+# if !HAVE_SYS_PARAM_H
8548
+#  define HAVE_SYS_PARAM_H 1
8549
+# endif
8550
+
8551
+# ifdef _SC_PAGESIZE
8552
+#  define getpagesize() sysconf(_SC_PAGESIZE)
8553
+# else /* no _SC_PAGESIZE */
8554
+#  if HAVE_SYS_PARAM_H
8555
+#   include <sys/param.h>
8556
+#   ifdef EXEC_PAGESIZE
8557
+#    define getpagesize() EXEC_PAGESIZE
8558
+#   else /* no EXEC_PAGESIZE */
8559
+#    ifdef NBPG
8560
+#     define getpagesize() NBPG * CLSIZE
8561
+#     ifndef CLSIZE
8562
+#      define CLSIZE 1
8563
+#     endif /* no CLSIZE */
8564
+#    else /* no NBPG */
8565
+#     ifdef NBPC
8566
+#      define getpagesize() NBPC
8567
+#     else /* no NBPC */
8568
+#      ifdef PAGESIZE
8569
+#       define getpagesize() PAGESIZE
8570
+#      endif /* PAGESIZE */
8571
+#     endif /* no NBPC */
8572
+#    endif /* no NBPG */
8573
+#   endif /* no EXEC_PAGESIZE */
8574
+#  else /* no HAVE_SYS_PARAM_H */
8575
+#   define getpagesize() 8192	/* punt totally */
8576
+#  endif /* no HAVE_SYS_PARAM_H */
8577
+# endif /* no _SC_PAGESIZE */
8578
+
8579
+#endif /* no HAVE_GETPAGESIZE */
8580
+
8581
+int
8582
+main ()
8583
+{
8584
+  char *data, *data2, *data3;
8585
+  int i, pagesize;
8586
+  int fd;
8587
+
8588
+  pagesize = getpagesize ();
8589
+
8590
+  /* First, make a file with some known garbage in it. */
8591
+  data = (char *) malloc (pagesize);
8592
+  if (!data)
8593
+    exit (1);
8594
+  for (i = 0; i < pagesize; ++i)
8595
+    *(data + i) = rand ();
8596
+  umask (0);
8597
+  fd = creat ("conftest.mmap", 0600);
8598
+  if (fd < 0)
8599
+    exit (1);
8600
+  if (write (fd, data, pagesize) != pagesize)
8601
+    exit (1);
8602
+  close (fd);
8603
+
8604
+  /* Next, try to mmap the file at a fixed address which already has
8605
+     something else allocated at it.  If we can, also make sure that
8606
+     we see the same garbage.  */
8607
+  fd = open ("conftest.mmap", O_RDWR);
8608
+  if (fd < 0)
8609
+    exit (1);
8610
+  data2 = (char *) malloc (2 * pagesize);
8611
+  if (!data2)
8612
+    exit (1);
8613
+  data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
8614
+  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8615
+                     MAP_PRIVATE | MAP_FIXED, fd, 0L))
8616
+    exit (1);
8617
+  for (i = 0; i < pagesize; ++i)
8618
+    if (*(data + i) != *(data2 + i))
8619
+      exit (1);
8620
+
8621
+  /* Finally, make sure that changes to the mapped area do not
8622
+     percolate back to the file as seen by read().  (This is a bug on
8623
+     some variants of i386 svr4.0.)  */
8624
+  for (i = 0; i < pagesize; ++i)
8625
+    *(data2 + i) = *(data2 + i) + 1;
8626
+  data3 = (char *) malloc (pagesize);
8627
+  if (!data3)
8628
+    exit (1);
8629
+  if (read (fd, data3, pagesize) != pagesize)
8630
+    exit (1);
8631
+  for (i = 0; i < pagesize; ++i)
8632
+    if (*(data + i) != *(data3 + i))
8633
+      exit (1);
8634
+  close (fd);
8635
+  exit (0);
8636
+}
8637
+_ACEOF
8638
+rm -f conftest$ac_exeext
8639
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8640
+  (eval $ac_link) 2>&5
8641
+  ac_status=$?
8642
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8643
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8644
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8645
+  (eval $ac_try) 2>&5
8646
+  ac_status=$?
8647
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8648
+  (exit $ac_status); }; }; then
8649
+  ac_cv_func_mmap_fixed_mapped=yes
8650
+else
8651
+  echo "$as_me: program exited with status $ac_status" >&5
8652
+echo "$as_me: failed program was:" >&5
8653
+cat conftest.$ac_ext >&5
8654
+( exit $ac_status )
8655
+ac_cv_func_mmap_fixed_mapped=no
8656
+fi
8657
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8658
+fi
8659
+fi
8660
+echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
8661
+echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
8662
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
8663
+
8664
+cat >>confdefs.h <<\_ACEOF
8665
+#define HAVE_MMAP 1
8666
+_ACEOF
8667
+
8668
+fi
8669
+rm -f conftest.mmap
8670
+
8671
+
8310 8672
 # Check for broken snprintf
8311 8673
 if test "x$ac_cv_func_snprintf" = "xyes" ; then
8312 8674
         echo "$as_me:$LINENO: checking whether snprintf correctly terminates long strings" >&5
... ...
@@ -9402,262 +9764,6 @@ else
9402 9402
 fi
9403 9403
 
9404 9404
 
9405
-# tcpwrappers support
9406
-# rules from http://ma.ph-freiburg.de/tng/tng-technical/2002-01/msg00094.html
9407
-
9408
-# Check whether --with-tcpwrappers or --without-tcpwrappers was given.
9409
-if test "${with_tcpwrappers+set}" = set; then
9410
-  withval="$with_tcpwrappers"
9411
-   case "$withval" in
9412
-  yes|no) tcpw="$withval" ;;
9413
-  *)      { { echo "$as_me:$LINENO: error: --with-tcpwrappers does not take an argument" >&5
9414
-echo "$as_me: error: --with-tcpwrappers does not take an argument" >&2;}
9415
-   { (exit 1); exit 1; }; } ;;
9416
-  esac
9417
-else
9418
-   tcpw=auto
9419
-fi;
9420
-
9421
-if test $tcpw != no ; then
9422
-
9423
-for ac_header in tcpd.h
9424
-do
9425
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9426
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
9427
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
9428
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9429
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
9430
-  echo $ECHO_N "(cached) $ECHO_C" >&6
9431
-fi
9432
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9433
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9434
-else
9435
-  # Is the header compilable?
9436
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
9437
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9438
-cat >conftest.$ac_ext <<_ACEOF
9439
-#line $LINENO "configure"
9440
-#include "confdefs.h"
9441
-$ac_includes_default
9442
-#include <$ac_header>
9443
-_ACEOF
9444
-rm -f conftest.$ac_objext
9445
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9446
-  (eval $ac_compile) 2>&5
9447
-  ac_status=$?
9448
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9449
-  (exit $ac_status); } &&
9450
-         { ac_try='test -s conftest.$ac_objext'
9451
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9452
-  (eval $ac_try) 2>&5
9453
-  ac_status=$?
9454
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9455
-  (exit $ac_status); }; }; then
9456
-  ac_header_compiler=yes
9457
-else
9458
-  echo "$as_me: failed program was:" >&5
9459
-cat conftest.$ac_ext >&5
9460
-ac_header_compiler=no
9461
-fi
9462
-rm -f conftest.$ac_objext conftest.$ac_ext
9463
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9464
-echo "${ECHO_T}$ac_header_compiler" >&6
9465
-
9466
-# Is the header present?
9467
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
9468
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9469
-cat >conftest.$ac_ext <<_ACEOF
9470
-#line $LINENO "configure"
9471
-#include "confdefs.h"
9472
-#include <$ac_header>
9473
-_ACEOF
9474
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9475
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9476
-  ac_status=$?
9477
-  egrep -v '^ *\+' conftest.er1 >conftest.err
9478
-  rm -f conftest.er1
9479
-  cat conftest.err >&5
9480
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9481
-  (exit $ac_status); } >/dev/null; then
9482
-  if test -s conftest.err; then
9483
-    ac_cpp_err=$ac_c_preproc_warn_flag
9484
-  else
9485
-    ac_cpp_err=
9486
-  fi
9487
-else
9488
-  ac_cpp_err=yes
9489
-fi
9490
-if test -z "$ac_cpp_err"; then
9491
-  ac_header_preproc=yes
9492
-else
9493
-  echo "$as_me: failed program was:" >&5
9494
-  cat conftest.$ac_ext >&5
9495
-  ac_header_preproc=no
9496
-fi
9497
-rm -f conftest.err conftest.$ac_ext
9498
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9499
-echo "${ECHO_T}$ac_header_preproc" >&6
9500
-
9501
-# So?  What about this header?
9502
-case $ac_header_compiler:$ac_header_preproc in
9503
-  yes:no )
9504
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9505
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9506
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9507
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
9508
-  no:yes )
9509
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9510
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9511
-    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9512
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9513
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9514
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
9515
-esac
9516
-echo "$as_me:$LINENO: checking for $ac_header" >&5
9517
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9518
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
9519
-  echo $ECHO_N "(cached) $ECHO_C" >&6
9520
-else
9521
-  eval "$as_ac_Header=$ac_header_preproc"
9522
-fi
9523
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9524
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9525
-
9526
-fi
9527
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
9528
-  cat >>confdefs.h <<_ACEOF
9529
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9530
-_ACEOF
9531
-
9532
-                echo "$as_me:$LINENO: checking for TCP wrappers library" >&5
9533
-echo $ECHO_N "checking for TCP wrappers library... $ECHO_C" >&6
9534
-                save_LIBS="$LIBS"
9535
-                LIBS="$LIBS -lwrap"
9536
-                cat >conftest.$ac_ext <<_ACEOF
9537
-#line $LINENO "configure"
9538
-#include "confdefs.h"
9539
-
9540
-#include <tcpd.h>
9541
-int allow_severity = 0;
9542
-int deny_severity  = 0;
9543
-
9544
-struct request_info *req;
9545
-
9546
-#ifdef F77_DUMMY_MAIN
9547
-#  ifdef __cplusplus
9548
-     extern "C"
9549
-#  endif
9550
-   int F77_DUMMY_MAIN() { return 1; }
9551
-#endif
9552
-int
9553
-main ()
9554
-{
9555
-
9556
-hosts_access(req)
9557
-
9558
-  ;
9559
-  return 0;
9560
-}
9561
-_ACEOF
9562
-rm -f conftest.$ac_objext conftest$ac_exeext
9563
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9564
-  (eval $ac_link) 2>&5
9565
-  ac_status=$?
9566
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9567
-  (exit $ac_status); } &&
9568
-         { ac_try='test -s conftest$ac_exeext'
9569
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9570
-  (eval $ac_try) 2>&5
9571
-  ac_status=$?
9572
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9573
-  (exit $ac_status); }; }; then
9574
-  echo "$as_me:$LINENO: result: -lwrap" >&5
9575
-echo "${ECHO_T}-lwrap" >&6
9576
-                have_wrappers=yes
9577
-		LIBS="$save_LIBS"
9578
-                CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lwrap"
9579
-else
9580
-  echo "$as_me: failed program was:" >&5
9581
-cat conftest.$ac_ext >&5
9582
-
9583
-                                LIBS="$LIBS -lnsl"
9584
-                cat >conftest.$ac_ext <<_ACEOF
9585
-#line $LINENO "configure"
9586
-#include "confdefs.h"
9587
-
9588
-#include <tcpd.h>
9589
-int allow_severity = 0;
9590
-int deny_severity  = 0;
9591
-
9592
-struct request_info *req;
9593
-
9594
-#ifdef F77_DUMMY_MAIN
9595
-#  ifdef __cplusplus
9596
-     extern "C"
9597
-#  endif
9598
-   int F77_DUMMY_MAIN() { return 1; }
9599
-#endif
9600
-int
9601
-main ()
9602
-{
9603
-
9604
-hosts_access(req)
9605
-
9606
-  ;
9607
-  return 0;
9608
-}
9609
-_ACEOF
9610
-rm -f conftest.$ac_objext conftest$ac_exeext
9611
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9612
-  (eval $ac_link) 2>&5
9613
-  ac_status=$?
9614
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9615
-  (exit $ac_status); } &&
9616
-         { ac_try='test -s conftest$ac_exeext'
9617
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9618
-  (eval $ac_try) 2>&5
9619
-  ac_status=$?
9620
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9621
-  (exit $ac_status); }; }; then
9622
-  echo "$as_me:$LINENO: result: -lwrap -lnsl" >&5
9623
-echo "${ECHO_T}-lwrap -lnsl" >&6
9624
-                have_wrappers=yes
9625
-                CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lwrap"
9626
-else
9627
-  echo "$as_me: failed program was:" >&5
9628
-cat conftest.$ac_ext >&5
9629
-
9630
-                echo "$as_me:$LINENO: result: no" >&5
9631
-echo "${ECHO_T}no" >&6
9632
-                have_wrappers=no
9633
-                LIBS=$save_LIBS
9634
-fi
9635
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9636
-fi
9637
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9638
-else
9639
-  have_wrappers=no
9640
-fi
9641
-
9642
-done
9643
-
9644
-
9645
-        if test $have_wrappers = yes ; then
9646
-
9647
-cat >>confdefs.h <<\_ACEOF
9648
-#define WITH_TCPWRAP 1
9649
-_ACEOF
9650
-
9651
-        elif test $tcpw = yes ; then
9652
-                { { echo "$as_me:$LINENO: error: could not find TCP wrappers" >&5
9653
-echo "$as_me: error: could not find TCP wrappers" >&2;}
9654
-   { (exit 1); exit 1; }; }
9655
-        else
9656
-                { echo "$as_me:$LINENO: WARNING: could not find TCP wrappers, support disabled" >&5
9657
-echo "$as_me: WARNING: could not find TCP wrappers, support disabled" >&2;}
9658
-        fi
9659
-fi
9660
-
9661 9405
 # check for in_port_t definition
9662 9406
 if test "$cross_compiling" = yes; then
9663 9407
   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
... ...
@@ -10081,6 +10187,262 @@ fi
10081 10081
 
10082 10082
 fi
10083 10083
 
10084
+# tcpwrappers support
10085
+# rules from http://ma.ph-freiburg.de/tng/tng-technical/2002-01/msg00094.html
10086
+
10087
+# Check whether --with-tcpwrappers or --without-tcpwrappers was given.
10088
+if test "${with_tcpwrappers+set}" = set; then
10089
+  withval="$with_tcpwrappers"
10090
+   case "$withval" in
10091
+  yes|no) tcpw="$withval" ;;
10092
+  *)      { { echo "$as_me:$LINENO: error: --with-tcpwrappers does not take an argument" >&5
10093
+echo "$as_me: error: --with-tcpwrappers does not take an argument" >&2;}
10094
+   { (exit 1); exit 1; }; } ;;
10095
+  esac
10096
+else
10097
+   tcpw=auto
10098
+fi;
10099
+
10100
+if test "$tcpw" != "no" && test "$have_milter" = "yes" ; then
10101
+
10102
+for ac_header in tcpd.h
10103
+do
10104
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10105
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
10106
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
10107
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10108
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
10109
+  echo $ECHO_N "(cached) $ECHO_C" >&6
10110
+fi
10111
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10112
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10113
+else
10114
+  # Is the header compilable?
10115
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
10116
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10117
+cat >conftest.$ac_ext <<_ACEOF
10118
+#line $LINENO "configure"
10119
+#include "confdefs.h"
10120
+$ac_includes_default
10121
+#include <$ac_header>
10122
+_ACEOF
10123
+rm -f conftest.$ac_objext
10124
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10125
+  (eval $ac_compile) 2>&5
10126
+  ac_status=$?
10127
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10128
+  (exit $ac_status); } &&
10129
+         { ac_try='test -s conftest.$ac_objext'
10130
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10131
+  (eval $ac_try) 2>&5
10132
+  ac_status=$?
10133
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10134
+  (exit $ac_status); }; }; then
10135
+  ac_header_compiler=yes
10136
+else
10137
+  echo "$as_me: failed program was:" >&5
10138
+cat conftest.$ac_ext >&5
10139
+ac_header_compiler=no
10140
+fi
10141
+rm -f conftest.$ac_objext conftest.$ac_ext
10142
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10143
+echo "${ECHO_T}$ac_header_compiler" >&6
10144
+
10145
+# Is the header present?
10146
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
10147
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10148
+cat >conftest.$ac_ext <<_ACEOF
10149
+#line $LINENO "configure"
10150
+#include "confdefs.h"
10151
+#include <$ac_header>
10152
+_ACEOF
10153
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10154
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10155
+  ac_status=$?
10156
+  egrep -v '^ *\+' conftest.er1 >conftest.err
10157
+  rm -f conftest.er1
10158
+  cat conftest.err >&5
10159
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10160
+  (exit $ac_status); } >/dev/null; then
10161
+  if test -s conftest.err; then
10162
+    ac_cpp_err=$ac_c_preproc_warn_flag
10163
+  else
10164
+    ac_cpp_err=
10165
+  fi
10166
+else
10167
+  ac_cpp_err=yes
10168
+fi
10169
+if test -z "$ac_cpp_err"; then
10170
+  ac_header_preproc=yes
10171
+else
10172
+  echo "$as_me: failed program was:" >&5
10173
+  cat conftest.$ac_ext >&5
10174
+  ac_header_preproc=no
10175
+fi
10176
+rm -f conftest.err conftest.$ac_ext
10177
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10178
+echo "${ECHO_T}$ac_header_preproc" >&6
10179
+
10180
+# So?  What about this header?
10181
+case $ac_header_compiler:$ac_header_preproc in
10182
+  yes:no )
10183
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10184
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10185
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10186
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
10187
+  no:yes )
10188
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10189
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10190
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10191
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10192
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10193
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
10194
+esac
10195
+echo "$as_me:$LINENO: checking for $ac_header" >&5
10196
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10197
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
10198
+  echo $ECHO_N "(cached) $ECHO_C" >&6
10199
+else
10200
+  eval "$as_ac_Header=$ac_header_preproc"
10201
+fi
10202
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10203
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10204
+
10205
+fi
10206
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
10207
+  cat >>confdefs.h <<_ACEOF
10208
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10209
+_ACEOF
10210
+
10211
+                echo "$as_me:$LINENO: checking for TCP wrappers library" >&5
10212
+echo $ECHO_N "checking for TCP wrappers library... $ECHO_C" >&6
10213
+                save_LIBS="$LIBS"
10214
+                LIBS="$LIBS -lwrap $FRESHCLAM_LIBS"
10215
+                cat >conftest.$ac_ext <<_ACEOF
10216
+#line $LINENO "configure"
10217
+#include "confdefs.h"
10218
+
10219
+#include <tcpd.h>
10220
+int allow_severity = 0;
10221
+int deny_severity  = 0;
10222
+
10223
+struct request_info *req;
10224
+
10225
+#ifdef F77_DUMMY_MAIN
10226
+#  ifdef __cplusplus
10227
+     extern "C"
10228
+#  endif
10229
+   int F77_DUMMY_MAIN() { return 1; }
10230
+#endif
10231
+int
10232
+main ()
10233
+{
10234
+
10235
+hosts_access(req)
10236
+
10237
+  ;
10238
+  return 0;
10239
+}
10240
+_ACEOF
10241
+rm -f conftest.$ac_objext conftest$ac_exeext
10242
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10243
+  (eval $ac_link) 2>&5
10244
+  ac_status=$?
10245
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10246
+  (exit $ac_status); } &&
10247
+         { ac_try='test -s conftest$ac_exeext'
10248
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10249
+  (eval $ac_try) 2>&5
10250
+  ac_status=$?
10251
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10252
+  (exit $ac_status); }; }; then
10253
+  echo "$as_me:$LINENO: result: -lwrap" >&5
10254
+echo "${ECHO_T}-lwrap" >&6
10255
+                have_wrappers=yes
10256
+		LIBS="$save_LIBS"
10257
+                CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lwrap"
10258
+else
10259
+  echo "$as_me: failed program was:" >&5
10260
+cat conftest.$ac_ext >&5
10261
+
10262
+                                LIBS="$LIBS -lnsl $FRESHCLAM_LIBS"
10263
+                cat >conftest.$ac_ext <<_ACEOF
10264
+#line $LINENO "configure"
10265
+#include "confdefs.h"
10266
+
10267
+#include <tcpd.h>
10268
+int allow_severity = 0;
10269
+int deny_severity  = 0;
10270
+
10271
+struct request_info *req;
10272
+
10273
+#ifdef F77_DUMMY_MAIN
10274
+#  ifdef __cplusplus
10275
+     extern "C"
10276
+#  endif
10277
+   int F77_DUMMY_MAIN() { return 1; }
10278
+#endif
10279
+int
10280
+main ()
10281
+{
10282
+
10283
+hosts_access(req)
10284
+
10285
+  ;
10286
+  return 0;
10287
+}
10288
+_ACEOF
10289
+rm -f conftest.$ac_objext conftest$ac_exeext
10290
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10291
+  (eval $ac_link) 2>&5
10292
+  ac_status=$?
10293
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10294
+  (exit $ac_status); } &&
10295
+         { ac_try='test -s conftest$ac_exeext'
10296
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10297
+  (eval $ac_try) 2>&5
10298
+  ac_status=$?
10299
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10300
+  (exit $ac_status); }; }; then
10301
+  echo "$as_me:$LINENO: result: -lwrap -lnsl" >&5
10302
+echo "${ECHO_T}-lwrap -lnsl" >&6
10303
+                have_wrappers=yes
10304
+                CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lwrap"
10305
+else
10306
+  echo "$as_me: failed program was:" >&5
10307
+cat conftest.$ac_ext >&5
10308
+
10309
+                echo "$as_me:$LINENO: result: no" >&5
10310
+echo "${ECHO_T}no" >&6
10311
+                have_wrappers=no
10312
+                LIBS=$save_LIBS
10313
+fi
10314
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10315
+fi
10316
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10317
+else
10318
+  have_wrappers=no
10319
+fi
10320
+
10321
+done
10322
+
10323
+
10324
+        if test $have_wrappers = yes ; then
10325
+
10326
+cat >>confdefs.h <<\_ACEOF
10327
+#define WITH_TCPWRAP 1
10328
+_ACEOF
10329
+
10330
+        elif test $tcpw = yes ; then
10331
+                { { echo "$as_me:$LINENO: error: could not find TCP wrappers" >&5
10332
+echo "$as_me: error: could not find TCP wrappers" >&2;}
10333
+   { (exit 1); exit 1; }; }
10334
+        else
10335
+                { echo "$as_me:$LINENO: WARNING: could not find TCP wrappers, support disabled" >&5
10336
+echo "$as_me: WARNING: could not find TCP wrappers, support disabled" >&2;}
10337
+        fi
10338
+fi
10339
+
10084 10340
 
10085 10341
 if test "$test_clamav" = "yes"
10086 10342
 then
... ...
@@ -43,6 +43,7 @@ AC_COMPILE_CHECK_SIZEOF(short)
43 43
 AC_COMPILE_CHECK_SIZEOF(int)
44 44
 AC_COMPILE_CHECK_SIZEOF(long)
45 45
 AC_CHECK_FUNCS(poll setsid memcpy snprintf vsnprintf strerror_r strlcpy strlcat inet_ntop)
46
+AC_FUNC_MMAP
46 47
 
47 48
 # Check for broken snprintf
48 49
 if test "x$ac_cv_func_snprintf" = "xyes" ; then
... ...
@@ -197,60 +198,6 @@ dnl Do not overwrite current config files
197 197
 AM_CONDITIONAL(INSTALL_CLAMAV_CONF, test ! -r "$cfg_dir/clamav.conf")
198 198
 AM_CONDITIONAL(INSTALL_FRESHCLAM_CONF, test ! -r "$cfg_dir/freshclam.conf")
199 199
 
200
-# tcpwrappers support
201
-# rules from http://ma.ph-freiburg.de/tng/tng-technical/2002-01/msg00094.html
202
-AC_ARG_WITH(tcpwrappers,
203
-[  --with-tcpwrappers      Support hosts.allow / hosts.deny (default=auto)],
204
-[ case "$withval" in
205
-  yes|no) tcpw="$withval" ;;
206
-  *)      AC_MSG_ERROR([--with-tcpwrappers does not take an argument]) ;;
207
-  esac],
208
-[ tcpw=auto ])
209
-
210
-if test $tcpw != no ; then
211
-        AC_CHECK_HEADERS(tcpd.h,[
212
-                AC_MSG_CHECKING([for TCP wrappers library])
213
-                save_LIBS="$LIBS"
214
-                LIBS="$LIBS -lwrap"
215
-                AC_TRY_LINK([
216
-#include <tcpd.h>
217
-int allow_severity = 0;
218
-int deny_severity  = 0;
219
-
220
-struct request_info *req;
221
-                ],[
222
-hosts_access(req)
223
-                ],[AC_MSG_RESULT([-lwrap])
224
-                have_wrappers=yes
225
-		LIBS="$save_LIBS"
226
-                CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lwrap"],[
227
-                dnl try with -lnsl
228
-                LIBS="$LIBS -lnsl"
229
-                AC_TRY_LINK([
230
-#include <tcpd.h>
231
-int allow_severity = 0;
232
-int deny_severity  = 0;
233
-
234
-struct request_info *req;
235
-                ],[
236
-hosts_access(req)
237
-                ],[AC_MSG_RESULT([-lwrap -lnsl])
238
-                have_wrappers=yes
239
-                CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lwrap"],[
240
-                AC_MSG_RESULT(no)
241
-                have_wrappers=no
242
-                LIBS=$save_LIBS])],[
243
-                have_wrappers=no])],[have_wrappers=no])
244
-
245
-        if test $have_wrappers = yes ; then
246
-                AC_DEFINE(WITH_TCPWRAP,1, [tcpwrappers support])
247
-        elif test $tcpw = yes ; then
248
-                AC_MSG_ERROR([could not find TCP wrappers])
249
-        else
250
-                AC_MSG_WARN([could not find TCP wrappers, support disabled])
251
-        fi
252
-fi
253
-
254 200
 # check for in_port_t definition
255 201
 AC_TRY_RUN([
256 202
 #include <sys/types.h>
... ...
@@ -433,6 +380,60 @@ then
433 433
     AC_PATH_PROG(SENDMAIL, sendmail, /usr/lib/sendmail, $PATH:/usr/lib:/usr/sbin:/etc:/usr/local/lib:/usr/local/sbin:/usr/bin:/usr/local/bin)
434 434
 fi
435 435
 
436
+# tcpwrappers support
437
+# rules from http://ma.ph-freiburg.de/tng/tng-technical/2002-01/msg00094.html
438
+AC_ARG_WITH(tcpwrappers,
439
+[  --with-tcpwrappers      Support hosts.allow / hosts.deny (default=auto)],
440
+[ case "$withval" in
441
+  yes|no) tcpw="$withval" ;;
442
+  *)      AC_MSG_ERROR([--with-tcpwrappers does not take an argument]) ;;
443
+  esac],
444
+[ tcpw=auto ])
445
+
446
+if test "$tcpw" != "no" && test "$have_milter" = "yes" ; then
447
+        AC_CHECK_HEADERS(tcpd.h,[
448
+                AC_MSG_CHECKING([for TCP wrappers library])
449
+                save_LIBS="$LIBS"
450
+                LIBS="$LIBS -lwrap $FRESHCLAM_LIBS"
451
+                AC_TRY_LINK([
452
+#include <tcpd.h>
453
+int allow_severity = 0;
454
+int deny_severity  = 0;
455
+
456
+struct request_info *req;
457
+                ],[
458
+hosts_access(req)
459
+                ],[AC_MSG_RESULT([-lwrap])
460
+                have_wrappers=yes
461
+		LIBS="$save_LIBS"
462
+                CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lwrap"],[
463
+                dnl try with -lnsl
464
+                LIBS="$LIBS -lnsl $FRESHCLAM_LIBS"
465
+                AC_TRY_LINK([
466
+#include <tcpd.h>
467
+int allow_severity = 0;
468
+int deny_severity  = 0;
469
+
470
+struct request_info *req;
471
+                ],[
472
+hosts_access(req)
473
+                ],[AC_MSG_RESULT([-lwrap -lnsl])
474
+                have_wrappers=yes
475
+                CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lwrap"],[
476
+                AC_MSG_RESULT(no)
477
+                have_wrappers=no
478
+                LIBS=$save_LIBS])],[
479
+                have_wrappers=no])],[have_wrappers=no])
480
+
481
+        if test $have_wrappers = yes ; then
482
+                AC_DEFINE(WITH_TCPWRAP,1, [tcpwrappers support])
483
+        elif test $tcpw = yes ; then
484
+                AC_MSG_ERROR([could not find TCP wrappers])
485
+        else
486
+                AC_MSG_WARN([could not find TCP wrappers, support disabled])
487
+        fi
488
+fi
489
+
436 490
 dnl Check for clamav in /etc/passwd
437 491
 
438 492
 if test "$test_clamav" = "yes"