Use this instead of --enable-debug to enable load of unsigned bytecode.
Török Edvin authored on 2010/03/23 00:28:38... | ... |
@@ -972,6 +972,7 @@ with_user |
972 | 972 |
with_group |
973 | 973 |
enable_clamav |
974 | 974 |
enable_debug |
975 |
+enable_unsigned_bytecode |
|
975 | 976 |
enable_no_cache |
976 | 977 |
enable_dns_fix |
977 | 978 |
enable_bigstack |
... | ... |
@@ -1647,6 +1648,7 @@ Optional Features: |
1647 | 1647 |
--enable-yp-check use ypmatch utility instead of /etc/passwd parsing |
1648 | 1648 |
--disable-clamav disable test for clamav user/group |
1649 | 1649 |
--enable-debug enable debug code |
1650 |
+ --enable-unsigned-bytecode enable load of unsigned bytecode |
|
1650 | 1651 |
--enable-no-cache use "Cache-Control: no-cache" in freshclam |
1651 | 1652 |
--enable-dns-fix enable workaround for broken DNS servers (as in SpeedTouch 510) |
1652 | 1653 |
--enable-bigstack increase thread stack size |
... | ... |
@@ -5164,13 +5166,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : |
5164 | 5164 |
else |
5165 | 5165 |
lt_cv_nm_interface="BSD nm" |
5166 | 5166 |
echo "int some_variable = 0;" > conftest.$ac_ext |
5167 |
- (eval echo "\"\$as_me:5167: $ac_compile\"" >&5) |
|
5167 |
+ (eval echo "\"\$as_me:5169: $ac_compile\"" >&5) |
|
5168 | 5168 |
(eval "$ac_compile" 2>conftest.err) |
5169 | 5169 |
cat conftest.err >&5 |
5170 |
- (eval echo "\"\$as_me:5170: $NM \\\"conftest.$ac_objext\\\"\"" >&5) |
|
5170 |
+ (eval echo "\"\$as_me:5172: $NM \\\"conftest.$ac_objext\\\"\"" >&5) |
|
5171 | 5171 |
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) |
5172 | 5172 |
cat conftest.err >&5 |
5173 |
- (eval echo "\"\$as_me:5173: output\"" >&5) |
|
5173 |
+ (eval echo "\"\$as_me:5175: output\"" >&5) |
|
5174 | 5174 |
cat conftest.out >&5 |
5175 | 5175 |
if $GREP 'External.*some_variable' conftest.out > /dev/null; then |
5176 | 5176 |
lt_cv_nm_interface="MS dumpbin" |
... | ... |
@@ -6365,7 +6367,7 @@ ia64-*-hpux*) |
6365 | 6365 |
;; |
6366 | 6366 |
*-*-irix6*) |
6367 | 6367 |
# Find out which ABI we are using. |
6368 |
- echo '#line 6368 "configure"' > conftest.$ac_ext |
|
6368 |
+ echo '#line 6370 "configure"' > conftest.$ac_ext |
|
6369 | 6369 |
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
6370 | 6370 |
(eval $ac_compile) 2>&5 |
6371 | 6371 |
ac_status=$? |
... | ... |
@@ -7893,11 +7895,11 @@ else |
7893 | 7893 |
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
7894 | 7894 |
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |
7895 | 7895 |
-e 's:$: $lt_compiler_flag:'` |
7896 |
- (eval echo "\"\$as_me:7896: $lt_compile\"" >&5) |
|
7896 |
+ (eval echo "\"\$as_me:7898: $lt_compile\"" >&5) |
|
7897 | 7897 |
(eval "$lt_compile" 2>conftest.err) |
7898 | 7898 |
ac_status=$? |
7899 | 7899 |
cat conftest.err >&5 |
7900 |
- echo "$as_me:7900: \$? = $ac_status" >&5 |
|
7900 |
+ echo "$as_me:7902: \$? = $ac_status" >&5 |
|
7901 | 7901 |
if (exit $ac_status) && test -s "$ac_outfile"; then |
7902 | 7902 |
# The compiler can only warn and ignore the option if not recognized |
7903 | 7903 |
# So say no if there are warnings other than the usual output. |
... | ... |
@@ -8232,11 +8234,11 @@ else |
8232 | 8232 |
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
8233 | 8233 |
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |
8234 | 8234 |
-e 's:$: $lt_compiler_flag:'` |
8235 |
- (eval echo "\"\$as_me:8235: $lt_compile\"" >&5) |
|
8235 |
+ (eval echo "\"\$as_me:8237: $lt_compile\"" >&5) |
|
8236 | 8236 |
(eval "$lt_compile" 2>conftest.err) |
8237 | 8237 |
ac_status=$? |
8238 | 8238 |
cat conftest.err >&5 |
8239 |
- echo "$as_me:8239: \$? = $ac_status" >&5 |
|
8239 |
+ echo "$as_me:8241: \$? = $ac_status" >&5 |
|
8240 | 8240 |
if (exit $ac_status) && test -s "$ac_outfile"; then |
8241 | 8241 |
# The compiler can only warn and ignore the option if not recognized |
8242 | 8242 |
# So say no if there are warnings other than the usual output. |
... | ... |
@@ -8337,11 +8339,11 @@ else |
8337 | 8337 |
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
8338 | 8338 |
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |
8339 | 8339 |
-e 's:$: $lt_compiler_flag:'` |
8340 |
- (eval echo "\"\$as_me:8340: $lt_compile\"" >&5) |
|
8340 |
+ (eval echo "\"\$as_me:8342: $lt_compile\"" >&5) |
|
8341 | 8341 |
(eval "$lt_compile" 2>out/conftest.err) |
8342 | 8342 |
ac_status=$? |
8343 | 8343 |
cat out/conftest.err >&5 |
8344 |
- echo "$as_me:8344: \$? = $ac_status" >&5 |
|
8344 |
+ echo "$as_me:8346: \$? = $ac_status" >&5 |
|
8345 | 8345 |
if (exit $ac_status) && test -s out/conftest2.$ac_objext |
8346 | 8346 |
then |
8347 | 8347 |
# The compiler can only warn and ignore the option if not recognized |
... | ... |
@@ -8392,11 +8394,11 @@ else |
8392 | 8392 |
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
8393 | 8393 |
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |
8394 | 8394 |
-e 's:$: $lt_compiler_flag:'` |
8395 |
- (eval echo "\"\$as_me:8395: $lt_compile\"" >&5) |
|
8395 |
+ (eval echo "\"\$as_me:8397: $lt_compile\"" >&5) |
|
8396 | 8396 |
(eval "$lt_compile" 2>out/conftest.err) |
8397 | 8397 |
ac_status=$? |
8398 | 8398 |
cat out/conftest.err >&5 |
8399 |
- echo "$as_me:8399: \$? = $ac_status" >&5 |
|
8399 |
+ echo "$as_me:8401: \$? = $ac_status" >&5 |
|
8400 | 8400 |
if (exit $ac_status) && test -s out/conftest2.$ac_objext |
8401 | 8401 |
then |
8402 | 8402 |
# The compiler can only warn and ignore the option if not recognized |
... | ... |
@@ -10776,7 +10778,7 @@ else |
10776 | 10776 |
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
10777 | 10777 |
lt_status=$lt_dlunknown |
10778 | 10778 |
cat > conftest.$ac_ext <<_LT_EOF |
10779 |
-#line 10779 "configure" |
|
10779 |
+#line 10781 "configure" |
|
10780 | 10780 |
#include "confdefs.h" |
10781 | 10781 |
|
10782 | 10782 |
#if HAVE_DLFCN_H |
... | ... |
@@ -10872,7 +10874,7 @@ else |
10872 | 10872 |
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
10873 | 10873 |
lt_status=$lt_dlunknown |
10874 | 10874 |
cat > conftest.$ac_ext <<_LT_EOF |
10875 |
-#line 10875 "configure" |
|
10875 |
+#line 10877 "configure" |
|
10876 | 10876 |
#include "confdefs.h" |
10877 | 10877 |
|
10878 | 10878 |
#if HAVE_DLFCN_H |
... | ... |
@@ -11544,7 +11546,7 @@ else |
11544 | 11544 |
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
11545 | 11545 |
lt_status=$lt_dlunknown |
11546 | 11546 |
cat > conftest.$ac_ext <<_LT_EOF |
11547 |
-#line 11547 "configure" |
|
11547 |
+#line 11549 "configure" |
|
11548 | 11548 |
#include "confdefs.h" |
11549 | 11549 |
|
11550 | 11550 |
#if HAVE_DLFCN_H |
... | ... |
@@ -16454,6 +16456,25 @@ $as_echo "#define NDEBUG 1" >>confdefs.h |
16454 | 16454 |
|
16455 | 16455 |
fi |
16456 | 16456 |
|
16457 |
+# Check whether --enable-unsigned-bytecode was given. |
|
16458 |
+if test "${enable_unsigned_bytecode+set}" = set; then : |
|
16459 |
+ enableval=$enable_unsigned_bytecode; enable_unsigned-bytecode=$enableval |
|
16460 |
+else |
|
16461 |
+ enable_unsigned-bytecode="no" |
|
16462 |
+fi |
|
16463 |
+ |
|
16464 |
+ |
|
16465 |
+if test "$enable_unsigned-bc" = "yes"; then |
|
16466 |
+ VERSION_SUFFIX="$VERSION_SUFFIX-unsigned-bc" |
|
16467 |
+ |
|
16468 |
+$as_echo "#define CL_BCUNSIGNED 1" >>confdefs.h |
|
16469 |
+ |
|
16470 |
+else |
|
16471 |
+ |
|
16472 |
+$as_echo "#define CL_BCUNSIGNED 1" >>confdefs.h |
|
16473 |
+ |
|
16474 |
+fi |
|
16475 |
+ |
|
16457 | 16476 |
# Check whether --enable-no-cache was given. |
16458 | 16477 |
if test "${enable_no_cache+set}" = set; then : |
16459 | 16478 |
enableval=$enable_no_cache; enable_nocache=$enableval |
... | ... |
@@ -823,6 +823,17 @@ else |
823 | 823 |
AC_DEFINE([NDEBUG],1,[disable assertions]) |
824 | 824 |
fi |
825 | 825 |
|
826 |
+AC_ARG_ENABLE([unsigned-bytecode], |
|
827 |
+[ --enable-unsigned-bytecode enable load of unsigned bytecode], |
|
828 |
+enable_unsigned-bytecode=$enableval, enable_unsigned-bytecode="no") |
|
829 |
+ |
|
830 |
+if test "$enable_unsigned-bc" = "yes"; then |
|
831 |
+ VERSION_SUFFIX="$VERSION_SUFFIX-unsigned-bc" |
|
832 |
+ AC_DEFINE([CL_BCUNSIGNED],1,[enable loading of unsigned bytecode]) |
|
833 |
+else |
|
834 |
+ AC_DEFINE([CL_BCUNSIGNED],1,[disable loading of unsigned bytecode]) |
|
835 |
+fi |
|
836 |
+ |
|
826 | 837 |
AC_ARG_ENABLE([no-cache], |
827 | 838 |
[ --enable-no-cache use "Cache-Control: no-cache" in freshclam], |
828 | 839 |
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 |
1725 | 1725 |
memset(&ctx, 0, sizeof(ctx)); |
1726 | 1726 |
cli_bytecode_context_setfuncid(&ctx, bc, 0); |
1727 | 1727 |
ctx.hooks.match_counts = lsigcnt; |
1728 |
- ctx.ctx = cctx; |
|
1728 |
+ cli_bytecode_context_setctx(&ctx, cctx); |
|
1729 | 1729 |
cli_bytecode_context_setfile(&ctx, map); |
1730 | 1730 |
|
1731 | 1731 |
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 |
384 | 384 |
engine->keeptmp = num; |
385 | 385 |
break; |
386 | 386 |
case CL_ENGINE_BYTECODE_SECURITY: |
387 |
-#ifndef CL_DEBUG |
|
387 |
+#ifndef CL_BCUNSIGNED |
|
388 | 388 |
if (num == CL_BYTECODE_TRUST_ALL) { |
389 | 389 |
cli_errmsg("cl_engine_set_num: CL_BYTECODE_TRUST_ALL is only supported when ClamAV is built in debug mode\n"); |
390 | 390 |
return CL_EARG; |
... | ... |
@@ -1380,7 +1380,7 @@ static int cli_loadcbc(FILE *fs, struct cl_engine *engine, unsigned int *signo, |
1380 | 1380 |
if(!(engine->dconf->bytecode & BYTECODE_ENGINE_MASK)) { |
1381 | 1381 |
return CL_SUCCESS; |
1382 | 1382 |
} |
1383 |
-#ifndef CL_DEBUG |
|
1383 |
+#ifndef CL_BCUNSIGNED |
|
1384 | 1384 |
if (!(options & CL_DB_SIGNED)) { |
1385 | 1385 |
cli_warnmsg("Only loading signed bytecode, skipping load of unsigned bytecode!\n"); |
1386 | 1386 |
return CL_SUCCESS; |
... | ... |
@@ -23,6 +23,9 @@ |
23 | 23 |
/* enable clamuko */ |
24 | 24 |
/* #undef CLAMUKO */ |
25 | 25 |
|
26 |
+/* disable loading of unsigned bytecode */ |
|
27 |
+/* #undef CL_BCUNSIGNED */ |
|
28 |
+ |
|
26 | 29 |
/* enable debugging */ |
27 | 30 |
/* #undef CL_DEBUG */ |
28 | 31 |
|
... | ... |
@@ -493,7 +496,7 @@ |
493 | 493 |
/* #undef USE_SYSLOG */ |
494 | 494 |
|
495 | 495 |
/* Version number of package */ |
496 |
-#define VERSION "devel-clamav-0.96rc1-19-gc491083" |
|
496 |
+#define VERSION "devel-clamav-0.96rc1-54-g96fb6ef" |
|
497 | 497 |
|
498 | 498 |
/* Version suffix for package */ |
499 | 499 |
#define VERSION_SUFFIX "" |