build system: add configure checks for FD passing

m4/fdpassing.m4: move all FD passing checks here
clamd/session.[ch], scanner.[ch]:
contrib/clamd_fdscan:
	add rfc2292/bsd4.4 style file descriptor passing support
	this code is from Marc Balmer <marc*msys.ch>, with some portability
	fixes applied


git-svn: trunk@3849
remotes/push_mirror/metadata
Török Edvin 18 years ago
parent 43edf874c8
commit 725a296922
  1. 10
      ChangeLog
  2. 4
      Makefile.in
  3. 3
      aclocal.m4
  4. 12
      clamav-config.h.in
  5. 4
      clamav-milter/Makefile.in
  6. 4
      clamconf/Makefile.in
  7. 4
      clamd/Makefile.in
  8. 39
      clamd/scanner.c
  9. 2
      clamd/scanner.h
  10. 61
      clamd/session.c
  11. 1
      clamd/session.h
  12. 4
      clamdscan/Makefile.in
  13. 4
      clamscan/Makefile.in
  14. 2
      config/ltmain.sh
  15. 836
      configure
  16. 67
      configure.in
  17. 18
      contrib/clamd_fdscan/Makefile
  18. 132
      contrib/clamd_fdscan/clamd_fdscan.c
  19. 19
      contrib/clamd_fdscan/clamd_fdscan.h
  20. 52
      contrib/clamd_fdscan/strlcpy.c
  21. 4
      database/Makefile.in
  22. 4
      docs/Makefile.in
  23. 4
      etc/Makefile.in
  24. 4
      freshclam/Makefile.in
  25. 4
      libclamav/Makefile.in
  26. 4
      libclamav/lzma/Makefile.in
  27. 4
      libclamunrar/Makefile.in
  28. 4
      libclamunrar_iface/Makefile.in
  29. 188
      m4/fdpassing.m4
  30. 4
      sigtool/Makefile.in
  31. 4
      test/Makefile.in
  32. 4
      unit_tests/Makefile.in

@ -1,3 +1,13 @@
Fri May 9 23:11:51 EEST 2008 (edwin)
-------------------------------------
* build system: add configure checks for FD passing
* m4/fdpassing.m4: move all FD passing checks here
* clamd/session.[ch], scanner.[ch]:
* contrib/clamd_fdscan:
add rfc2292/bsd4.4 style file descriptor passing support
this code is from Marc Balmer <marc*msys.ch>, with some portability
fixes applied
Fri May 9 14:46:57 EEST 2008 (edwin)
-------------------------------------
* contrib/init/RedHat: check for already running clamav-milter (bb #823)

@ -71,8 +71,8 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
config/ltmain.sh config/missing mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/configure.in
$(top_srcdir)/m4/fdpassing.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \

3
aclocal.m4 vendored

@ -132,7 +132,7 @@ AC_LIB_PROG_LD_GNU
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
# serial 52 Debian 1.5.26-3 AC_PROG_LIBTOOL
# serial 52 Debian 1.5.26-4 AC_PROG_LIBTOOL
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
@ -7630,5 +7630,6 @@ AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([m4/acinclude.m4])
m4_include([m4/fdpassing.m4])
m4_include([m4/lib-link.m4])
m4_include([m4/lib-prefix.m4])

@ -84,6 +84,9 @@
/* "build unrar code" */
#undef ENABLE_UNRAR
/* whether _XOPEN_SOURCE needs to be defined for fd passing to work */
#undef FDPASS_NEED_XOPEN
/* file i/o buffer size */
#undef FILEBUFF
@ -96,9 +99,6 @@
/* use "Cache-Control: no-cache" in freshclam */
#undef FRESHCLAM_NO_CACHE
/* access rights in msghdr */
#undef HAVE_ACCRIGHTS_IN_MSGHDR
/* attrib aligned */
#undef HAVE_ATTRIB_ALIGNED
@ -129,6 +129,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* have working file descriptor passing support */
#undef HAVE_FD_PASSING
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#undef HAVE_FSEEKO
@ -306,9 +309,6 @@
/* zlib installed */
#undef HAVE_ZLIB_H
/* Early Linux doesn't set cmsg fields */
#undef INCOMPLETE_CMSG
/* bzip funtions do not have bz2 prefix */
#undef NOBZ2PREFIX

@ -57,8 +57,8 @@ subdir = clamav-milter
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in INSTALL
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/configure.in
$(top_srcdir)/m4/fdpassing.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d

@ -56,8 +56,8 @@ subdir = clamconf
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/configure.in
$(top_srcdir)/m4/fdpassing.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d

@ -56,8 +56,8 @@ subdir = clamd
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/configure.in
$(top_srcdir)/m4/fdpassing.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d

@ -373,6 +373,45 @@ int scan(const char *filename, unsigned long int *scanned, const struct cl_engin
return ret;
}
/*
* This function was readded by mbalmer@openbsd.org. That is the reason
* why it is so nicely formatted.
*/
int scanfd(const int fd, unsigned long int *scanned,
const struct cl_engine *engine, const struct cl_limits *limits,
unsigned int options, const struct cfgstruct *copt, int odesc)
{
int ret;
const char *virname;
struct stat statbuf;
char fdstr[32];
if(fstat(fd, &statbuf) == -1)
return -1;
if(!S_ISREG(statbuf.st_mode))
return -1;
snprintf(fdstr, sizeof(fdstr), "fd[%d]", fd);
ret = cl_scandesc(fd, &virname, scanned, engine, limits, options);
if(ret == CL_VIRUS) {
mdprintf(odesc, "%s: %s FOUND\n", fdstr, virname);
logg("%s: %s FOUND\n", fdstr, virname);
virusaction(fdstr, virname, copt);
} else if(ret != CL_CLEAN) {
mdprintf(odesc, "%s: %s ERROR\n", fdstr, cl_strerror(ret));
logg("%s: %s ERROR\n", fdstr, cl_strerror(ret));
} else {
mdprintf(odesc, "%s: OK\n", fdstr);
if(logok)
logg("%s: OK\n", fdstr);
}
return ret;
}
int scanstream(int odesc, unsigned long int *scanned, const struct cl_engine *engine, const struct cl_limits *limits, unsigned int options, const struct cfgstruct *copt)
{
int ret, sockfd, acceptd;

@ -28,6 +28,8 @@
int scan(const char *filename, unsigned long int *scanned, const struct cl_engine *engine, const struct cl_limits *limits, unsigned int options, const struct cfgstruct *copt, int odesc, unsigned int type);
int scanfd(const int fd, unsigned long int *scanned, const struct cl_engine *engine, const struct cl_limits *limits, unsigned int options, const struct cfgstruct *copt, int odesc);
int scanstream(int odesc, unsigned long int *scanned, const struct cl_engine *engine, const struct cl_limits *limits, unsigned int options, const struct cfgstruct *copt);
#endif

@ -24,6 +24,11 @@
#include "clamav-config.h"
#endif
#if defined HAVE_FD_PASSING && defined FDPASS_NEED_XOPEN
/* to expose BSD 4.4/Unix98 semantics instead of BSD 4.3 semantics */
#define _XOPEN_SOURCE 500
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -33,7 +38,12 @@
#include <sys/types.h>
#ifndef C_WINDOWS
#include <dirent.h>
#include <sys/socket.h>
#ifdef HAVE_FD_PASSING
#include <sys/uio.h>
#endif
#include <sys/time.h>
#endif
#include <pthread.h>
@ -54,12 +64,57 @@
#include "server.h"
#include "session.h"
#ifdef HAVE_FD_PASSING
static int recvfd_and_scan(int desc, const struct cl_engine *engine, const struct cl_limits *limits, unsigned int options, const struct cfgstruct *copt)
{
struct msghdr msg;
struct cmsghdr *cmsg;
unsigned char buf[CMSG_SPACE(sizeof(int))];
struct iovec iov[1];
char dummy;
int ret=-1;
memset(&msg, 0, sizeof(msg));
iov[0].iov_base = &dummy;
iov[0].iov_len = 1;
msg.msg_iov = iov;
msg.msg_iovlen = 1;
msg.msg_control = buf;
msg.msg_controllen = sizeof(buf);
if (recvmsg(desc, &msg, 0) == -1) {
logg("recvmsg failed: %s!", strerror(errno));
return -1;
}
if ((msg.msg_flags & MSG_TRUNC) || (msg.msg_flags & MSG_CTRUNC)) {
logg("control message truncated");
return -1;
}
for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL;
cmsg = CMSG_NXTHDR(&msg, cmsg)) {
if (cmsg->cmsg_len == CMSG_LEN(sizeof(int)) &&
cmsg->cmsg_level == SOL_SOCKET &&
cmsg->cmsg_type == SCM_RIGHTS) {
int fd = *(int *)CMSG_DATA(cmsg);
ret = scanfd(fd, NULL, engine, limits, options, copt, desc);
close(fd);
}
}
return ret;
}
#else
static int recvfd_and_scan(int desc)
{
mdprintf(desc, "ERROR: FILDES support not compiled in\n");
}
#endif
int command(int desc, const struct cl_engine *engine, const struct cl_limits *limits, unsigned int options, const struct cfgstruct *copt, int timeout)
{
char buff[1025];
int bread, opt;
bread = readsock(desc, buff, sizeof(buff)-1, '\n', timeout, 0, 1);
if(bread == -2) /* timeout */
return -2;
@ -140,6 +195,10 @@ int command(int desc, const struct cl_engine *engine, const struct cl_limits *li
if(cfgopt(copt, "ExitOnOOM")->enabled)
return COMMAND_SHUTDOWN;
} else if(!strncmp(buff, CMD14, strlen(CMD14))) { /* FILDES */
if(recvfd_and_scan(desc, engine, limits, options, copt) == -2)
if(cfgopt(copt, "ExitOnOOM")->enabled)
return COMMAND_SHUTDOWN;
} else {
mdprintf(desc, "UNKNOWN COMMAND\n");
}

@ -37,6 +37,7 @@
#define CMD11 "SHUTDOWN"
/* #define CMD12 "FD" */
#define CMD13 "MULTISCAN"
#define CMD14 "FILDES"
#include "libclamav/clamav.h"
#include "shared/cfgparser.h"

@ -56,8 +56,8 @@ subdir = clamdscan
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/configure.in
$(top_srcdir)/m4/fdpassing.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d

@ -57,8 +57,8 @@ subdir = clamscan
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/configure.in
$(top_srcdir)/m4/fdpassing.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d

@ -43,7 +43,7 @@ EXIT_FAILURE=1
PROGRAM=ltmain.sh
PACKAGE=libtool
VERSION="1.5.26 Debian 1.5.26-3"
VERSION="1.5.26 Debian 1.5.26-4"
TIMESTAMP=" (1.1220.2.493 2008/02/01 16:58:18)"
# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).

836
configure vendored

@ -1520,6 +1520,7 @@ Optional Features:
--enable-bigstack increase thread stack size
--disable-gethostbyname_r disable support for gethostbyname_r
--enable-readdir_r enable support for readdir_r
--disable-fdpassing don't build file descriptor passing support
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@ -4766,7 +4767,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 4769 "configure"' > conftest.$ac_ext
echo '#line 4770 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -6856,11 +6857,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:6859: $lt_compile\"" >&5)
(eval echo "\"\$as_me:6860: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:6863: \$? = $ac_status" >&5
echo "$as_me:6864: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -7146,11 +7147,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7149: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7150: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7153: \$? = $ac_status" >&5
echo "$as_me:7154: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -7250,11 +7251,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7253: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7254: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:7257: \$? = $ac_status" >&5
echo "$as_me:7258: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -9627,7 +9628,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 9630 "configure"
#line 9631 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -9727,7 +9728,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 9730 "configure"
#line 9731 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -16329,15 +16330,6 @@ _ACEOF
fi
fi
case `uname -r` in
1.*|2.0.*)
cat >>confdefs.h <<\_ACEOF
#define INCOMPLETE_CMSG 1
_ACEOF
;;
esac
;;
kfreebsd*-gnu)
@ -16507,11 +16499,9 @@ _ACEOF
;;
openbsd*)
if test "$have_pthreads" = "yes"; then
if test "$use_cr" = "no"; then
THREAD_LIBS="-pthread"
else
THREAD_LIBS="-pthread -lc_r"
fi
THREAD_LIBS="-pthread"
CLAMD_LIBS="$CLAMD_LIBS -pthread"
CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -pthread"
TH_SAFE="-thread-safe"
cat >>confdefs.h <<\_ACEOF
@ -17238,241 +17228,6 @@ fi
for ac_func in recvmsg sendmsg
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
#define $ac_func innocuous_$ac_func
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
#undef $ac_func
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined __stub_$ac_func || defined __stub___$ac_func
choke me
#endif
int
main ()
{
return $ac_func ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
{ echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
{ echo "$as_me:$LINENO: checking for msg_accrights field in struct msghdr" >&5
echo $ECHO_N "checking for msg_accrights field in struct msghdr... $ECHO_C" >&6; }
if test "${ac_cv_have_accrights_in_msghdr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/uio.h>
int
main ()
{
#ifdef msg_accrights
#error msg_accrights defined
#endif
struct msghdr m;
m.msg_accrights = 0;
return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_have_accrights_in_msghdr="yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_accrights_in_msghdr="no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_have_accrights_in_msghdr" >&5
echo "${ECHO_T}$ac_cv_have_accrights_in_msghdr" >&6; }
if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_ACCRIGHTS_IN_MSGHDR 1
_ACEOF
fi
{ echo "$as_me:$LINENO: checking for msg_control field in struct msghdr" >&5
echo $ECHO_N "checking for msg_control field in struct msghdr... $ECHO_C" >&6; }
if test "${ac_cv_have_control_in_msghdr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/uio.h>
int
main ()
{
#ifdef msg_control
#error msg_control defined
#endif
struct msghdr m;
m.msg_control = 0;
return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_have_control_in_msghdr="yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_control_in_msghdr="no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_have_control_in_msghdr" >&5
echo "${ECHO_T}$ac_cv_have_control_in_msghdr" >&6; }
if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_CONTROL_IN_MSGHDR 1
_ACEOF
fi
# Check whether --with-tcpwrappers was given.
if test "${with_tcpwrappers+set}" = set; then
withval=$with_tcpwrappers; case "$withval" in
@ -17639,6 +17394,9 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <tcpd.h>
int allow_severity = 0;
int deny_severity = 0;
@ -17691,6 +17449,9 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <tcpd.h>
int allow_severity = 0;
int deny_severity = 0;
@ -18900,6 +18661,565 @@ fi
{ echo "$as_me:$LINENO: result: $have_signed_rightshift_extended" >&5
echo "${ECHO_T}$have_signed_rightshift_extended" >&6; };
for ac_func in recvmsg sendmsg
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
#define $ac_func innocuous_$ac_func
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
#undef $ac_func
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined __stub_$ac_func || defined __stub___$ac_func
choke me
#endif
int
main ()
{
return $ac_func ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
ac_res=`eval echo '${'$as_ac_var'}'`
{ echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
{ echo "$as_me:$LINENO: checking for msg_control field in struct msghdr" >&5
echo $ECHO_N "checking for msg_control field in struct msghdr... $ECHO_C" >&6; }
if test "${ac_cv_have_control_in_msghdr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _XOPEN_SOURCE 500
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/uio.h>
int
main ()
{
#ifdef msg_control
#error msg_control defined
#endif
struct msghdr m;
m.msg_control = 0;
return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_have_control_in_msghdr="yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_have_control_in_msghdr="no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_have_control_in_msghdr" >&5
echo "${ECHO_T}$ac_cv_have_control_in_msghdr" >&6; }
if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_CONTROL_IN_MSGHDR 1
_ACEOF
{ echo "$as_me:$LINENO: checking BSD 4.4 / RFC2292 style fd passing" >&5
echo $ECHO_N "checking BSD 4.4 / RFC2292 style fd passing... $ECHO_C" >&6; }
# Check whether --enable-fdpassing was given.
if test "${enable_fdpassing+set}" = set; then
enableval=$enable_fdpassing; want_fdpassing=$enableval
else
want_fdpassing="yes"
fi
if test "x$want_fdpassing" = "xyes"; then
if test "$cross_compiling" = yes; then
have_fdpass=0
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/wait.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/uio.h>
#include <signal.h>
#include <sys/socket.h>
#define TEST "test"
int send_fd(int s, int fd)
{
struct msghdr msg;
struct cmsghdr *cmsg;
unsigned char fdbuf[CMSG_SPACE(sizeof(int))];
struct iovec iov[1];
iov[0].iov_base = "";
iov[0].iov_len = 1;
memset(&msg, 0, sizeof(msg));
msg.msg_control = fdbuf;
/* must send/receive at least one byte */
msg.msg_iov = iov;
msg.msg_iovlen = 1;
msg.msg_controllen = CMSG_LEN(sizeof(int));
cmsg = CMSG_FIRSTHDR(&msg);
cmsg->cmsg_len = CMSG_LEN(sizeof(int));
cmsg->cmsg_level = SOL_SOCKET;
cmsg->cmsg_type = SCM_RIGHTS;
*(int *)CMSG_DATA(cmsg) = fd;
if (sendmsg(s, &msg, 0) == -1) {
perror("sendmsg");
close(s);
return -1;
}
return 0;
}
int testfd(int desc)
{
char buf[256];
if(read(desc, buf, sizeof(buf)) != sizeof(TEST)) {
fprintf(stderr, "test data not received correctly!");
return 1;
}
return memcmp(buf, TEST, sizeof(TEST));
}
int recv_fd(int desc)
{
unsigned char buf[CMSG_SPACE(sizeof(int))];
struct msghdr msg;
struct cmsghdr *cmsg;
struct iovec iov[1];
char dummy;
int ret=2;
memset(&msg, 0, sizeof(msg));
iov[0].iov_base = &dummy;
iov[0].iov_len = 1;
msg.msg_iov = iov;
msg.msg_iovlen = 1;
msg.msg_control = buf;
msg.msg_controllen = sizeof(buf);
if (recvmsg(desc, &msg, 0) == -1) {
perror("recvmsg failed!");
return -1;
}
if ((msg.msg_flags & MSG_TRUNC) || (msg.msg_flags & MSG_CTRUNC)) {
fprintf(stderr, "control message truncated");
return -1;
}
for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL;
cmsg = CMSG_NXTHDR(&msg, cmsg)) {
if (cmsg->cmsg_len == CMSG_LEN(sizeof(int)) &&
cmsg->cmsg_level == SOL_SOCKET &&
cmsg->cmsg_type == SCM_RIGHTS) {
int fd = *(int *)CMSG_DATA(cmsg);
ret = testfd(fd);
close(fd);
}
}
return ret;
}
int main(void)
{
int fd[2];
int pip[2];
pid_t pid;
int status;
if(pipe(pip)) {
perror("pipe");
return 1;
}
if(socketpair(AF_UNIX, SOCK_STREAM, 0, fd)) {
perror("socketpair");
return 1;
}
if((pid=fork()) < 0) {
perror("fork");
} else if (!pid) {
exit( recv_fd(fd[1]) );
} else {
/* parent */
if(send_fd(fd[0], pip[0]) == -1) {
kill(pid, 9);
waitpid(pid, NULL, 0);
return 2;
}
write(pip[1], TEST, sizeof(TEST));
close(pip[1]);
waitpid(pid, &status, 0);
}
return status;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
have_fdpass=1; fdpass_need_xopen=0
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
have_fdpass=0
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
if test $have_fdpass = 0; then
if test "$cross_compiling" = yes; then
have_fdpass=0
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _XOPEN_SOURCE 500
#include <sys/types.h>
#include <sys/wait.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/uio.h>
#include <signal.h>
#include <sys/socket.h>
#define TEST "test"
int send_fd(int s, int fd)
{
struct msghdr msg;
struct cmsghdr *cmsg;
unsigned char fdbuf[CMSG_SPACE(sizeof(int))];
struct iovec iov[1];
iov[0].iov_base = "";
iov[0].iov_len = 1;
memset(&msg, 0, sizeof(msg));
msg.msg_control = fdbuf;
/* must send/receive at least one byte */
msg.msg_iov = iov;
msg.msg_iovlen = 1;
msg.msg_controllen = CMSG_LEN(sizeof(int));
cmsg = CMSG_FIRSTHDR(&msg);
cmsg->cmsg_len = CMSG_LEN(sizeof(int));
cmsg->cmsg_level = SOL_SOCKET;
cmsg->cmsg_type = SCM_RIGHTS;
*(int *)CMSG_DATA(cmsg) = fd;
if (sendmsg(s, &msg, 0) == -1) {
perror("sendmsg");
close(s);
return -1;
}
return 0;
}
int testfd(int desc)
{
char buf[256];
if(read(desc, buf, sizeof(buf)) != sizeof(TEST)) {
fprintf(stderr, "test data not received correctly!");
return 1;
}
return memcmp(buf, TEST, sizeof(TEST));
}
int recv_fd(int desc)
{
unsigned char buf[CMSG_SPACE(sizeof(int))];
struct msghdr msg;
struct cmsghdr *cmsg;
struct iovec iov[1];
char dummy;
int ret=2;
memset(&msg, 0, sizeof(msg));
iov[0].iov_base = &dummy;
iov[0].iov_len = 1;
msg.msg_iov = iov;
msg.msg_iovlen = 1;
msg.msg_control = buf;
msg.msg_controllen = sizeof(buf);
if (recvmsg(desc, &msg, 0) == -1) {
perror("recvmsg failed!");
return -1;
}
if ((msg.msg_flags & MSG_TRUNC) || (msg.msg_flags & MSG_CTRUNC)) {
fprintf(stderr, "control message truncated");
return -1;
}
for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL;
cmsg = CMSG_NXTHDR(&msg, cmsg)) {
if (cmsg->cmsg_len == CMSG_LEN(sizeof(int)) &&
cmsg->cmsg_level == SOL_SOCKET &&
cmsg->cmsg_type == SCM_RIGHTS) {
int fd = *(int *)CMSG_DATA(cmsg);
ret = testfd(fd);
close(fd);
}
}
return ret;
}
int main(void)
{
int fd[2];
int pip[2];
pid_t pid;
int status;
if(pipe(pip)) {
perror("pipe");
return 1;
}
if(socketpair(AF_UNIX, SOCK_STREAM, 0, fd)) {
perror("socketpair");
return 1;
}
if((pid=fork()) < 0) {
perror("fork");
} else if (!pid) {
exit( recv_fd(fd[1]) );
} else {
/* parent */
if(send_fd(fd[0], pip[0]) == -1) {
kill(pid, 9);
waitpid(pid, NULL, 0);
return 2;
}
write(pip[1], TEST, sizeof(TEST));
close(pip[1]);
waitpid(pid, &status, 0);
}
return status;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
have_fdpass=1; fdpass_need_xopen=1
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
have_fdpass=0
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
if test $have_fdpass = 1; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_FD_PASSING 1
_ACEOF
if test $fdpass_need_xopen = 1; then
cat >>confdefs.h <<\_ACEOF
#define FDPASS_NEED_XOPEN 1
_ACEOF
{ echo "$as_me:$LINENO: result: yes, by defining _XOPEN_SOURCE" >&5
echo "${ECHO_T}yes, by defining _XOPEN_SOURCE" >&6; }
else
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
fi
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
else
{ echo "$as_me:$LINENO: result: disabled" >&5
echo "${ECHO_T}disabled" >&6; }
fi
fi
ac_config_files="$ac_config_files libclamunrar/Makefile libclamunrar_iface/Makefile libclamav/Makefile libclamav/lzma/Makefile clamscan/Makefile database/Makefile docs/Makefile clamd/Makefile clamdscan/Makefile clamav-milter/Makefile freshclam/Makefile sigtool/Makefile clamconf/Makefile etc/Makefile test/Makefile unit_tests/Makefile Makefile clamav-config libclamav.pc docs/man/clamav-milter.8 docs/man/clamconf.1 docs/man/clamd.8 docs/man/clamd.conf.5 docs/man/clamdscan.1 docs/man/clamscan.1 docs/man/freshclam.1 docs/man/freshclam.conf.5 docs/man/sigtool.1"
cat >confcache <<\_ACEOF

@ -1,4 +1,3 @@
dnl Copyright (C) 2002 - 2006 Tomasz Kojm <tkojm@clamav.net>
dnl gethostbyname_r and readdir_r checks (c) COPYRIGHT MIT 1995
dnl socklen_t check (c) Alexander V. Lukyanov <lav@yars.free.net>
@ -705,11 +704,6 @@ linux*)
AC_DEFINE([CLAMUKO],1,[enable clamuko])
fi
fi
case `uname -r` in
1.*|2.0.*)
AC_DEFINE([INCOMPLETE_CMSG],1,[Early Linux doesn't set cmsg fields])
;;
esac
;;
kfreebsd*-gnu)
AC_DEFINE([C_KFREEBSD_GNU],1,[target is kfreebsd-gnu])
@ -791,11 +785,9 @@ dragonfly*)
;;
openbsd*)
if test "$have_pthreads" = "yes"; then
if test "$use_cr" = "no"; then
THREAD_LIBS="-pthread"
else
THREAD_LIBS="-pthread -lc_r"
fi
THREAD_LIBS="-pthread"
CLAMD_LIBS="$CLAMD_LIBS -pthread"
CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -pthread"
TH_SAFE="-thread-safe"
AC_DEFINE([CL_THREAD_SAFE],1,[thread safe])
AC_DEFINE([_REENTRANT],1,[thread safe])
@ -978,51 +970,6 @@ then
AC_DEFINE([ENABLE_UNRAR], 1, "build unrar code")
fi
dnl Check if we can do fd passing
dnl Submitted by Richard Lyons <frob-clamav@webcentral.com.au>
AC_CHECK_FUNCS([recvmsg sendmsg])
AC_CACHE_CHECK([for msg_accrights field in struct msghdr],
[ac_cv_have_accrights_in_msghdr], [
AC_TRY_COMPILE(
[
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/uio.h>
],
[
#ifdef msg_accrights
#error msg_accrights defined
#endif
struct msghdr m;
m.msg_accrights = 0;
return 0;
]
, [ac_cv_have_accrights_in_msghdr="yes"],[ac_cv_have_accrights_in_msghdr="no"])
])
if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
AC_DEFINE([HAVE_ACCRIGHTS_IN_MSGHDR],1,[access rights in msghdr])
fi
AC_CACHE_CHECK([for msg_control field in struct msghdr],
[ac_cv_have_control_in_msghdr], [
AC_TRY_COMPILE(
[
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/uio.h>
],
[
#ifdef msg_control
#error msg_control defined
#endif
struct msghdr m;
m.msg_control = 0;
return 0;
], [ ac_cv_have_control_in_msghdr="yes" ], [ ac_cv_have_control_in_msghdr="no" ])
])
if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
AC_DEFINE([HAVE_CONTROL_IN_MSGHDR],1,[ancillary data style fd pass])
fi
dnl tcpwrappers support
dnl rules from http://ma.ph-freiburg.de/tng/tng-technical/2002-01/msg00094.html
@ -1040,6 +987,9 @@ if test "$tcpw" != "no" && test "$have_milter" = "yes" ; then
save_LIBS="$LIBS"
LIBS="$LIBS -lwrap $FRESHCLAM_LIBS"
AC_TRY_LINK([
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <tcpd.h>
int allow_severity = 0;
int deny_severity = 0;
@ -1054,6 +1004,9 @@ hosts_access(req)
dnl try with -lnsl
LIBS="$LIBS -lnsl $FRESHCLAM_LIBS"
AC_TRY_LINK([
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <tcpd.h>
int allow_severity = 0;
int deny_severity = 0;
@ -1438,6 +1391,8 @@ if test $have_signed_rightshift_extended = yes; then
fi
AC_MSG_RESULT([$have_signed_rightshift_extended]);
AC_C_FDPASSING
AC_OUTPUT([
libclamunrar/Makefile
libclamunrar_iface/Makefile

@ -0,0 +1,18 @@
CC=cc
# Solaris needs these:
#CFLAGS=-D_XOPEN_SOURCE=500
#LDFLAGS=-lsocket
CFLAGS=
LDFLAGS=
all: clamd_fdscan
strlcpy.o: strlcpy.c
$(CC) $(CFLAGS) -c -o $@ $<
clamd_fdscan.o: clamd_fdscan.c clamd_fdscan.h
$(CC) $(CFLAGS) -c -o $@ $<
clamd_fdscan: clamd_fdscan.o strlcpy.o
$(CC) -o $@ clamd_fdscan.o strlcpy.o

@ -0,0 +1,132 @@
/* $Id: clamd_fdscan.c,v 1.2 2007/01/18 16:59:50 mbalmer Exp $ */
/*
* Copyright (c) 2007 Marc Balmer <mbalmer@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/uio.h>
#include <string.h>
#include <stdio.h>
#include <err.h>
#include <unistd.h>
#include "clamd_fdscan.h"
#define CLAMD_BUFSIZ 256
size_t strlcpy(char *dst, const char *src, size_t siz);
/*
* clamd_fdscan lets a running clamd process scan the contents of an open
* filedescriptor by passing the filedescriptor to clamd. The parameters
* are as follows:
* fd the open filedescriptor to pass for scanning
* soname the path to the local clamd listening socket
* name virus name, if a virus is found
* len max len of the virus name
*
* The functions returns 0 if the file was scanned and contains no virus,
* -1 if an error occurs and 1 if a virus is found.
*/
int
clamd_fdscan(int fd, char *soname, char *name, size_t len)
{
struct sockaddr_un addr;
struct msghdr msg;
struct cmsghdr *cmsg;
unsigned char fdbuf[CMSG_SPACE(sizeof(int))];
FILE *sp;
char buf[CLAMD_BUFSIZ], *p, *q;
off_t pos;
int s;
struct iovec iov[1];
iov[0].iov_base = "";
iov[0].iov_len = 1;
pos = lseek(fd, 0, SEEK_CUR);
s = socket(AF_UNIX, SOCK_STREAM, 0);
memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_UNIX;
strlcpy(addr.sun_path, soname, sizeof(addr.sun_path));
if (connect(s, (struct sockaddr *)&addr, sizeof(addr))) {
perror("connect");
return -1;
}
memset(&msg, 0, sizeof(msg));
msg.msg_control = fdbuf;
/* must send/receive at least one byte */
msg.msg_iov = iov;
msg.msg_iovlen = 1;
msg.msg_controllen = CMSG_LEN(sizeof(int));
cmsg = CMSG_FIRSTHDR(&msg);
cmsg->cmsg_len = CMSG_LEN(sizeof(int));
cmsg->cmsg_level = SOL_SOCKET;
cmsg->cmsg_type = SCM_RIGHTS;
*(int *)CMSG_DATA(cmsg) = fd;
write(s, "FILDES\n", sizeof("FILDES\n")-1);
if (sendmsg(s, &msg, 0) == -1) {
perror("sendmsg");
close(s);
return -1;
}
sp = fdopen(s,"r");
fgets(buf, sizeof(buf), sp);
fclose(sp);
close(s);
if (pos != -1)
lseek(fd, pos, SEEK_SET);
if ((p = strrchr(buf, ' ')) != NULL) {
++p;
if (!strncmp(p, "OK", 2))
return 0;
else if (!strncmp(p, "FOUND", 5)) {
if (name != NULL) {
*--p = '\0';
q = strrchr(buf, ' ') + 1;
strlcpy(name, q, len);
}
return 1;
} else {
puts(buf);
}
}
return -1;
}
int main(int argc, char *argv[])
{
char virusname[CLAMD_BUFSIZ];
if(argc != 2) {
fprintf(stderr,"Usage: %s <clamd_socket>\n", argv[0]);
return 1;
}
virusname[0]=0;
if(clamd_fdscan(0, argv[1],virusname, sizeof(virusname)) == -1) {
perror("Error sending fd!");
return 2;
} else {
printf("FOUND: %s\n", virusname);
}
return 0;
}

@ -0,0 +1,19 @@
/* $Id: clamd_fdscan.h,v 1.1.1.1 2007/01/18 14:01:24 mbalmer Exp $ */
/*
* Copyright (c) 2007 Marc Balmer <mbalmer@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
extern int clamd_fdscan(int fd, char *soname, char *name, size_t len);

@ -0,0 +1,52 @@
/*
* This code is derived from OpenBSD's libc, original license follows:
*
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/types.h>
#include <string.h>
/*
* Copy src to string dst of size siz. At most siz-1 characters
* will be copied. Always NUL terminates (unless siz == 0).
* Returns strlen(src); if retval >= siz, truncation occurred.
*/
size_t
strlcpy(char *dst, const char *src, size_t siz)
{
char *d = dst;
const char *s = src;
size_t n = siz;
/* Copy as many bytes as will fit */
if (n != 0) {
while (--n != 0) {
if ((*d++ = *s++) == '\0')
break;
}
}
/* Not enough room in dst, add NUL and traverse rest of src */
if (n == 0) {
if (siz != 0)
*d = '\0'; /* NUL-terminate dst */
while (*s++)
;
}
return(s - src - 1); /* count does not include NUL */
}

@ -56,8 +56,8 @@ subdir = database
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/configure.in
$(top_srcdir)/m4/fdpassing.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d

@ -54,8 +54,8 @@ subdir = docs
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/configure.in
$(top_srcdir)/m4/fdpassing.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d

@ -54,8 +54,8 @@ subdir = etc
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/configure.in
$(top_srcdir)/m4/fdpassing.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d

@ -57,8 +57,8 @@ subdir = freshclam
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/configure.in
$(top_srcdir)/m4/fdpassing.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d

@ -58,8 +58,8 @@ DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/configure.in
$(top_srcdir)/m4/fdpassing.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d

@ -56,8 +56,8 @@ subdir = libclamav/lzma
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/configure.in
$(top_srcdir)/m4/fdpassing.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d

@ -42,8 +42,8 @@ subdir = libclamunrar
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/configure.in
$(top_srcdir)/m4/fdpassing.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d

@ -42,8 +42,8 @@ subdir = libclamunrar_iface
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/configure.in
$(top_srcdir)/m4/fdpassing.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d

@ -0,0 +1,188 @@
AC_DEFUN([CONFTEST_FDPASS],[[
AC_LANG_SOURCE([[
$1
#include <sys/types.h>
#include <sys/wait.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/uio.h>
#include <signal.h>
#include <sys/socket.h>
#define TEST "test"
int send_fd(int s, int fd)
{
struct msghdr msg;
struct cmsghdr *cmsg;
unsigned char fdbuf[CMSG_SPACE(sizeof(int))];
struct iovec iov[1];
iov[0].iov_base = "";
iov[0].iov_len = 1;
memset(&msg, 0, sizeof(msg));
msg.msg_control = fdbuf;
/* must send/receive at least one byte */
msg.msg_iov = iov;
msg.msg_iovlen = 1;
msg.msg_controllen = CMSG_LEN(sizeof(int));
cmsg = CMSG_FIRSTHDR(&msg);
cmsg->cmsg_len = CMSG_LEN(sizeof(int));
cmsg->cmsg_level = SOL_SOCKET;
cmsg->cmsg_type = SCM_RIGHTS;
*(int *)CMSG_DATA(cmsg) = fd;
if (sendmsg(s, &msg, 0) == -1) {
perror("sendmsg");
close(s);
return -1;
}
return 0;
}
int testfd(int desc)
{
char buf[256];
if(read(desc, buf, sizeof(buf)) != sizeof(TEST)) {
fprintf(stderr, "test data not received correctly!");
return 1;
}
return memcmp(buf, TEST, sizeof(TEST));
}
int recv_fd(int desc)
{
unsigned char buf[CMSG_SPACE(sizeof(int))];
struct msghdr msg;
struct cmsghdr *cmsg;
struct iovec iov[1];
char dummy;
int ret=2;
memset(&msg, 0, sizeof(msg));
iov[0].iov_base = &dummy;
iov[0].iov_len = 1;
msg.msg_iov = iov;
msg.msg_iovlen = 1;
msg.msg_control = buf;
msg.msg_controllen = sizeof(buf);
if (recvmsg(desc, &msg, 0) == -1) {
perror("recvmsg failed!");
return -1;
}
if ((msg.msg_flags & MSG_TRUNC) || (msg.msg_flags & MSG_CTRUNC)) {
fprintf(stderr, "control message truncated");
return -1;
}
for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL;
cmsg = CMSG_NXTHDR(&msg, cmsg)) {
if (cmsg->cmsg_len == CMSG_LEN(sizeof(int)) &&
cmsg->cmsg_level == SOL_SOCKET &&
cmsg->cmsg_type == SCM_RIGHTS) {
int fd = *(int *)CMSG_DATA(cmsg);
ret = testfd(fd);
close(fd);
}
}
return ret;
}
int main(void)
{
int fd[2];
int pip[2];
pid_t pid;
int status;
if(pipe(pip)) {
perror("pipe");
return 1;
}
if(socketpair(AF_UNIX, SOCK_STREAM, 0, fd)) {
perror("socketpair");
return 1;
}
if((pid=fork()) < 0) {
perror("fork");
} else if (!pid) {
exit( recv_fd(fd[1]) );
} else {
/* parent */
if(send_fd(fd[0], pip[0]) == -1) {
kill(pid, 9);
waitpid(pid, NULL, 0);
return 2;
}
write(pip[1], TEST, sizeof(TEST));
close(pip[1]);
waitpid(pid, &status, 0);
}
return status;
}
]])
]])
AC_DEFUN([AC_C_FDPASSING],[
dnl Check if we can do fd passing
dnl Submitted by Richard Lyons <frob-clamav@webcentral.com.au>
AC_CHECK_FUNCS([recvmsg sendmsg])
AC_CACHE_CHECK([for msg_control field in struct msghdr],
[ac_cv_have_control_in_msghdr], [
AC_TRY_COMPILE(
[
#define _XOPEN_SOURCE 500
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/uio.h>
],
[
#ifdef msg_control
#error msg_control defined
#endif
struct msghdr m;
m.msg_control = 0;
return 0;
], [ ac_cv_have_control_in_msghdr="yes" ], [ ac_cv_have_control_in_msghdr="no" ])
])
if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
AC_DEFINE([HAVE_CONTROL_IN_MSGHDR],1,[ancillary data style fd pass])
dnl Check whether FD passing works <edwin@clamav.net>
AC_MSG_CHECKING([BSD 4.4 / RFC2292 style fd passing])
AC_ARG_ENABLE([fdpassing],[ --disable-fdpassing don't build file descriptor passing support],
want_fdpassing=$enableval, want_fdpassing="yes")
if test "x$want_fdpassing" = "xyes"; then
dnl Try without _XOPEN_SOURCE first
AC_RUN_IFELSE(CONFTEST_FDPASS([]), [have_fdpass=1; fdpass_need_xopen=0], [have_fdpass=0],[have_fdpass=0])
if test $have_fdpass = 0; then
AC_RUN_IFELSE(CONFTEST_FDPASS([#define _XOPEN_SOURCE 500]), [have_fdpass=1; fdpass_need_xopen=1],[have_fdpass=0],[have_fdpass=0])
fi
if test $have_fdpass = 1; then
AC_DEFINE([HAVE_FD_PASSING],1,[have working file descriptor passing support])
if test $fdpass_need_xopen = 1; then
AC_DEFINE([FDPASS_NEED_XOPEN],1,[whether _XOPEN_SOURCE needs to be defined for fd passing to work])
AC_MSG_RESULT([yes, by defining _XOPEN_SOURCE])
else
AC_MSG_RESULT([yes])
fi
else
AC_MSG_RESULT([no])
fi
else
AC_MSG_RESULT([disabled])
fi
fi
])

@ -56,8 +56,8 @@ subdir = sigtool
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/configure.in
$(top_srcdir)/m4/fdpassing.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d

@ -36,8 +36,8 @@ subdir = test
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/configure.in
$(top_srcdir)/m4/fdpassing.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d

@ -39,8 +39,8 @@ subdir = unit_tests
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/configure.in
$(top_srcdir)/m4/fdpassing.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d

Loading…
Cancel
Save