git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@961 77e5149b-7576-45b1-b177-96237e5ba77b
Tomasz Kojm authored on 2004/10/03 06:09:13... | ... |
@@ -1,3 +1,9 @@ |
1 |
+Sat Oct 2 23:02:39 CEST 2004 (tk) |
|
2 |
+---------------------------------- |
|
3 |
+ * configure: improve config file installation (patch by Andrey J. Melnikoff |
|
4 |
+ (TEMHOTA) <temnota*kmv.ru>) |
|
5 |
+ * sigtool: fix --unpack/--unpack-current problem on Cygwin and FreeBSD |
|
6 |
+ |
|
1 | 7 |
Sat Oct 2 18:52:32 BST 2004 (njh) |
2 | 8 |
---------------------------------- |
3 | 9 |
* clamav-milter: Fix crash if %h is used in a template and --headers is |
... | ... |
@@ -139,11 +139,7 @@ FRESHCLAM_LIBS = @FRESHCLAM_LIBS@ |
139 | 139 |
GETENT = @GETENT@ |
140 | 140 |
HAVE_MILTER_FALSE = @HAVE_MILTER_FALSE@ |
141 | 141 |
HAVE_MILTER_TRUE = @HAVE_MILTER_TRUE@ |
142 |
-INSTALL_CLAMD_CONF_FALSE = @INSTALL_CLAMD_CONF_FALSE@ |
|
143 |
-INSTALL_CLAMD_CONF_TRUE = @INSTALL_CLAMD_CONF_TRUE@ |
|
144 | 142 |
INSTALL_DATA = @INSTALL_DATA@ |
145 |
-INSTALL_FRESHCLAM_CONF_FALSE = @INSTALL_FRESHCLAM_CONF_FALSE@ |
|
146 |
-INSTALL_FRESHCLAM_CONF_TRUE = @INSTALL_FRESHCLAM_CONF_TRUE@ |
|
147 | 143 |
INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
148 | 144 |
INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
149 | 145 |
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ |
... | ... |
@@ -139,11 +139,7 @@ FRESHCLAM_LIBS = @FRESHCLAM_LIBS@ |
139 | 139 |
GETENT = @GETENT@ |
140 | 140 |
HAVE_MILTER_FALSE = @HAVE_MILTER_FALSE@ |
141 | 141 |
HAVE_MILTER_TRUE = @HAVE_MILTER_TRUE@ |
142 |
-INSTALL_CLAMD_CONF_FALSE = @INSTALL_CLAMD_CONF_FALSE@ |
|
143 |
-INSTALL_CLAMD_CONF_TRUE = @INSTALL_CLAMD_CONF_TRUE@ |
|
144 | 142 |
INSTALL_DATA = @INSTALL_DATA@ |
145 |
-INSTALL_FRESHCLAM_CONF_FALSE = @INSTALL_FRESHCLAM_CONF_FALSE@ |
|
146 |
-INSTALL_FRESHCLAM_CONF_TRUE = @INSTALL_FRESHCLAM_CONF_TRUE@ |
|
147 | 143 |
INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
148 | 144 |
INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
149 | 145 |
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ |
... | ... |
@@ -154,11 +154,7 @@ FRESHCLAM_LIBS = @FRESHCLAM_LIBS@ |
154 | 154 |
GETENT = @GETENT@ |
155 | 155 |
HAVE_MILTER_FALSE = @HAVE_MILTER_FALSE@ |
156 | 156 |
HAVE_MILTER_TRUE = @HAVE_MILTER_TRUE@ |
157 |
-INSTALL_CLAMD_CONF_FALSE = @INSTALL_CLAMD_CONF_FALSE@ |
|
158 |
-INSTALL_CLAMD_CONF_TRUE = @INSTALL_CLAMD_CONF_TRUE@ |
|
159 | 157 |
INSTALL_DATA = @INSTALL_DATA@ |
160 |
-INSTALL_FRESHCLAM_CONF_FALSE = @INSTALL_FRESHCLAM_CONF_FALSE@ |
|
161 |
-INSTALL_FRESHCLAM_CONF_TRUE = @INSTALL_FRESHCLAM_CONF_TRUE@ |
|
162 | 158 |
INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
163 | 159 |
INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
164 | 160 |
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ |
... | ... |
@@ -139,11 +139,7 @@ FRESHCLAM_LIBS = @FRESHCLAM_LIBS@ |
139 | 139 |
GETENT = @GETENT@ |
140 | 140 |
HAVE_MILTER_FALSE = @HAVE_MILTER_FALSE@ |
141 | 141 |
HAVE_MILTER_TRUE = @HAVE_MILTER_TRUE@ |
142 |
-INSTALL_CLAMD_CONF_FALSE = @INSTALL_CLAMD_CONF_FALSE@ |
|
143 |
-INSTALL_CLAMD_CONF_TRUE = @INSTALL_CLAMD_CONF_TRUE@ |
|
144 | 142 |
INSTALL_DATA = @INSTALL_DATA@ |
145 |
-INSTALL_FRESHCLAM_CONF_FALSE = @INSTALL_FRESHCLAM_CONF_FALSE@ |
|
146 |
-INSTALL_FRESHCLAM_CONF_TRUE = @INSTALL_FRESHCLAM_CONF_TRUE@ |
|
147 | 143 |
INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
148 | 144 |
INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
149 | 145 |
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ |
... | ... |
@@ -134,11 +134,7 @@ FRESHCLAM_LIBS = @FRESHCLAM_LIBS@ |
134 | 134 |
GETENT = @GETENT@ |
135 | 135 |
HAVE_MILTER_FALSE = @HAVE_MILTER_FALSE@ |
136 | 136 |
HAVE_MILTER_TRUE = @HAVE_MILTER_TRUE@ |
137 |
-INSTALL_CLAMD_CONF_FALSE = @INSTALL_CLAMD_CONF_FALSE@ |
|
138 |
-INSTALL_CLAMD_CONF_TRUE = @INSTALL_CLAMD_CONF_TRUE@ |
|
139 | 137 |
INSTALL_DATA = @INSTALL_DATA@ |
140 |
-INSTALL_FRESHCLAM_CONF_FALSE = @INSTALL_FRESHCLAM_CONF_FALSE@ |
|
141 |
-INSTALL_FRESHCLAM_CONF_TRUE = @INSTALL_FRESHCLAM_CONF_TRUE@ |
|
142 | 138 |
INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
143 | 139 |
INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
144 | 140 |
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ |
... | ... |
@@ -468,7 +468,7 @@ ac_includes_default="\ |
468 | 468 |
# include <unistd.h> |
469 | 469 |
#endif" |
470 | 470 |
|
471 |
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot LIBCLAMAV_VERSION CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S ECHO RANLIB ac_ct_RANLIB CPP EGREP LIBTOOL DBDIR CFGDIR INSTALL_CLAMD_CONF_TRUE INSTALL_CLAMD_CONF_FALSE INSTALL_FRESHCLAM_CONF_TRUE INSTALL_FRESHCLAM_CONF_FALSE LIBCLAMAV_LIBS CLAMD_LIBS CLAMAV_MILTER_LIBS FRESHCLAM_LIBS TH_SAFE ADDITIONAL_LIBS BUILD_CLAMD_TRUE BUILD_CLAMD_FALSE HAVE_MILTER_TRUE HAVE_MILTER_FALSE SENDMAIL GETENT CLAMAVUSER CLAMAVGROUP LIBOBJS LTLIBOBJS' |
|
471 |
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot LIBCLAMAV_VERSION CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S ECHO RANLIB ac_ct_RANLIB CPP EGREP LIBTOOL DBDIR CFGDIR LIBCLAMAV_LIBS CLAMD_LIBS CLAMAV_MILTER_LIBS FRESHCLAM_LIBS TH_SAFE ADDITIONAL_LIBS BUILD_CLAMD_TRUE BUILD_CLAMD_FALSE HAVE_MILTER_TRUE HAVE_MILTER_FALSE SENDMAIL GETENT CLAMAVUSER CLAMAVGROUP LIBOBJS LTLIBOBJS' |
|
472 | 472 |
ac_subst_files='' |
473 | 473 |
|
474 | 474 |
# Initialize some variables set by options. |
... | ... |
@@ -11269,27 +11269,6 @@ cat >>confdefs.h <<_ACEOF |
11269 | 11269 |
_ACEOF |
11270 | 11270 |
|
11271 | 11271 |
|
11272 |
- |
|
11273 |
- |
|
11274 |
-if test ! -r "$cfg_dir/clamd.conf"; then |
|
11275 |
- INSTALL_CLAMD_CONF_TRUE= |
|
11276 |
- INSTALL_CLAMD_CONF_FALSE='#' |
|
11277 |
-else |
|
11278 |
- INSTALL_CLAMD_CONF_TRUE='#' |
|
11279 |
- INSTALL_CLAMD_CONF_FALSE= |
|
11280 |
-fi |
|
11281 |
- |
|
11282 |
- |
|
11283 |
- |
|
11284 |
-if test ! -r "$cfg_dir/freshclam.conf"; then |
|
11285 |
- INSTALL_FRESHCLAM_CONF_TRUE= |
|
11286 |
- INSTALL_FRESHCLAM_CONF_FALSE='#' |
|
11287 |
-else |
|
11288 |
- INSTALL_FRESHCLAM_CONF_TRUE='#' |
|
11289 |
- INSTALL_FRESHCLAM_CONF_FALSE= |
|
11290 |
-fi |
|
11291 |
- |
|
11292 |
- |
|
11293 | 11272 |
if test "$cross_compiling" = yes; then |
11294 | 11273 |
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
11295 | 11274 |
See \`config.log' for more details." >&5 |
... | ... |
@@ -11495,6 +11474,7 @@ cat >>confdefs.h <<\_ACEOF |
11495 | 11495 |
#define C_BSD 1 |
11496 | 11496 |
_ACEOF |
11497 | 11497 |
|
11498 |
+ bad_gethostbyname_r="yes" |
|
11498 | 11499 |
;; |
11499 | 11500 |
openbsd3.3*) |
11500 | 11501 |
if test "$have_pthreads" = "yes"; then |
... | ... |
@@ -11520,6 +11500,7 @@ cat >>confdefs.h <<\_ACEOF |
11520 | 11520 |
#define C_BSD 1 |
11521 | 11521 |
_ACEOF |
11522 | 11522 |
|
11523 |
+ bad_gethostbyname_r="yes" |
|
11523 | 11524 |
;; |
11524 | 11525 |
openbsd*) |
11525 | 11526 |
if test "$have_pthreads" = "yes"; then |
... | ... |
@@ -11548,6 +11529,7 @@ cat >>confdefs.h <<\_ACEOF |
11548 | 11548 |
#define C_BSD 1 |
11549 | 11549 |
_ACEOF |
11550 | 11550 |
|
11551 |
+ bad_gethostbyname_r="yes" |
|
11551 | 11552 |
;; |
11552 | 11553 |
netbsd*) |
11553 | 11554 |
if test "$have_pthreads" = "yes"; then |
... | ... |
@@ -11571,6 +11553,7 @@ cat >>confdefs.h <<\_ACEOF |
11571 | 11571 |
#define C_BSD 1 |
11572 | 11572 |
_ACEOF |
11573 | 11573 |
|
11574 |
+ bad_gethostbyname_r="yes" |
|
11574 | 11575 |
;; |
11575 | 11576 |
bsd*) |
11576 | 11577 |
echo "$as_me:$LINENO: result: Unknown BSD detected. Disabling thread support." >&5 |
... | ... |
@@ -11581,6 +11564,7 @@ cat >>confdefs.h <<\_ACEOF |
11581 | 11581 |
#define C_BSD 1 |
11582 | 11582 |
_ACEOF |
11583 | 11583 |
|
11584 |
+ bad_gethostbyname_r="yes" |
|
11584 | 11585 |
;; |
11585 | 11586 |
beos*) |
11586 | 11587 |
echo "$as_me:$LINENO: result: BeOS detected. Disabling thread support." >&5 |
... | ... |
@@ -11609,6 +11593,7 @@ cat >>confdefs.h <<\_ACEOF |
11609 | 11609 |
_ACEOF |
11610 | 11610 |
|
11611 | 11611 |
use_netinfo="yes" |
11612 |
+ bad_gethostbyname_r="yes" |
|
11612 | 11613 |
;; |
11613 | 11614 |
sco*) |
11614 | 11615 |
;; |
... | ... |
@@ -12707,7 +12692,7 @@ if test "${enable_gethostbyname_r+set}" = set; then |
12707 | 12707 |
ac_cv_gethostbyname_args="" |
12708 | 12708 |
fi; |
12709 | 12709 |
|
12710 |
-if test -z "$ac_cv_gethostbyname_args"; then |
|
12710 |
+if test -z "$ac_cv_gethostbyname_args" || test "$bad_gethostbyname_r" = "yes"; then |
|
12711 | 12711 |
echo "$as_me:$LINENO: result: no" >&5 |
12712 | 12712 |
echo "${ECHO_T}no" >&6 |
12713 | 12713 |
else |
... | ... |
@@ -13619,20 +13604,6 @@ echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. |
13619 | 13619 |
Usually this means the macro was only invoked conditionally." >&2;} |
13620 | 13620 |
{ (exit 1); exit 1; }; } |
13621 | 13621 |
fi |
13622 |
-if test -z "${INSTALL_CLAMD_CONF_TRUE}" && test -z "${INSTALL_CLAMD_CONF_FALSE}"; then |
|
13623 |
- { { echo "$as_me:$LINENO: error: conditional \"INSTALL_CLAMD_CONF\" was never defined. |
|
13624 |
-Usually this means the macro was only invoked conditionally." >&5 |
|
13625 |
-echo "$as_me: error: conditional \"INSTALL_CLAMD_CONF\" was never defined. |
|
13626 |
-Usually this means the macro was only invoked conditionally." >&2;} |
|
13627 |
- { (exit 1); exit 1; }; } |
|
13628 |
-fi |
|
13629 |
-if test -z "${INSTALL_FRESHCLAM_CONF_TRUE}" && test -z "${INSTALL_FRESHCLAM_CONF_FALSE}"; then |
|
13630 |
- { { echo "$as_me:$LINENO: error: conditional \"INSTALL_FRESHCLAM_CONF\" was never defined. |
|
13631 |
-Usually this means the macro was only invoked conditionally." >&5 |
|
13632 |
-echo "$as_me: error: conditional \"INSTALL_FRESHCLAM_CONF\" was never defined. |
|
13633 |
-Usually this means the macro was only invoked conditionally." >&2;} |
|
13634 |
- { (exit 1); exit 1; }; } |
|
13635 |
-fi |
|
13636 | 13622 |
if test -z "${BUILD_CLAMD_TRUE}" && test -z "${BUILD_CLAMD_FALSE}"; then |
13637 | 13623 |
{ { echo "$as_me:$LINENO: error: conditional \"BUILD_CLAMD\" was never defined. |
13638 | 13624 |
Usually this means the macro was only invoked conditionally." >&5 |
... | ... |
@@ -14253,10 +14224,6 @@ s,@EGREP@,$EGREP,;t t |
14253 | 14253 |
s,@LIBTOOL@,$LIBTOOL,;t t |
14254 | 14254 |
s,@DBDIR@,$DBDIR,;t t |
14255 | 14255 |
s,@CFGDIR@,$CFGDIR,;t t |
14256 |
-s,@INSTALL_CLAMD_CONF_TRUE@,$INSTALL_CLAMD_CONF_TRUE,;t t |
|
14257 |
-s,@INSTALL_CLAMD_CONF_FALSE@,$INSTALL_CLAMD_CONF_FALSE,;t t |
|
14258 |
-s,@INSTALL_FRESHCLAM_CONF_TRUE@,$INSTALL_FRESHCLAM_CONF_TRUE,;t t |
|
14259 |
-s,@INSTALL_FRESHCLAM_CONF_FALSE@,$INSTALL_FRESHCLAM_CONF_FALSE,;t t |
|
14260 | 14256 |
s,@LIBCLAMAV_LIBS@,$LIBCLAMAV_LIBS,;t t |
14261 | 14257 |
s,@CLAMD_LIBS@,$CLAMD_LIBS,;t t |
14262 | 14258 |
s,@CLAMAV_MILTER_LIBS@,$CLAMAV_MILTER_LIBS,;t t |
... | ... |
@@ -227,10 +227,6 @@ CFGDIR=$cfg_dir |
227 | 227 |
AC_SUBST(CFGDIR) |
228 | 228 |
AC_DEFINE_UNQUOTED(CONFDIR,"$cfg_dir",[where to look for the config file]) |
229 | 229 |
|
230 |
-dnl Do not overwrite current config files |
|
231 |
-AM_CONDITIONAL(INSTALL_CLAMD_CONF, test ! -r "$cfg_dir/clamd.conf") |
|
232 |
-AM_CONDITIONAL(INSTALL_FRESHCLAM_CONF, test ! -r "$cfg_dir/freshclam.conf") |
|
233 |
- |
|
234 | 230 |
dnl check for in_port_t definition |
235 | 231 |
AC_TRY_RUN([ |
236 | 232 |
#include <sys/types.h> |
... | ... |
@@ -300,6 +296,7 @@ freebsd*) |
300 | 300 |
fi |
301 | 301 |
fi |
302 | 302 |
AC_DEFINE(C_BSD,1,[os is freebsd]) |
303 |
+ bad_gethostbyname_r="yes" |
|
303 | 304 |
;; |
304 | 305 |
openbsd3.3*) |
305 | 306 |
if test "$have_pthreads" = "yes"; then |
... | ... |
@@ -313,6 +310,7 @@ openbsd3.3*) |
313 | 313 |
AC_DEFINE(_REENTRANT,1,[thread safe]) |
314 | 314 |
fi |
315 | 315 |
AC_DEFINE(C_BSD,1,[os is bsd flavor]) |
316 |
+ bad_gethostbyname_r="yes" |
|
316 | 317 |
;; |
317 | 318 |
openbsd*) |
318 | 319 |
if test "$have_pthreads" = "yes"; then |
... | ... |
@@ -329,6 +327,7 @@ openbsd*) |
329 | 329 |
AC_DEFINE(_REENTRANT,1,[thread safe]) |
330 | 330 |
fi |
331 | 331 |
AC_DEFINE(C_BSD,1,[os is bsd flavor]) |
332 |
+ bad_gethostbyname_r="yes" |
|
332 | 333 |
;; |
333 | 334 |
netbsd*) |
334 | 335 |
if test "$have_pthreads" = "yes"; then |
... | ... |
@@ -340,11 +339,13 @@ netbsd*) |
340 | 340 |
ADDITIONAL_LIBS="$LIBS -lpthread" |
341 | 341 |
fi |
342 | 342 |
AC_DEFINE(C_BSD,1,[os is bsd flavor]) |
343 |
+ bad_gethostbyname_r="yes" |
|
343 | 344 |
;; |
344 | 345 |
bsd*) |
345 | 346 |
AC_MSG_RESULT(Unknown BSD detected. Disabling thread support.) |
346 | 347 |
have_pthreads="no" |
347 | 348 |
AC_DEFINE(C_BSD,1,[os is bsd flavor]) |
349 |
+ bad_gethostbyname_r="yes" |
|
348 | 350 |
;; |
349 | 351 |
beos*) |
350 | 352 |
AC_MSG_RESULT(BeOS detected. Disabling thread support.) |
... | ... |
@@ -356,6 +357,7 @@ darwin*) |
356 | 356 |
AC_DEFINE(C_DARWIN,1,[os is darwin]) |
357 | 357 |
AC_DEFINE(BIND_8_COMPAT,1,[enable bind8 compatibility]) |
358 | 358 |
use_netinfo="yes" |
359 |
+ bad_gethostbyname_r="yes" |
|
359 | 360 |
;; |
360 | 361 |
sco*) |
361 | 362 |
dnl njh@bandsman.sco.uk: SCO Unix port |
... | ... |
@@ -565,7 +567,7 @@ AC_ARG_ENABLE(gethostbyname_r, |
565 | 565 |
[ --disable-gethostbyname_r disable support for gethostbyname_r], |
566 | 566 |
ac_cv_gethostbyname_args="",) |
567 | 567 |
|
568 |
-if test -z "$ac_cv_gethostbyname_args"; then |
|
568 |
+if test -z "$ac_cv_gethostbyname_args" || test "$bad_gethostbyname_r" = "yes"; then |
|
569 | 569 |
AC_MSG_RESULT(no) |
570 | 570 |
else |
571 | 571 |
if test "$ac_cv_gethostbyname_args" = 3; then |
... | ... |
@@ -103,11 +103,7 @@ FRESHCLAM_LIBS = @FRESHCLAM_LIBS@ |
103 | 103 |
GETENT = @GETENT@ |
104 | 104 |
HAVE_MILTER_FALSE = @HAVE_MILTER_FALSE@ |
105 | 105 |
HAVE_MILTER_TRUE = @HAVE_MILTER_TRUE@ |
106 |
-INSTALL_CLAMD_CONF_FALSE = @INSTALL_CLAMD_CONF_FALSE@ |
|
107 |
-INSTALL_CLAMD_CONF_TRUE = @INSTALL_CLAMD_CONF_TRUE@ |
|
108 | 106 |
INSTALL_DATA = @INSTALL_DATA@ |
109 |
-INSTALL_FRESHCLAM_CONF_FALSE = @INSTALL_FRESHCLAM_CONF_FALSE@ |
|
110 |
-INSTALL_FRESHCLAM_CONF_TRUE = @INSTALL_FRESHCLAM_CONF_TRUE@ |
|
111 | 107 |
INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
112 | 108 |
INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
113 | 109 |
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ |
... | ... |
@@ -107,11 +107,7 @@ FRESHCLAM_LIBS = @FRESHCLAM_LIBS@ |
107 | 107 |
GETENT = @GETENT@ |
108 | 108 |
HAVE_MILTER_FALSE = @HAVE_MILTER_FALSE@ |
109 | 109 |
HAVE_MILTER_TRUE = @HAVE_MILTER_TRUE@ |
110 |
-INSTALL_CLAMD_CONF_FALSE = @INSTALL_CLAMD_CONF_FALSE@ |
|
111 |
-INSTALL_CLAMD_CONF_TRUE = @INSTALL_CLAMD_CONF_TRUE@ |
|
112 | 110 |
INSTALL_DATA = @INSTALL_DATA@ |
113 |
-INSTALL_FRESHCLAM_CONF_FALSE = @INSTALL_FRESHCLAM_CONF_FALSE@ |
|
114 |
-INSTALL_FRESHCLAM_CONF_TRUE = @INSTALL_FRESHCLAM_CONF_TRUE@ |
|
115 | 111 |
INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
116 | 112 |
INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
117 | 113 |
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ |
... | ... |
@@ -1,7 +1,5 @@ |
1 | 1 |
# |
2 |
-# Copyright (C) 2002 Tomasz Kojm <zolw@konarski.edu.pl> |
|
3 |
-# Fixes by Arkadiusz Miskiewicz <misiek@pld.org.pl> |
|
4 |
-# Masaki Ogawa <proc@mac.com> |
|
2 |
+# Copyright (C) 2002 - 2004 Tomasz Kojm <tkojm@clamav.net> |
|
5 | 3 |
# |
6 | 4 |
# This program is free software; you can redistribute it and/or modify |
7 | 5 |
# it under the terms of the GNU General Public License as published by |
... | ... |
@@ -22,9 +20,7 @@ CFGINST = @CFGDIR@ |
22 | 22 |
|
23 | 23 |
install: |
24 | 24 |
$(mkinstalldirs) $(DESTDIR)$(CFGINST) |
25 |
-if INSTALL_CLAMD_CONF |
|
26 |
- @$(INSTALL_DATA) $(srcdir)/clamd.conf $(DESTDIR)$(CFGINST) |
|
27 |
-endif |
|
28 |
-if INSTALL_FRESHCLAM_CONF |
|
29 |
- @$(INSTALL_DATA) $(srcdir)/freshclam.conf $(DESTDIR)$(CFGINST) |
|
30 |
-endif |
|
25 |
+ @test -f $(DESTDIR)$(CFGINST)/clamd.conf || \ |
|
26 |
+ $(INSTALL_DATA) $(srcdir)/clamd.conf $(DESTDIR)$(CFGINST) |
|
27 |
+ @test -f $(DESTDIR)$(CFGINST)/freshclam.conf || \ |
|
28 |
+ $(INSTALL_DATA) $(srcdir)/freshclam.conf $(DESTDIR)$(CFGINST) |
... | ... |
@@ -15,9 +15,7 @@ |
15 | 15 |
@SET_MAKE@ |
16 | 16 |
|
17 | 17 |
# |
18 |
-# Copyright (C) 2002 Tomasz Kojm <zolw@konarski.edu.pl> |
|
19 |
-# Fixes by Arkadiusz Miskiewicz <misiek@pld.org.pl> |
|
20 |
-# Masaki Ogawa <proc@mac.com> |
|
18 |
+# Copyright (C) 2002 - 2004 Tomasz Kojm <tkojm@clamav.net> |
|
21 | 19 |
# |
22 | 20 |
# This program is free software; you can redistribute it and/or modify |
23 | 21 |
# it under the terms of the GNU General Public License as published by |
... | ... |
@@ -103,11 +101,7 @@ FRESHCLAM_LIBS = @FRESHCLAM_LIBS@ |
103 | 103 |
GETENT = @GETENT@ |
104 | 104 |
HAVE_MILTER_FALSE = @HAVE_MILTER_FALSE@ |
105 | 105 |
HAVE_MILTER_TRUE = @HAVE_MILTER_TRUE@ |
106 |
-INSTALL_CLAMD_CONF_FALSE = @INSTALL_CLAMD_CONF_FALSE@ |
|
107 |
-INSTALL_CLAMD_CONF_TRUE = @INSTALL_CLAMD_CONF_TRUE@ |
|
108 | 106 |
INSTALL_DATA = @INSTALL_DATA@ |
109 |
-INSTALL_FRESHCLAM_CONF_FALSE = @INSTALL_FRESHCLAM_CONF_FALSE@ |
|
110 |
-INSTALL_FRESHCLAM_CONF_TRUE = @INSTALL_FRESHCLAM_CONF_TRUE@ |
|
111 | 107 |
INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
112 | 108 |
INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
113 | 109 |
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ |
... | ... |
@@ -339,8 +333,10 @@ uninstall-am: uninstall-info-am |
339 | 339 |
|
340 | 340 |
install: |
341 | 341 |
$(mkinstalldirs) $(DESTDIR)$(CFGINST) |
342 |
-@INSTALL_CLAMD_CONF_TRUE@ @$(INSTALL_DATA) $(srcdir)/clamd.conf $(DESTDIR)$(CFGINST) |
|
343 |
-@INSTALL_FRESHCLAM_CONF_TRUE@ @$(INSTALL_DATA) $(srcdir)/freshclam.conf $(DESTDIR)$(CFGINST) |
|
342 |
+ @test -f $(DESTDIR)$(CFGINST)/clamd.conf || \ |
|
343 |
+ $(INSTALL_DATA) $(srcdir)/clamd.conf $(DESTDIR)$(CFGINST) |
|
344 |
+ @test -f $(DESTDIR)$(CFGINST)/freshclam.conf || \ |
|
345 |
+ $(INSTALL_DATA) $(srcdir)/freshclam.conf $(DESTDIR)$(CFGINST) |
|
344 | 346 |
# Tell versions [3.59,3.63) of GNU make to not export all variables. |
345 | 347 |
# Otherwise a system limit (for SysV at least) may be exceeded. |
346 | 348 |
.NOEXPORT: |
... | ... |
@@ -133,11 +133,7 @@ FRESHCLAM_LIBS = @FRESHCLAM_LIBS@ |
133 | 133 |
GETENT = @GETENT@ |
134 | 134 |
HAVE_MILTER_FALSE = @HAVE_MILTER_FALSE@ |
135 | 135 |
HAVE_MILTER_TRUE = @HAVE_MILTER_TRUE@ |
136 |
-INSTALL_CLAMD_CONF_FALSE = @INSTALL_CLAMD_CONF_FALSE@ |
|
137 |
-INSTALL_CLAMD_CONF_TRUE = @INSTALL_CLAMD_CONF_TRUE@ |
|
138 | 136 |
INSTALL_DATA = @INSTALL_DATA@ |
139 |
-INSTALL_FRESHCLAM_CONF_FALSE = @INSTALL_FRESHCLAM_CONF_FALSE@ |
|
140 |
-INSTALL_FRESHCLAM_CONF_TRUE = @INSTALL_FRESHCLAM_CONF_TRUE@ |
|
141 | 137 |
INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
142 | 138 |
INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
143 | 139 |
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ |
... | ... |
@@ -160,11 +160,7 @@ FRESHCLAM_LIBS = @FRESHCLAM_LIBS@ |
160 | 160 |
GETENT = @GETENT@ |
161 | 161 |
HAVE_MILTER_FALSE = @HAVE_MILTER_FALSE@ |
162 | 162 |
HAVE_MILTER_TRUE = @HAVE_MILTER_TRUE@ |
163 |
-INSTALL_CLAMD_CONF_FALSE = @INSTALL_CLAMD_CONF_FALSE@ |
|
164 |
-INSTALL_CLAMD_CONF_TRUE = @INSTALL_CLAMD_CONF_TRUE@ |
|
165 | 163 |
INSTALL_DATA = @INSTALL_DATA@ |
166 |
-INSTALL_FRESHCLAM_CONF_FALSE = @INSTALL_FRESHCLAM_CONF_FALSE@ |
|
167 |
-INSTALL_FRESHCLAM_CONF_TRUE = @INSTALL_FRESHCLAM_CONF_TRUE@ |
|
168 | 164 |
INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
169 | 165 |
INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
170 | 166 |
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ |
... | ... |
@@ -130,11 +130,7 @@ FRESHCLAM_LIBS = @FRESHCLAM_LIBS@ |
130 | 130 |
GETENT = @GETENT@ |
131 | 131 |
HAVE_MILTER_FALSE = @HAVE_MILTER_FALSE@ |
132 | 132 |
HAVE_MILTER_TRUE = @HAVE_MILTER_TRUE@ |
133 |
-INSTALL_CLAMD_CONF_FALSE = @INSTALL_CLAMD_CONF_FALSE@ |
|
134 |
-INSTALL_CLAMD_CONF_TRUE = @INSTALL_CLAMD_CONF_TRUE@ |
|
135 | 133 |
INSTALL_DATA = @INSTALL_DATA@ |
136 |
-INSTALL_FRESHCLAM_CONF_FALSE = @INSTALL_FRESHCLAM_CONF_FALSE@ |
|
137 |
-INSTALL_FRESHCLAM_CONF_TRUE = @INSTALL_FRESHCLAM_CONF_TRUE@ |
|
138 | 134 |
INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
139 | 135 |
INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
140 | 136 |
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ |
... | ... |
@@ -53,6 +53,9 @@ |
53 | 53 |
#include "../libclamav/others.h" |
54 | 54 |
#include "../libclamav/str.h" |
55 | 55 |
|
56 |
+#ifndef O_BINARY |
|
57 |
+#define O_BINARY 0 |
|
58 |
+#endif |
|
56 | 59 |
|
57 | 60 |
void help(void); |
58 | 61 |
char *getdsig(const char *host, const char *user, const char *data); |
... | ... |
@@ -492,29 +495,31 @@ char *getdsig(const char *host, const char *user, const char *data) |
492 | 492 |
|
493 | 493 |
int unpack(struct optstruct *opt) |
494 | 494 |
{ |
495 |
- FILE *fd; |
|
495 |
+ int fd; |
|
496 | 496 |
char *name; |
497 | 497 |
|
498 | 498 |
if(optl(opt, "unpack-current")) { |
499 |
- name = mcalloc(300, sizeof(char)); /* FIXME */ |
|
499 |
+ name = mcalloc(strlen(freshdbdir()) + strlen(getargl(opt, "unpack-current")) + 2, sizeof(char)); |
|
500 | 500 |
sprintf(name, "%s/%s", freshdbdir(), getargl(opt, "unpack-current")); |
501 | 501 |
} else |
502 |
- name = getargc(opt, 'u'); |
|
502 |
+ name = strdup(getargc(opt, 'u')); |
|
503 | 503 |
|
504 |
- if((fd = fopen(name, "rb")) == NULL) { |
|
504 |
+ if((fd = open(name, O_RDONLY|O_BINARY)) == -1) { |
|
505 | 505 |
mprintf("!Can't open CVD file %s\n", name); |
506 |
+ free(name); |
|
506 | 507 |
exit(1); |
507 | 508 |
} |
508 | 509 |
|
509 |
- fseek(fd, 512L, SEEK_SET); |
|
510 |
+ free(name); |
|
511 |
+ lseek(fd, 512, SEEK_SET); |
|
510 | 512 |
|
511 |
- if(cli_untgz(fileno(fd), ".")) { |
|
513 |
+ if(cli_untgz(fd, ".")) { |
|
512 | 514 |
mprintf("!Can't unpack file.\n"); |
513 |
- fclose(fd); |
|
515 |
+ close(fd); |
|
514 | 516 |
exit(1); |
515 | 517 |
} |
516 | 518 |
|
517 |
- fclose(fd); |
|
519 |
+ close(fd); |
|
518 | 520 |
exit(0); |
519 | 521 |
} |
520 | 522 |
|