[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b
Török Edvin
edwin at clamav.net
Sun Apr 4 01:24:27 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 92a08a03bfddf70f18d91fda5d2799bb6bba5596
Author: Török Edvin <edwin at clamav.net>
Date: Mon Mar 22 17:28:38 2010 +0200
--enable-unsigned-bytecode.
Use this instead of --enable-debug to enable load of unsigned bytecode.
diff --git a/clamav-config.h.in b/clamav-config.h.in
index 5b9339d..9503517 100644
--- a/clamav-config.h.in
+++ b/clamav-config.h.in
@@ -21,6 +21,9 @@
/* enable clamuko */
#undef CLAMUKO
+/* disable loading of unsigned bytecode */
+#undef CL_BCUNSIGNED
+
/* enable debugging */
#undef CL_DEBUG
diff --git a/configure b/configure
index bd23b4f..33cfe84 100755
--- a/configure
+++ b/configure
@@ -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
diff --git a/configure.in b/configure.in
index 4d21968..0f36560 100644
--- a/configure.in
+++ b/configure.in
@@ -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")
diff --git a/libclamav/bytecode.c b/libclamav/bytecode.c
index 56cbf89..1b1d173 100644
--- a/libclamav/bytecode.c
+++ b/libclamav/bytecode.c
@@ -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");
diff --git a/libclamav/others.c b/libclamav/others.c
index b7af297..1ac6bc6 100644
--- a/libclamav/others.c
+++ b/libclamav/others.c
@@ -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;
diff --git a/libclamav/readdb.c b/libclamav/readdb.c
index ce146de..f1d00f5 100644
--- a/libclamav/readdb.c
+++ b/libclamav/readdb.c
@@ -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;
diff --git a/win32/clamav-config.h b/win32/clamav-config.h
index f866ac9..d44bce5 100644
--- a/win32/clamav-config.h
+++ b/win32/clamav-config.h
@@ -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 ""
diff --git a/win32/update-win32.pl b/win32/update-win32.pl
index e48ca31..54f8720 100755
--- a/win32/update-win32.pl
+++ b/win32/update-win32.pl
@@ -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"',
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list