--enable-unsigned-bytecode.

Use this instead of --enable-debug to enable load of unsigned bytecode.
0.96
Török Edvin 16 years ago
parent b63681a52b
commit 92a08a03bf
  1. 3
      clamav-config.h.in
  2. 51
      configure
  3. 11
      configure.in
  4. 2
      libclamav/bytecode.c
  5. 2
      libclamav/others.c
  6. 2
      libclamav/readdb.c
  7. 5
      win32/clamav-config.h
  8. 1
      win32/update-win32.pl

@ -21,6 +21,9 @@
/* enable clamuko */
#undef CLAMUKO
/* disable loading of unsigned bytecode */
#undef CL_BCUNSIGNED
/* enable debugging */
#undef CL_DEBUG

51
configure vendored

@ -972,6 +972,7 @@ with_user
with_group
enable_clamav
enable_debug
enable_unsigned_bytecode
enable_no_cache
enable_dns_fix
enable_bigstack
@ -1647,6 +1648,7 @@ Optional Features:
--enable-yp-check use ypmatch utility instead of /etc/passwd parsing
--disable-clamav disable test for clamav user/group
--enable-debug enable debug code
--enable-unsigned-bytecode enable load of unsigned bytecode
--enable-no-cache use "Cache-Control: no-cache" in freshclam
--enable-dns-fix enable workaround for broken DNS servers (as in SpeedTouch 510)
--enable-bigstack increase thread stack size
@ -5164,13 +5166,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
(eval echo "\"\$as_me:5167: $ac_compile\"" >&5)
(eval echo "\"\$as_me:5169: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
(eval echo "\"\$as_me:5170: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval echo "\"\$as_me:5172: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
(eval echo "\"\$as_me:5173: output\"" >&5)
(eval echo "\"\$as_me:5175: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@ -6365,7 +6367,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 6368 "configure"' > conftest.$ac_ext
echo '#line 6370 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -7893,11 +7895,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:7896: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7898: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7900: \$? = $ac_status" >&5
echo "$as_me:7902: \$? = $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.
@ -8232,11 +8234,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:8235: $lt_compile\"" >&5)
(eval echo "\"\$as_me:8237: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:8239: \$? = $ac_status" >&5
echo "$as_me:8241: \$? = $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.
@ -8337,11 +8339,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:8340: $lt_compile\"" >&5)
(eval echo "\"\$as_me:8342: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:8344: \$? = $ac_status" >&5
echo "$as_me:8346: \$? = $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
@ -8392,11 +8394,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:8395: $lt_compile\"" >&5)
(eval echo "\"\$as_me:8397: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:8399: \$? = $ac_status" >&5
echo "$as_me:8401: \$? = $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
@ -10776,7 +10778,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 10779 "configure"
#line 10781 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -10872,7 +10874,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 10875 "configure"
#line 10877 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11544,7 +11546,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11547 "configure"
#line 11549 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -16454,6 +16456,25 @@ $as_echo "#define NDEBUG 1" >>confdefs.h
fi
# Check whether --enable-unsigned-bytecode was given.
if test "${enable_unsigned_bytecode+set}" = set; then :
enableval=$enable_unsigned_bytecode; enable_unsigned-bytecode=$enableval
else
enable_unsigned-bytecode="no"
fi
if test "$enable_unsigned-bc" = "yes"; then
VERSION_SUFFIX="$VERSION_SUFFIX-unsigned-bc"
$as_echo "#define CL_BCUNSIGNED 1" >>confdefs.h
else
$as_echo "#define CL_BCUNSIGNED 1" >>confdefs.h
fi
# Check whether --enable-no-cache was given.
if test "${enable_no_cache+set}" = set; then :
enableval=$enable_no_cache; enable_nocache=$enableval

@ -823,6 +823,17 @@ else
AC_DEFINE([NDEBUG],1,[disable assertions])
fi
AC_ARG_ENABLE([unsigned-bytecode],
[ --enable-unsigned-bytecode enable load of unsigned bytecode],
enable_unsigned-bytecode=$enableval, enable_unsigned-bytecode="no")
if test "$enable_unsigned-bc" = "yes"; then
VERSION_SUFFIX="$VERSION_SUFFIX-unsigned-bc"
AC_DEFINE([CL_BCUNSIGNED],1,[enable loading of unsigned bytecode])
else
AC_DEFINE([CL_BCUNSIGNED],1,[disable loading of unsigned bytecode])
fi
AC_ARG_ENABLE([no-cache],
[ --enable-no-cache use "Cache-Control: no-cache" in freshclam],
enable_nocache=$enableval, enable_nocache="no")

@ -1725,7 +1725,7 @@ int cli_bytecode_runlsig(cli_ctx *cctx, const struct cli_all_bc *bcs, unsigned b
memset(&ctx, 0, sizeof(ctx));
cli_bytecode_context_setfuncid(&ctx, bc, 0);
ctx.hooks.match_counts = lsigcnt;
ctx.ctx = cctx;
cli_bytecode_context_setctx(&ctx, cctx);
cli_bytecode_context_setfile(&ctx, map);
cli_dbgmsg("Running bytecode for logical signature match\n");

@ -384,7 +384,7 @@ int cl_engine_set_num(struct cl_engine *engine, enum cl_engine_field field, long
engine->keeptmp = num;
break;
case CL_ENGINE_BYTECODE_SECURITY:
#ifndef CL_DEBUG
#ifndef CL_BCUNSIGNED
if (num == CL_BYTECODE_TRUST_ALL) {
cli_errmsg("cl_engine_set_num: CL_BYTECODE_TRUST_ALL is only supported when ClamAV is built in debug mode\n");
return CL_EARG;

@ -1380,7 +1380,7 @@ static int cli_loadcbc(FILE *fs, struct cl_engine *engine, unsigned int *signo,
if(!(engine->dconf->bytecode & BYTECODE_ENGINE_MASK)) {
return CL_SUCCESS;
}
#ifndef CL_DEBUG
#ifndef CL_BCUNSIGNED
if (!(options & CL_DB_SIGNED)) {
cli_warnmsg("Only loading signed bytecode, skipping load of unsigned bytecode!\n");
return CL_SUCCESS;

@ -23,6 +23,9 @@
/* enable clamuko */
/* #undef CLAMUKO */
/* disable loading of unsigned bytecode */
/* #undef CL_BCUNSIGNED */
/* enable debugging */
/* #undef CL_DEBUG */
@ -493,7 +496,7 @@
/* #undef USE_SYSLOG */
/* Version number of package */
#define VERSION "devel-clamav-0.96rc1-19-gc491083"
#define VERSION "devel-clamav-0.96rc1-54-g96fb6ef"
/* Version suffix for package */
#define VERSION_SUFFIX ""

@ -24,6 +24,7 @@ my %CONF = (
'CLAMAVUSER' => '"clamav"',
'CLAMUKO' => -1,
'CL_DEBUG' => -1,
'CL_BCUNSIGNED' => -1,
'CL_EXPERIMENTAL' => -1,
'CL_THREAD_SAFE' => '1',
'CONFDIR' => '"C:\\\\ClamAV"',

Loading…
Cancel
Save