[-]
[+]
|
Changed |
clamav.changes
|
|
[-]
[+]
|
Changed |
clamav.spec
^
|
|
[-]
[+]
|
Deleted |
clamav-0.97.3.tar.bz2/shared/Makefile
^
|
@@ -1,644 +0,0 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
-# shared/Makefile. Generated from Makefile.in by configure.
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-
-
-pkgdatadir = $(datadir)/clamav
-pkgincludedir = $(includedir)/clamav
-pkglibdir = $(libdir)/clamav
-pkglibexecdir = $(libexecdir)/clamav
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = x86_64-unknown-linux-gnu
-host_triplet = x86_64-unknown-linux-gnu
-target_triplet = x86_64-unknown-linux-gnu
-subdir = shared
-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/argz.m4 \
- $(top_srcdir)/m4/ax_check_uname_syscall.m4 \
- $(top_srcdir)/m4/fdpassing.m4 $(top_srcdir)/m4/lib-ld.m4 \
- $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/llvm.m4 \
- $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
- $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
- $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/clamav-config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-libshared_la_LIBADD =
-am_libshared_la_OBJECTS = actions.lo cdiff.lo clamdcom.lo getopt.lo \
- misc.lo optparser.lo tar.lo
-libshared_la_OBJECTS = $(am_libshared_la_OBJECTS)
-AM_V_lt = $(am__v_lt_$(V))
-am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
-am__v_lt_0 = --silent
-libshared_minimal_la_DEPENDENCIES = libshared.la
-am_libshared_minimal_la_OBJECTS = libshared_minimal_la-output.lo
-libshared_minimal_la_OBJECTS = $(am_libshared_minimal_la_OBJECTS)
-libshared_minimal_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(libshared_minimal_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
-libshared_minimal_threads_la_DEPENDENCIES = libshared.la
-am_libshared_minimal_threads_la_OBJECTS = output.lo
-libshared_minimal_threads_la_OBJECTS = \
- $(am_libshared_minimal_threads_la_OBJECTS)
-libshared_nothreads_la_DEPENDENCIES = libshared.la
-am_libshared_nothreads_la_OBJECTS = libshared_nothreads_la-output.lo \
- libshared_nothreads_la-misc_libclamav.lo
-libshared_nothreads_la_OBJECTS = $(am_libshared_nothreads_la_OBJECTS)
-libshared_nothreads_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(libshared_nothreads_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
-libshared_threads_la_DEPENDENCIES = libshared.la
-am_libshared_threads_la_OBJECTS = output.lo misc_libclamav.lo
-libshared_threads_la_OBJECTS = $(am_libshared_threads_la_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/config/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_$(V))
-am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
-am__v_CC_0 = @echo " CC " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
-am__v_at_0 = @
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_$(V))
-am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
-am__v_CCLD_0 = @echo " CCLD " $@;
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
-am__v_GEN_0 = @echo " GEN " $@;
-SOURCES = $(libshared_la_SOURCES) $(libshared_minimal_la_SOURCES) \
- $(libshared_minimal_threads_la_SOURCES) \
- $(libshared_nothreads_la_SOURCES) \
- $(libshared_threads_la_SOURCES)
-DIST_SOURCES = $(libshared_la_SOURCES) $(libshared_minimal_la_SOURCES) \
- $(libshared_minimal_threads_la_SOURCES) \
- $(libshared_nothreads_la_SOURCES) \
- $(libshared_threads_la_SOURCES)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /home/zolw/ClamAV/clamav-devel/config/missing --run aclocal-1.11
-AMTAR = ${SHELL} /home/zolw/ClamAV/clamav-devel/config/missing --run tar
-AM_DEFAULT_VERBOSITY = 0
-AR = ar
-ARGZ_H =
-AUTOCONF = ${SHELL} /home/zolw/ClamAV/clamav-devel/config/missing --run autoconf
-AUTOHEADER = ${SHELL} /home/zolw/ClamAV/clamav-devel/config/missing --run autoheader
-AUTOMAKE = ${SHELL} /home/zolw/ClamAV/clamav-devel/config/missing --run automake-1.11
-AWK = mawk
-BUILD_CONFIGURE_FLAGS =
-CC = gcc
-CCDEPMODE = depmode=gcc3
-CFGDIR = /usr/local/etc
-CFLAGS = -g -O2 -fno-strict-aliasing
-CHECK_CPPFLAGS =
-CHECK_LIBS = -lcheck
-CLAMAVGROUP = clamav
-CLAMAVUSER = clamav
-CLAMAV_MILTER_LIBS =
-CLAMDSCAN_LIBS =
-CLAMD_LIBS =
-CPP = gcc -E
-CPPFLAGS =
-CURSES_CPPFLAGS =
-CURSES_LIBS = -lncurses
-CYGPATH_W = echo
-DBDIR = /usr/local/share/clamav
-DEFS = -DHAVE_CONFIG_H
-DEPDIR = .deps
-DLLTOOL = false
-DSYMUTIL =
-DUMPBIN =
-ECHO_C =
-ECHO_N = -n
-ECHO_T =
-EGREP = /bin/grep -E
-EXEEXT =
-FGREP = /bin/grep -F
-FRESHCLAM_LIBS = -lz -lresolv
-GCOV =
-GENHTML =
-GETENT =
-GPERF = ${SHELL} /home/zolw/ClamAV/clamav-devel/config/missing --run gperf
-GREP = /bin/grep
-INCLTDL =
-INSTALL = /usr/bin/install -c
-INSTALL_DATA = ${INSTALL} -m 644
-INSTALL_PROGRAM = ${INSTALL}
-INSTALL_SCRIPT = ${INSTALL}
-INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
-LCOV =
-LD = /usr/bin/ld -m elf_x86_64
-LDFLAGS =
-LIBADD_DL = -ldl
-LIBADD_DLD_LINK =
-LIBADD_DLOPEN = -ldl
-LIBADD_SHL_LOAD =
-LIBBZ2 = -lbz2
-LIBBZ2_PREFIX =
-LIBCLAMAV_LIBS = -lz -lbz2
-LIBCLAMAV_VERSION = 7:9:1
-LIBLTDL = -lltdl
-LIBM = -lm
-LIBOBJS =
-LIBS = -ldl
-LIBTOOL = $(SHELL) $(top_builddir)/libtool
-LIPO =
-LN_S = ln -s
-LTDLDEPS =
-LTDLINCL =
-LTDLOPEN = libltdl
-LTLIBBZ2 = -lbz2
-LTLIBOBJS =
-LT_CONFIG_H = clamav-config.h
-LT_DLLOADERS = dlopen.la
-LT_DLPREOPEN = -dlpreopen dlopen.la
-MAINT = #
-MAKEINFO = ${SHELL} /home/zolw/ClamAV/clamav-devel/config/missing --run makeinfo
-MANIFEST_TOOL = :
-MKDIR_P = /bin/mkdir -p
-NM = /usr/bin/nm -B
-NMEDIT =
-OBJDUMP = objdump
-OBJEXT = o
-OTOOL =
-OTOOL64 =
-PACKAGE = clamav
-PACKAGE_BUGREPORT = http://bugs.clamav.net/
-PACKAGE_NAME = ClamAV
-PACKAGE_STRING = ClamAV devel
-PACKAGE_TARNAME = clamav
-PACKAGE_URL = http://www.clamav.net/
-PACKAGE_VERSION = devel
-PATH_SEPARATOR = :
-RANLIB = ranlib
-SED = /bin/sed
-SET_MAKE =
-SHELL = /bin/bash
-STRIP = strip
-THREAD_LIBS = -lpthread
-TH_SAFE = -thread-safe
-VERSION = devel-20110414
-VERSIONSCRIPTFLAG = --version-script
-WERR_CFLAGS =
-WERR_CFLAGS_MILTER =
-abs_builddir = /home/zolw/ClamAV/clamav-devel/shared
-abs_srcdir = /home/zolw/ClamAV/clamav-devel/shared
-abs_top_builddir = /home/zolw/ClamAV/clamav-devel
-abs_top_srcdir = /home/zolw/ClamAV/clamav-devel
-ac_ct_AR = ar
-ac_ct_CC = gcc
-ac_ct_DUMPBIN =
-am__include = include
-am__leading_dot = .
-am__quote =
-am__tar = tar --format=ustar -chf - "$$tardir"
-am__untar = tar -xf -
-bindir = ${exec_prefix}/bin
-build = x86_64-unknown-linux-gnu
-build_alias =
-build_cpu = x86_64
-build_os = linux-gnu
-build_vendor = unknown
-builddir = .
-datadir = ${datarootdir}
-datarootdir = ${prefix}/share
-docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
-dvidir = ${docdir}
-exec_prefix = ${prefix}
-host = x86_64-unknown-linux-gnu
-host_alias =
-host_cpu = x86_64
-host_os = linux-gnu
-host_vendor = unknown
-htmldir = ${docdir}
-includedir = ${prefix}/include
-infodir = ${datarootdir}/info
-install_sh = ${SHELL} /home/zolw/ClamAV/clamav-devel/config/install-sh
-libdir = ${exec_prefix}/lib
-libexecdir = ${exec_prefix}/libexec
-localedir = ${datarootdir}/locale
-localstatedir = ${prefix}/var
-ltdl_LIBOBJS = lt__strl.o
-ltdl_LTLIBOBJS = lt__strl.lo
-mandir = ${datarootdir}/man
-mkdir_p = /bin/mkdir -p
-oldincludedir = /usr/include
-pdfdir = ${docdir}
-prefix = /usr/local
-program_transform_name = s,x,x,
-psdir = ${docdir}
-sbindir = ${exec_prefix}/sbin
-sharedstatedir = ${prefix}/com
-srcdir = .
-subdirs = libclamav/c++
-sys_symbol_underscore = no
-sysconfdir = ${prefix}/etc
-target = x86_64-unknown-linux-gnu
-target_alias =
-target_cpu = x86_64
-target_os = linux-gnu
-target_vendor = unknown
-top_build_prefix = ../
-top_builddir = ..
-top_srcdir = ..
-AM_CPPFLAGS = -I$(top_srcdir)
-libshared_la_SOURCES = actions.c\
- cdiff.c\
- clamdcom.c\
- getopt.c\
- misc.c\
- optparser.c\
- tar.c
-
-libshared_threads_la_SOURCES = output.c\
- misc_libclamav.c
-
-libshared_threads_la_LIBADD = libshared.la
-libshared_nothreads_la_SOURCES = output.c\
- misc_libclamav.c
-
-libshared_nothreads_la_LIBADD = libshared.la
-libshared_nothreads_la_CFLAGS = -DCL_NOTHREADS
-libshared_minimal_la_SOURCES = output.c
-libshared_minimal_la_LIBADD = libshared.la
-libshared_minimal_la_CFLAGS = -DCL_NOTHREADS
-libshared_minimal_threads_la_SOURCES = output.c
-libshared_minimal_threads_la_LIBADD = libshared.la
-noinst_LTLIBRARIES = libshared.la libshared_threads.la libshared_nothreads.la libshared_minimal.la libshared_minimal_threads.la
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign shared/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --foreign shared/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: # $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
- @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
-libshared.la: $(libshared_la_OBJECTS) $(libshared_la_DEPENDENCIES)
- $(AM_V_CCLD)$(LINK) $(libshared_la_OBJECTS) $(libshared_la_LIBADD) $(LIBS)
-libshared_minimal.la: $(libshared_minimal_la_OBJECTS) $(libshared_minimal_la_DEPENDENCIES)
- $(AM_V_CCLD)$(libshared_minimal_la_LINK) $(libshared_minimal_la_OBJECTS) $(libshared_minimal_la_LIBADD) $(LIBS)
-libshared_minimal_threads.la: $(libshared_minimal_threads_la_OBJECTS) $(libshared_minimal_threads_la_DEPENDENCIES)
- $(AM_V_CCLD)$(LINK) $(libshared_minimal_threads_la_OBJECTS) $(libshared_minimal_threads_la_LIBADD) $(LIBS)
-libshared_nothreads.la: $(libshared_nothreads_la_OBJECTS) $(libshared_nothreads_la_DEPENDENCIES)
- $(AM_V_CCLD)$(libshared_nothreads_la_LINK) $(libshared_nothreads_la_OBJECTS) $(libshared_nothreads_la_LIBADD) $(LIBS)
-libshared_threads.la: $(libshared_threads_la_OBJECTS) $(libshared_threads_la_DEPENDENCIES)
- $(AM_V_CCLD)$(LINK) $(libshared_threads_la_OBJECTS) $(libshared_threads_la_LIBADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-include ./$(DEPDIR)/actions.Plo
-include ./$(DEPDIR)/cdiff.Plo
-include ./$(DEPDIR)/clamdcom.Plo
-include ./$(DEPDIR)/getopt.Plo
-include ./$(DEPDIR)/libshared_minimal_la-output.Plo
-include ./$(DEPDIR)/libshared_nothreads_la-misc_libclamav.Plo
-include ./$(DEPDIR)/libshared_nothreads_la-output.Plo
-include ./$(DEPDIR)/misc.Plo
-include ./$(DEPDIR)/misc_libclamav.Plo
-include ./$(DEPDIR)/optparser.Plo
-include ./$(DEPDIR)/output.Plo
-include ./$(DEPDIR)/tar.Plo
-
-.c.o:
- $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
- $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
- $(am__mv) $$depbase.Tpo $$depbase.Po
-# $(AM_V_CC) \
-# source='$<' object='$@' libtool=no \
-# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-# $(COMPILE) -c -o $@ $<
-
-.c.obj:
- $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
- $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
- $(am__mv) $$depbase.Tpo $$depbase.Po
-# $(AM_V_CC) \
-# source='$<' object='$@' libtool=no \
-# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-# $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.c.lo:
- $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
- $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
- $(am__mv) $$depbase.Tpo $$depbase.Plo
-# $(AM_V_CC) \
-# source='$<' object='$@' libtool=yes \
-# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-# $(LTCOMPILE) -c -o $@ $<
-
-libshared_minimal_la-output.lo: output.c
- $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libshared_minimal_la_CFLAGS) $(CFLAGS) -MT libshared_minimal_la-output.lo -MD -MP -MF $(DEPDIR)/libshared_minimal_la-output.Tpo -c -o libshared_minimal_la-output.lo `test -f 'output.c' || echo '$(srcdir)/'`output.c
- $(AM_V_at)$(am__mv) $(DEPDIR)/libshared_minimal_la-output.Tpo $(DEPDIR)/libshared_minimal_la-output.Plo
-# $(AM_V_CC) \
-# source='output.c' object='libshared_minimal_la-output.lo' libtool=yes \
-# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-# $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libshared_minimal_la_CFLAGS) $(CFLAGS) -c -o libshared_minimal_la-output.lo `test -f 'output.c' || echo '$(srcdir)/'`output.c
-
-libshared_nothreads_la-output.lo: output.c
- $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libshared_nothreads_la_CFLAGS) $(CFLAGS) -MT libshared_nothreads_la-output.lo -MD -MP -MF $(DEPDIR)/libshared_nothreads_la-output.Tpo -c -o libshared_nothreads_la-output.lo `test -f 'output.c' || echo '$(srcdir)/'`output.c
- $(AM_V_at)$(am__mv) $(DEPDIR)/libshared_nothreads_la-output.Tpo $(DEPDIR)/libshared_nothreads_la-output.Plo
-# $(AM_V_CC) \
-# source='output.c' object='libshared_nothreads_la-output.lo' libtool=yes \
-# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-# $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libshared_nothreads_la_CFLAGS) $(CFLAGS) -c -o libshared_nothreads_la-output.lo `test -f 'output.c' || echo '$(srcdir)/'`output.c
-
-libshared_nothreads_la-misc_libclamav.lo: misc_libclamav.c
- $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libshared_nothreads_la_CFLAGS) $(CFLAGS) -MT libshared_nothreads_la-misc_libclamav.lo -MD -MP -MF $(DEPDIR)/libshared_nothreads_la-misc_libclamav.Tpo -c -o libshared_nothreads_la-misc_libclamav.lo `test -f 'misc_libclamav.c' || echo '$(srcdir)/'`misc_libclamav.c
- $(AM_V_at)$(am__mv) $(DEPDIR)/libshared_nothreads_la-misc_libclamav.Tpo $(DEPDIR)/libshared_nothreads_la-misc_libclamav.Plo
-# $(AM_V_CC) \
-# source='misc_libclamav.c' object='libshared_nothreads_la-misc_libclamav.lo' libtool=yes \
-# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-# $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libshared_nothreads_la_CFLAGS) $(CFLAGS) -c -o libshared_nothreads_la-misc_libclamav.lo `test -f 'misc_libclamav.c' || echo '$(srcdir)/'`misc_libclamav.c
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- set x; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(LTLIBRARIES)
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
- mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libtool clean-noinstLTLIBRARIES ctags distclean \
- distclean-compile distclean-generic distclean-libtool \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
|
[-]
[+]
|
Deleted |
clamav-0.97.3.tar.bz2/shared/actions.lo
^
|
@@ -1,12 +0,0 @@
-# actions.lo - a libtool object file
-# Generated by libtool (GNU libtool) 2.4 Debian-2.4-2
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object='.libs/actions.o'
-
-# Name of the non-PIC object
-non_pic_object=none
-
|
[-]
[+]
|
Deleted |
clamav-0.97.3.tar.bz2/shared/cdiff.lo
^
|
@@ -1,12 +0,0 @@
-# cdiff.lo - a libtool object file
-# Generated by libtool (GNU libtool) 2.4 Debian-2.4-2
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object='.libs/cdiff.o'
-
-# Name of the non-PIC object
-non_pic_object=none
-
|
[-]
[+]
|
Deleted |
clamav-0.97.3.tar.bz2/shared/clamdcom.lo
^
|
@@ -1,12 +0,0 @@
-# clamdcom.lo - a libtool object file
-# Generated by libtool (GNU libtool) 2.4 Debian-2.4-2
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object='.libs/clamdcom.o'
-
-# Name of the non-PIC object
-non_pic_object=none
-
|
[-]
[+]
|
Deleted |
clamav-0.97.3.tar.bz2/shared/getopt.lo
^
|
@@ -1,12 +0,0 @@
-# getopt.lo - a libtool object file
-# Generated by libtool (GNU libtool) 2.4 Debian-2.4-2
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object='.libs/getopt.o'
-
-# Name of the non-PIC object
-non_pic_object=none
-
|
[-]
[+]
|
Deleted |
clamav-0.97.3.tar.bz2/shared/libshared.la
^
|
@@ -1,41 +0,0 @@
-# libshared.la - a libtool library file
-# Generated by libtool (GNU libtool) 2.4 Debian-2.4-2
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# The name that we can dlopen(3).
-dlname=''
-
-# Names of this library.
-library_names=''
-
-# The name of the static archive.
-old_library='libshared.a'
-
-# Linker flags that can not go in dependency_libs.
-inherited_linker_flags=''
-
-# Libraries that this one depends upon.
-dependency_libs=' -ldl'
-
-# Names of additional weak libraries provided by this library
-weak_library_names=''
-
-# Version information for libshared.
-current=
-age=
-revision=
-
-# Is this an already installed library?
-installed=no
-
-# Should we warn about portability when linking against -modules?
-shouldnotlink=no
-
-# Files to dlopen/dlpreopen
-dlopen=''
-dlpreopen=''
-
-# Directory that this library needs to be installed in:
-libdir=''
|
[-]
[+]
|
Deleted |
clamav-0.97.3.tar.bz2/shared/libshared_minimal.la
^
|
@@ -1,41 +0,0 @@
-# libshared_minimal.la - a libtool library file
-# Generated by libtool (GNU libtool) 2.4 Debian-2.4-2
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# The name that we can dlopen(3).
-dlname=''
-
-# Names of this library.
-library_names=''
-
-# The name of the static archive.
-old_library='libshared_minimal.a'
-
-# Linker flags that can not go in dependency_libs.
-inherited_linker_flags=''
-
-# Libraries that this one depends upon.
-dependency_libs=' -ldl'
-
-# Names of additional weak libraries provided by this library
-weak_library_names=''
-
-# Version information for libshared_minimal.
-current=
-age=
-revision=
-
-# Is this an already installed library?
-installed=no
-
-# Should we warn about portability when linking against -modules?
-shouldnotlink=no
-
-# Files to dlopen/dlpreopen
-dlopen=''
-dlpreopen=''
-
-# Directory that this library needs to be installed in:
-libdir=''
|
[-]
[+]
|
Deleted |
clamav-0.97.3.tar.bz2/shared/libshared_minimal_la-output.lo
^
|
@@ -1,12 +0,0 @@
-# libshared_minimal_la-output.lo - a libtool object file
-# Generated by libtool (GNU libtool) 2.4 Debian-2.4-2
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object='.libs/libshared_minimal_la-output.o'
-
-# Name of the non-PIC object
-non_pic_object=none
-
|
[-]
[+]
|
Deleted |
clamav-0.97.3.tar.bz2/shared/libshared_minimal_threads.la
^
|
@@ -1,41 +0,0 @@
-# libshared_minimal_threads.la - a libtool library file
-# Generated by libtool (GNU libtool) 2.4 Debian-2.4-2
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# The name that we can dlopen(3).
-dlname=''
-
-# Names of this library.
-library_names=''
-
-# The name of the static archive.
-old_library='libshared_minimal_threads.a'
-
-# Linker flags that can not go in dependency_libs.
-inherited_linker_flags=''
-
-# Libraries that this one depends upon.
-dependency_libs=' -ldl'
-
-# Names of additional weak libraries provided by this library
-weak_library_names=''
-
-# Version information for libshared_minimal_threads.
-current=
-age=
-revision=
-
-# Is this an already installed library?
-installed=no
-
-# Should we warn about portability when linking against -modules?
-shouldnotlink=no
-
-# Files to dlopen/dlpreopen
-dlopen=''
-dlpreopen=''
-
-# Directory that this library needs to be installed in:
-libdir=''
|
[-]
[+]
|
Deleted |
clamav-0.97.3.tar.bz2/shared/libshared_nothreads.la
^
|
@@ -1,41 +0,0 @@
-# libshared_nothreads.la - a libtool library file
-# Generated by libtool (GNU libtool) 2.4 Debian-2.4-2
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# The name that we can dlopen(3).
-dlname=''
-
-# Names of this library.
-library_names=''
-
-# The name of the static archive.
-old_library='libshared_nothreads.a'
-
-# Linker flags that can not go in dependency_libs.
-inherited_linker_flags=''
-
-# Libraries that this one depends upon.
-dependency_libs=' -ldl'
-
-# Names of additional weak libraries provided by this library
-weak_library_names=''
-
-# Version information for libshared_nothreads.
-current=
-age=
-revision=
-
-# Is this an already installed library?
-installed=no
-
-# Should we warn about portability when linking against -modules?
-shouldnotlink=no
-
-# Files to dlopen/dlpreopen
-dlopen=''
-dlpreopen=''
-
-# Directory that this library needs to be installed in:
-libdir=''
|
[-]
[+]
|
Deleted |
clamav-0.97.3.tar.bz2/shared/libshared_nothreads_la-misc_libclamav.lo
^
|
@@ -1,12 +0,0 @@
-# libshared_nothreads_la-misc_libclamav.lo - a libtool object file
-# Generated by libtool (GNU libtool) 2.4 Debian-2.4-2
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object='.libs/libshared_nothreads_la-misc_libclamav.o'
-
-# Name of the non-PIC object
-non_pic_object=none
-
|
[-]
[+]
|
Deleted |
clamav-0.97.3.tar.bz2/shared/libshared_nothreads_la-output.lo
^
|
@@ -1,12 +0,0 @@
-# libshared_nothreads_la-output.lo - a libtool object file
-# Generated by libtool (GNU libtool) 2.4 Debian-2.4-2
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object='.libs/libshared_nothreads_la-output.o'
-
-# Name of the non-PIC object
-non_pic_object=none
-
|
[-]
[+]
|
Deleted |
clamav-0.97.3.tar.bz2/shared/libshared_threads.la
^
|
@@ -1,41 +0,0 @@
-# libshared_threads.la - a libtool library file
-# Generated by libtool (GNU libtool) 2.4 Debian-2.4-2
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# The name that we can dlopen(3).
-dlname=''
-
-# Names of this library.
-library_names=''
-
-# The name of the static archive.
-old_library='libshared_threads.a'
-
-# Linker flags that can not go in dependency_libs.
-inherited_linker_flags=''
-
-# Libraries that this one depends upon.
-dependency_libs=' -ldl'
-
-# Names of additional weak libraries provided by this library
-weak_library_names=''
-
-# Version information for libshared_threads.
-current=
-age=
-revision=
-
-# Is this an already installed library?
-installed=no
-
-# Should we warn about portability when linking against -modules?
-shouldnotlink=no
-
-# Files to dlopen/dlpreopen
-dlopen=''
-dlpreopen=''
-
-# Directory that this library needs to be installed in:
-libdir=''
|
[-]
[+]
|
Deleted |
clamav-0.97.3.tar.bz2/shared/misc.lo
^
|
@@ -1,12 +0,0 @@
-# misc.lo - a libtool object file
-# Generated by libtool (GNU libtool) 2.4 Debian-2.4-2
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object='.libs/misc.o'
-
-# Name of the non-PIC object
-non_pic_object=none
-
|
[-]
[+]
|
Deleted |
clamav-0.97.3.tar.bz2/shared/misc_libclamav.lo
^
|
@@ -1,12 +0,0 @@
-# misc_libclamav.lo - a libtool object file
-# Generated by libtool (GNU libtool) 2.4 Debian-2.4-2
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object='.libs/misc_libclamav.o'
-
-# Name of the non-PIC object
-non_pic_object=none
-
|
[-]
[+]
|
Deleted |
clamav-0.97.3.tar.bz2/shared/optparser.lo
^
|
@@ -1,12 +0,0 @@
-# optparser.lo - a libtool object file
-# Generated by libtool (GNU libtool) 2.4 Debian-2.4-2
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object='.libs/optparser.o'
-
-# Name of the non-PIC object
-non_pic_object=none
-
|
[-]
[+]
|
Deleted |
clamav-0.97.3.tar.bz2/shared/output.lo
^
|
@@ -1,12 +0,0 @@
-# output.lo - a libtool object file
-# Generated by libtool (GNU libtool) 2.4 Debian-2.4-2
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object='.libs/output.o'
-
-# Name of the non-PIC object
-non_pic_object=none
-
|
[-]
[+]
|
Deleted |
clamav-0.97.3.tar.bz2/shared/tar.lo
^
|
@@ -1,12 +0,0 @@
-# tar.lo - a libtool object file
-# Generated by libtool (GNU libtool) 2.4 Debian-2.4-2
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object='.libs/tar.o'
-
-# Name of the non-PIC object
-non_pic_object=none
-
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/ChangeLog
^
|
@@ -1,3 +1,51 @@
+Wed Mar 14 22:52:48 CET 2012 (tk)
+---------------------------------
+ * V 0.97.4
+
+Wed Feb 29 18:35:45 CET 2012 (acab)
+-----------------------------------
+ * libclamav/bytecode.c: reset to BYTECODE_AUTO mode at db reload so that
+ we don't fail to re-enable or re-disable it again
+ (bb#3789)
+
+Tue Jan 17 11:15:57 CET 2012 (acab)
+-----------------------------------
+ * misc: performance improvement for HP-UX PA-RISC - patch from
+ Michael Pelletier <michael.v.pelletier*raytheon.com> (bb#3926)
+
+Fri Nov 4 00:52:21 CET 2011 (acab)
+-----------------------------------
+ * libclamav/pe.c: parse vinfo where varfileinfo occours before stringfileinfo
+ (bb#3062)
+
+Fri Mar 2 19:48:36 CET 2012 (tk)
+---------------------------------
+ * clamd: add support for on-access scanning on OS X with ClamAuth (beta)
+
+Wed Feb 29 17:02:18 EET 2012 (edwin)
+------------------------------------
+ * libclamav/bytecode_api*: Fix Sparc crash (bb #4324)
+
+Tue Feb 7 23:23:48 CET 2012 (tk)
+---------------------------------
+ * libclamav: fix bytecode whitelisting
+
+Wed Jan 25 18:56:44 CET 2012 (tk)
+---------------------------------
+ * libclamav: fix macro detection in OLE2BlockMacros (bb#4269)
+
+Thu Dec 1 15:07:49 CET 2011 (tk)
+---------------------------------
+ * libclamav/readdb.c: allow comments in all db files (bb#3930)
+
+Fri Nov 18 15:23:50 CET 2011 (tk)
+---------------------------------
+ * libclamav/scanners.c: use lsigs when scanning vba data (bb#3922)
+
+Fri Nov 18 15:48:59 EET 2011 (edwin)
+-----------------------------------
+ * libclamav/matcher-hash.c: Fix SIGBUS on PA-RISC (big-endian) architectures (bb #3894).
+
Mon Oct 17 18:04:30 CEST 2011 (tk)
----------------------------------
* V 0.97.3
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/NEWS
^
|
@@ -1,8 +1,9 @@
-0.97.3
+0.97.4
------
-ClamAV 0.97.3 is a minor bugfix release and is recommended for all users.
-Please refer to the ChangeLog file for details.
+ClamAV 0.97.4 includes minor bugfixes, detection improvements and initial
+support for on-access scanning under Mac OS X (see contrib/ClamAuth).
+This update is recommended for all users.
--
The ClamAV team (http://www.clamav.net/team)
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/README
^
|
@@ -2,6 +2,17 @@
here may not be available in binary packages.
--
+0.97.4
+------
+
+ClamAV 0.97.4 includes minor bugfixes, detection improvements and initial
+support for on-access scanning under Mac OS X (see contrib/ClamAuth).
+This update is recommended for all users.
+
+--
+The ClamAV team (http://www.clamav.net/team)
+
+
0.97.3
------
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/clamav-config.h.in
^
|
@@ -12,6 +12,9 @@
/* "build clamd" */
#undef BUILD_CLAMD
+/* enable ClamAuth */
+#undef CLAMAUTH
+
/* name of the clamav group */
#undef CLAMAVGROUP
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/clamd/clamuko.c
^
|
@@ -231,4 +231,142 @@
return clamukofsth(arg);
}
+#elif defined(CLAMAUTH)
+
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/uio.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <pthread.h>
+#include <string.h>
+#include <errno.h>
+
+#include "libclamav/clamav.h"
+#include "libclamav/scanners.h"
+
+#include "shared/optparser.h"
+#include "shared/output.h"
+
+#include "server.h"
+#include "others.h"
+#include "scanner.h"
+
+#define SUPPORTED_PROTOCOL 2
+
+static int cauth_fd = -1;
+
+struct ClamAuthEvent {
+ unsigned int action;
+ char path[1024];
+ unsigned int pid;
+};
+
+static void cauth_exit(int sig)
+{
+ logg("*ClamAuth: cauth_exit(), signal %d\n", sig);
+ if(cauth_fd > 0)
+ close(cauth_fd);
+ pthread_exit(NULL);
+ logg("ClamAuth: stopped\n");
+}
+
+static int cauth_scanfile(const char *fname, int extinfo, struct thrarg *tharg)
+{
+ struct cb_context context;
+ const char *virname;
+ int ret = 0, fd;
+
+ context.filename = fname;
+ context.virsize = 0;
+
+ fd = open(fname, O_RDONLY);
+ if(fd == -1)
+ return -1;
+
+ if(cl_scandesc_callback(fd, &virname, NULL, tharg->engine, tharg->options, &context) == CL_VIRUS) {
+ if(context.virsize)
+ detstats_add(virname, fname, context.virsize, context.virhash);
+ if(extinfo && context.virsize)
+ logg("ClamAuth: %s: %s(%s:%llu) FOUND\n", fname, virname, context.virhash, context.virsize);
+ else
+ logg("ClamAuth: %s: %s FOUND\n", fname, virname);
+ virusaction(fname, virname, tharg->opts);
+ }
+ close(fd);
+ return ret;
+}
+
+void *clamukoth(void *arg)
+{
+ struct thrarg *tharg = (struct thrarg *) arg;
+ sigset_t sigset;
+ struct sigaction act;
+ int eventcnt = 1, extinfo;
+ char err[128];
+ struct ClamAuthEvent event;
+
+ /* ignore all signals except SIGUSR1 */
+ sigfillset(&sigset);
+ sigdelset(&sigset, SIGUSR1);
+ /* The behavior of a process is undefined after it ignores a
+ * SIGFPE, SIGILL, SIGSEGV, or SIGBUS signal */
+ sigdelset(&sigset, SIGFPE);
+ sigdelset(&sigset, SIGILL);
+ sigdelset(&sigset, SIGSEGV);
+#ifdef SIGBUS
+ sigdelset(&sigset, SIGBUS);
+#endif
+ pthread_sigmask(SIG_SETMASK, &sigset, NULL);
+ memset(&act, 0, sizeof(struct sigaction));
+ act.sa_handler = cauth_exit;
+ sigfillset(&(act.sa_mask));
+ sigaction(SIGUSR1, &act, NULL);
+ sigaction(SIGSEGV, &act, NULL);
+
+ extinfo = optget(tharg->opts, "ExtendedDetectionInfo")->enabled;
+
+ cauth_fd = open("/dev/clamauth", O_RDONLY);
+ if(cauth_fd == -1) {
+ logg("!ClamAuth: Can't open /dev/clamauth\n");
+ if(errno == ENOENT)
+ logg("!ClamAuth: Please make sure ClamAuth.kext is loaded\n");
+ else if(errno == EACCES)
+ logg("!ClamAuth: This application requires root privileges\n");
+ else
+ logg("!ClamAuth: /dev/clamauth: %s\n", cli_strerror(errno, err, sizeof(err)));
+
+ return NULL;
+ }
+
+ while(1) {
+ if(read(cauth_fd, &event, sizeof(event)) > 0) {
+ if(eventcnt == 1) {
+ if(event.action != SUPPORTED_PROTOCOL) {
+ logg("!ClamAuth: Protocol version mismatch (tool: %d, driver: %d)\n", SUPPORTED_PROTOCOL, event.action);
+ close(cauth_fd);
+ return NULL;
+ }
+ if(strncmp(event.path, "ClamAuth", 8)) {
+ logg("!ClamAuth: Invalid version event\n");
+ close(cauth_fd);
+ return NULL;
+ }
+ logg("ClamAuth: Driver version: %s, protocol version: %d\n", &event.path[9], event.action);
+ } else {
+ cauth_scanfile(event.path, extinfo, tharg);
+ }
+ eventcnt++;
+ } else {
+ if(errno == ENODEV) {
+ printf("^ClamAuth: ClamAuth module deactivated, terminating\n");
+ close(cauth_fd);
+ return NULL;
+ }
+ }
+ usleep(200);
+ }
+}
#endif
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/clamd/clamuko.h
^
|
@@ -18,7 +18,7 @@
* MA 02110-1301, USA.
*/
-#ifdef CLAMUKO
+#if defined(CLAMUKO) || defined(CLAMAUTH)
#ifndef __CLAMUKO_H
#define __CLAMUKO_H
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/clamd/server-th.c
^
|
@@ -709,7 +709,7 @@
unsigned int selfchk;
threadpool_t *thr_pool;
-#ifdef CLAMUKO
+#if defined(CLAMUKO) || defined(CLAMAUTH)
pthread_t clamuko_pid;
pthread_attr_t clamuko_attr;
struct thrarg *tharg = NULL; /* shut up gcc */
@@ -1004,8 +1004,8 @@
logg("*MaxQueue set to: %d\n", max_queue);
acceptdata.max_queue = max_queue;
- if(optget(opts, "ClamukoScanOnAccess")->enabled)
-#ifdef CLAMUKO
+ if(optget(opts, "ClamukoScanOnAccess")->enabled || optget(opts, "ClamAuth")->enabled)
+#if defined(CLAMUKO) || defined(CLAMAUTH)
{
do {
if(pthread_attr_init(&clamuko_attr)) break;
@@ -1284,8 +1284,8 @@
pthread_mutex_lock(&reload_mutex);
if(reload) {
pthread_mutex_unlock(&reload_mutex);
-#ifdef CLAMUKO
- if(optget(opts, "ClamukoScanOnAccess")->enabled && tharg) {
+#if defined(CLAMUKO) || defined(CLAMAUTH)
+ if((optget(opts, "ClamukoScanOnAccess")->enabled || optget(opts, "ClamAuth")->enabled) && tharg) {
logg("Stopping and restarting Clamuko.\n");
pthread_kill(clamuko_pid, SIGUSR1);
pthread_join(clamuko_pid, NULL);
@@ -1303,8 +1303,8 @@
reload = 0;
time(&reloaded_time);
pthread_mutex_unlock(&reload_mutex);
-#ifdef CLAMUKO
- if(optget(opts, "ClamukoScanOnAccess")->enabled && tharg) {
+#if defined(CLAMUKO) || defined(CLAMAUTH)
+ if((optget(opts, "ClamukoScanOnAccess")->enabled || optget(opts, "ClamAuth")->enabled) && tharg) {
tharg->engine = engine;
pthread_create(&clamuko_pid, &clamuko_attr, clamukoth, tharg);
}
@@ -1330,8 +1330,8 @@
*/
logg("*Waiting for all threads to finish\n");
thrmgr_destroy(thr_pool);
-#ifdef CLAMUKO
- if(optget(opts, "ClamukoScanOnAccess")->enabled) {
+#if defined(CLAMUKO) || defined(CLAMAUTH)
+ if(optget(opts, "ClamukoScanOnAccess")->enabled || optget(opts, "ClamAuth")->enabled) {
logg("Stopping Clamuko.\n");
pthread_kill(clamuko_pid, SIGUSR1);
pthread_join(clamuko_pid, NULL);
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/clamd/thrmgr.c
^
|
@@ -35,6 +35,7 @@
#include "others.h"
#include "mpool.h"
#include "server.h"
+#include "libclamav/others.h"
#ifdef HAVE_MALLINFO
#include <malloc.h>
@@ -467,7 +468,15 @@
#if defined(C_BIGSTACK)
pthread_attr_getstacksize(&(threadpool->pool_attr), &stacksize);
stacksize = stacksize + 64 * 1024;
- if (stacksize < 1048576) stacksize = 1048576; /* at least 1MB please */
+ if (stacksize < 1048576) /* at least 1MB please */
+#if defined(C_HPUX) && defined(USE_MPOOL)
+ /* Set aside one cli_pagesize() for the stack's pthread header,
+ * giving a 1M region to fit a 1M large-page */
+ if(cli_getpagesize() < 1048576)
+ stacksize = 1048576 - cli_getpagesize();
+ else
+#endif
+ stacksize = 1048576;
logg("Set stacksize to %lu\n", (unsigned long int) stacksize);
pthread_attr_setstacksize(&(threadpool->pool_attr), stacksize);
#endif
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/configure
^
|
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for ClamAV 0.97.3.
+# Generated by GNU Autoconf 2.67 for ClamAV 0.97.4.
#
# Report bugs to <http://bugs.clamav.net/>.
#
@@ -703,8 +703,8 @@
# Identity of this package.
PACKAGE_NAME='ClamAV'
PACKAGE_TARNAME='clamav'
-PACKAGE_VERSION='0.97.3'
-PACKAGE_STRING='ClamAV 0.97.3'
+PACKAGE_VERSION='0.97.4'
+PACKAGE_STRING='ClamAV 0.97.4'
PACKAGE_BUGREPORT='http://bugs.clamav.net/'
PACKAGE_URL='http://www.clamav.net/'
@@ -1540,7 +1540,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ClamAV 0.97.3 to adapt to many kinds of systems.
+\`configure' configures ClamAV 0.97.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1611,7 +1611,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ClamAV 0.97.3:";;
+ short | recursive ) echo "Configuration of ClamAV 0.97.4:";;
esac
cat <<\_ACEOF
@@ -1768,7 +1768,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ClamAV configure 0.97.3
+ClamAV configure 0.97.4
generated by GNU Autoconf 2.67
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2237,7 +2237,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ClamAV $as_me 0.97.3, which was
+It was created by ClamAV $as_me 0.97.4, which was
generated by GNU Autoconf 2.67. Invocation command line was
$ $0 $@
@@ -3358,7 +3358,7 @@
# Define the identity of the package.
PACKAGE='clamav'
- VERSION='0.97.3'
+ VERSION='0.97.4'
# Some tools Automake needs.
@@ -3487,10 +3487,10 @@
$as_echo "#define PACKAGE PACKAGE_NAME" >>confdefs.h
-VERSION="0.97.3"
+VERSION="0.97.4"
LC_CURRENT=7
-LC_REVISION=12
+LC_REVISION=13
LC_AGE=1
LIBCLAMAV_VERSION="$LC_CURRENT":"$LC_REVISION":"$LC_AGE"
@@ -16941,6 +16941,9 @@
$as_echo "#define BIND_8_COMPAT 1" >>confdefs.h
+
+$as_echo "#define CLAMAUTH 1" >>confdefs.h
+
use_netinfo="yes"
;;
os2*)
@@ -16966,6 +16969,9 @@
$as_echo "#define C_HPUX 1" >>confdefs.h
+ if test "$have_mempool" = "yes"; then
+ LDFLAGS="$LDFLAGS -Wl,+pd,1M"
+ fi
;;
aix*)
if test "$have_pthreads" = "yes"; then
@@ -20633,7 +20639,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ClamAV $as_me 0.97.3, which was
+This file was extended by ClamAV $as_me 0.97.4, which was
generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -20700,7 +20706,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-ClamAV config.status 0.97.3
+ClamAV config.status 0.97.4
configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
@@ -23233,7 +23239,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ClamAV $as_me 0.97.3, which was
+This file was extended by ClamAV $as_me 0.97.4, which was
generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -23300,7 +23306,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-ClamAV config.status 0.97.3
+ClamAV config.status 0.97.4
configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/configure.in
^
|
@@ -20,7 +20,7 @@
AC_PREREQ([2.59])
dnl For a release change [devel] to the real version [0.xy]
dnl also change VERSION below
-AC_INIT([ClamAV], [0.97.3], [http://bugs.clamav.net/], [clamav], [http://www.clamav.net/])
+AC_INIT([ClamAV], [0.97.4], [http://bugs.clamav.net/], [clamav], [http://www.clamav.net/])
AH_BOTTOM([#include "platform.h"])
dnl put configure auxiliary into config
@@ -43,10 +43,10 @@
dnl change this on a release
dnl VERSION="devel-`date +%Y%m%d`"
-VERSION="0.97.3"
+VERSION="0.97.4"
LC_CURRENT=7
-LC_REVISION=12
+LC_REVISION=13
LC_AGE=1
LIBCLAMAV_VERSION="$LC_CURRENT":"$LC_REVISION":"$LC_AGE"
AC_SUBST([LIBCLAMAV_VERSION])
@@ -1044,6 +1044,7 @@
AC_DEFINE([C_BSD],1,[os is bsd flavor])
AC_DEFINE([C_DARWIN],1,[os is darwin])
AC_DEFINE([BIND_8_COMPAT],1,[enable bind8 compatibility])
+ AC_DEFINE([CLAMAUTH],1,[enable ClamAuth])
use_netinfo="yes"
;;
os2*)
@@ -1069,6 +1070,9 @@
TH_SAFE="-thread-safe"
fi
AC_DEFINE([C_HPUX],1,[os is hpux])
+ if test "$have_mempool" = "yes"; then
+ LDFLAGS="$LDFLAGS -Wl,+pd,1M"
+ fi
;;
aix*)
if test "$have_pthreads" = "yes"; then
|
[-]
[+]
|
Added |
clamav-0.97.4.tar.bz2/contrib/ClamAuth
^
|
+(directory)
|
[-]
[+]
|
Added |
clamav-0.97.4.tar.bz2/contrib/ClamAuth/ClamAuth.kext
^
|
+(directory)
|
[-]
[+]
|
Added |
clamav-0.97.4.tar.bz2/contrib/ClamAuth/ClamAuth.kext/Contents
^
|
+(directory)
|
[-]
[+]
|
Added |
clamav-0.97.4.tar.bz2/contrib/ClamAuth/ClamAuth.kext/Contents/Info.plist
^
|
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>BuildMachineOSBuild</key>
+ <string>11D50</string>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>ClamAuth</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.apple.dts.kext.ClamAuth</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>KEXT</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>0.1</string>
+ <key>DTCompiler</key>
+ <string></string>
+ <key>DTPlatformBuild</key>
+ <string>4D502</string>
+ <key>DTPlatformVersion</key>
+ <string>GM</string>
+ <key>DTSDKBuild</key>
+ <string>11C63</string>
+ <key>DTSDKName</key>
+ <string>macosx10.7</string>
+ <key>DTXcode</key>
+ <string>0421</string>
+ <key>DTXcodeBuild</key>
+ <string>4D502</string>
+ <key>OSBundleLibraries</key>
+ <dict>
+ <key>com.apple.kpi.bsd</key>
+ <string>8.0.0</string>
+ <key>com.apple.kpi.libkern</key>
+ <string>8.0.0</string>
+ </dict>
+</dict>
+</plist>
|
[-]
[+]
|
Added |
clamav-0.97.4.tar.bz2/contrib/ClamAuth/ClamAuth.kext/Contents/MacOS
^
|
+(directory)
|
|
Added |
clamav-0.97.4.tar.bz2/contrib/ClamAuth/ClamAuth.kext/Contents/MacOS/ClamAuth
^
|
[-]
[+]
|
Added |
clamav-0.97.4.tar.bz2/contrib/ClamAuth/ClamAuth.kext/Contents/Resources
^
|
+(directory)
|
[-]
[+]
|
Added |
clamav-0.97.4.tar.bz2/contrib/ClamAuth/ClamAuth.kext/Contents/Resources/LICENSE
^
|
@@ -0,0 +1,40 @@
+Copyright (C) 2011 Sourcefire, Inc., All Rights Reserved.
+
+The KAuth code is based on KauthORama:
+
+Copyright (c) 2007 by Apple Computer, Inc., All Rights Reserved.
+
+Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc.
+ ("Apple") in consideration of your agreement to the following terms, and your
+ use, installation, modification or redistribution of this Apple software
+ constitutes acceptance of these terms. If you do not agree with these terms,
+ please do not use, install, modify or redistribute this Apple software.
+
+ In consideration of your agreement to abide by the following terms, and subject
+ to these terms, Apple grants you a personal, non-exclusive license, under Apple's
+ copyrights in this original Apple software (the "Apple Software"), to use,
+ reproduce, modify and redistribute the Apple Software, with or without
+ modifications, in source and/or binary forms; provided that if you redistribute
+ the Apple Software in its entirety and without modifications, you must retain
+ this notice and the following text and disclaimers in all such redistributions of
+ the Apple Software. Neither the name, trademarks, service marks or logos of
+ Apple Computer, Inc. may be used to endorse or promote products derived from the
+ Apple Software without specific prior written permission from Apple. Except as
+ expressly stated in this notice, no other rights or licenses, express or implied,
+ are granted by Apple herein, including but not limited to any patent rights that
+ may be infringed by your derivative works or by other works in which the Apple
+ Software may be incorporated.
+
+ The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
+ WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+ WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
+ COMBINATION WITH YOUR PRODUCTS.
+
+ IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
+ OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT
+ (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
|
[-]
[+]
|
Added |
clamav-0.97.4.tar.bz2/contrib/ClamAuth/ClamAuth_load
^
|
@@ -0,0 +1,4 @@
+sudo chown -R root ClamAuth.kext
+sudo chgrp -R wheel ClamAuth.kext
+sudo kextload ClamAuth.kext
+sudo sysctl -w kern.com_apple_dts_kext_ClamAuth="monitor /bin /usr/bin /Applications"
|
[-]
[+]
|
Added |
clamav-0.97.4.tar.bz2/contrib/ClamAuth/ClamAuth_unload
^
|
@@ -0,0 +1 @@
+sudo kextunload ClamAuth.kext
|
[-]
[+]
|
Added |
clamav-0.97.4.tar.bz2/contrib/ClamAuth/README
^
|
@@ -0,0 +1,23 @@
+On-access scanning for OS X
+---------------------------
+
+The ClamAuth kernel extension enables ClamAV to provide on-access scanning
+for Mac OS X 10.5 and later. The current version works in a passive mode
+only - ClamAV will log the detection but won't block access to the infected
+file. However, it's possible to perform special actions (eg. quarantine
+files) with the VirusEvent directive of clamd.
+
+Usage
+-----
+
+1. Run ClamAuth_load to load the kernel extension (you can edit the
+script to change or add more paths that will be monitored).
+2. Add "ClamAuth yes" to your clamd.conf
+3. Start clamd with root privileges ('sudo /usr/local/sbin/clamd')
+
+If clamd properly connects to the driver, you should see a line like this
+in the log file:
+
+ClamAuth: Driver version: 0.3, protocol version: 2
+
+ClamAV is now monitoring the paths specified in ClamAuth_load.
|
[-]
[+]
|
Added |
clamav-0.97.4.tar.bz2/contrib/ClamAuth/source
^
|
+(directory)
|
[-]
[+]
|
Added |
clamav-0.97.4.tar.bz2/contrib/ClamAuth/source/ClamAuth.c
^
|
@@ -0,0 +1,757 @@
+/*
+ * Copyright (c) 2007 by Apple Computer, Inc., All Rights Reserved.
+ * Copyright (c) 2011 Sourcefire, Inc.
+ */
+
+#include <kern/assert.h>
+#include <mach/mach_types.h>
+#include <libkern/libkern.h>
+#include <libkern/OSAtomic.h>
+#include <libkern/OSMalloc.h>
+#include <sys/sysctl.h>
+#include <sys/systm.h>
+#include <sys/kauth.h>
+#include <sys/vnode.h>
+#include <sys/uio.h>
+#include <sys/conf.h>
+#include <miscfs/devfs/devfs.h>
+
+#define CLAMAUTH_VERSION "0.3"
+#define CLAMAUTH_PROTOCOL_VERSION 2
+
+#pragma mark ***** Global Resources
+/* These declarations are required to allocate memory and create locks.
+ * They're created when we start and destroyed when we stop.
+ */
+
+static OSMallocTag gMallocTag = NULL;
+static lck_grp_t * gLockGroup = NULL;
+
+#define CLAMAUTH_EVENTS (KAUTH_VNODE_EXECUTE)
+
+struct AuthEvent {
+ /* don't change the first two fields */
+ UInt32 action;
+ char path[1024];
+ UInt32 pid;
+
+};
+
+#define EVENTQSIZE 64
+
+struct AuthEventQueue {
+ struct AuthEvent queue[EVENTQSIZE];
+ int cnt, first, last;
+};
+
+void AuthEventInitQueue(struct AuthEventQueue *queue);
+void AuthEventEnqueue(struct AuthEventQueue *queue, struct AuthEvent *event);
+int AuthEventDequeue(struct AuthEventQueue *queue, struct AuthEvent *event);
+
+void AuthEventInitQueue(struct AuthEventQueue *queue)
+{
+ memset(queue, 0, sizeof(struct AuthEventQueue));
+ queue->first = queue->cnt = 0;
+ queue->last = EVENTQSIZE - 1;
+}
+
+void AuthEventEnqueue(struct AuthEventQueue *queue, struct AuthEvent *event)
+{
+ queue->last = (queue->last + 1) % EVENTQSIZE;
+ memcpy(&queue->queue[queue->last], event, sizeof(struct AuthEvent));
+ queue->cnt++;
+}
+
+int AuthEventDequeue(struct AuthEventQueue *queue, struct AuthEvent *event)
+{
+ if(!queue->cnt)
+ return 1;
+ memcpy(event, &queue->queue[queue->first], sizeof(struct AuthEvent));
+ queue->first = (queue->first + 1) % EVENTQSIZE;
+ queue->cnt--;
+ return 0;
+}
+
+struct AuthEventQueue gEventQueue;
+static lck_mtx_t *gEventQueueLock = NULL;
+static SInt32 gEventCount = 0;
+
+#define MAX_PREFIX_NUM 10
+#define MAX_PREFIX_LEN 128
+static char gPrefixTable[MAX_PREFIX_NUM][MAX_PREFIX_LEN];
+static unsigned int gPrefixCount = 0;
+
+static int CreateVnodePath(vnode_t vp, char **vpPathPtr)
+ /* Creates a full path for a vnode. vp may be NULL, in which
+ * case the returned path is NULL (that is, no memory is allocated).
+ * vpPathPtr is a place to store the allocated path buffer.
+ * The caller is responsible for freeing this memory using OSFree
+ * (the size is always MAXPATHLEN).
+ */
+{
+ int err;
+ int pathLen;
+
+ assert( vpPathPtr != NULL);
+ assert(*vpPathPtr == NULL);
+
+ err = 0;
+ if (vp != NULL) {
+ *vpPathPtr = OSMalloc(MAXPATHLEN, gMallocTag);
+ if (*vpPathPtr == NULL) {
+ err = ENOMEM;
+ }
+ if (err == 0) {
+ pathLen = MAXPATHLEN;
+ err = vn_getpath(vp, *vpPathPtr, &pathLen);
+ }
+ }
+
+ return err;
+}
+
+/* /dev/clamauth handling */
+
+static int ca_devidx = -1;
+static void *ca_devnode = NULL;
+int dev_open = 0, dev_read = 0;
+
+static int ca_open(dev_t dev, int flag, int devtype, proc_t p)
+{
+ if(dev_open)
+ return EBUSY;
+
+ dev_open = 1;
+
+ return 0;
+}
+
+static int ca_close(dev_t dev, int flag, int devtype, proc_t p)
+{
+ dev_open = 0;
+ return 0;
+}
+
+static int ca_read(dev_t dev, uio_t uio, int ioflag)
+{
+ int ret = 0, size, retq = 0;
+ struct AuthEvent event;
+ struct timespec waittime;
+
+ waittime.tv_sec = 1;
+ waittime.tv_nsec = 0;
+ while(uio_resid(uio) > 0) {
+ lck_mtx_lock(gEventQueueLock);
+ retq = AuthEventDequeue(&gEventQueue, &event);
+ dev_read = 1;
+ lck_mtx_unlock(gEventQueueLock);
+ if(retq != 1) {
+ /* snprintf(info, sizeof(info), "PATH: %s, PID: %d, ACTION: %d\n", event.path, event.pid, event.action); */
+ size = MIN(uio_resid(uio), sizeof(event));
+ ret = uiomove((const char *) &event, size, uio);
+ if(ret)
+ break;
+ } else {
+ //(void) msleep(&gEventQueue, NULL, PUSER, "events", &waittime);
+ break;
+ }
+ }
+
+ if(ret) {
+ printf("ClamAuth: uiomove() failed\n");
+ }
+
+ return ret;
+}
+
+static int ca_write(dev_t dev, uio_t uio, int ioflag)
+{
+ return EBADF;
+}
+
+static int ca_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, proc_t p)
+{
+ return EBADF;
+}
+
+static int ca_select(dev_t dev, int flag, void * wql, proc_t p)
+{
+ return EBADF;
+}
+
+static struct cdevsw clamauth_cdevsw = {
+ ca_open,
+ ca_close,
+ ca_read,
+ ca_write,
+ ca_ioctl,
+ eno_stop,
+ eno_reset,
+ NULL,
+ ca_select,
+ eno_mmap,
+ eno_strat,
+ eno_getc,
+ eno_putc,
+ 0
+};
+
+static int ca_remove(void)
+{
+ if(ca_devnode)
+ devfs_remove(ca_devnode);
+
+ if(ca_devidx != -1) {
+ if(cdevsw_remove(ca_devidx, &clamauth_cdevsw) != ca_devidx) {
+ printf("ClamAuth: cdevsw_remove() failed\n");
+ return KERN_FAILURE;
+ }
+ }
+
+ return KERN_SUCCESS;
+}
+
+
+#pragma mark ***** Listener Resources
+
+/* Some scopes (for example KAUTH_SCOPE_VNODE) are called a /lot/. Thus,
+ * it's a good idea to avoid taking mutexes in your listener if at all
+ * possible. Thus, we use non-blocking synchronisation to protect the
+ * global data that's accessed by our listener (gPrefix).
+ * Every time we enter a listener, we increment gActivationCount, and ever
+ * time we leave we decrement it. When we want to change the listener, we
+ * first remove the listener, then we wait for the activation count to hit,
+ * then we can modify the globals protected by that activation count.
+ *
+ * IMPORTANT:
+ * There is still a race condition here. See RemoveListener for a description
+ * of the race and why we can't fix it.
+ */
+
+static SInt32 gActivationCount = 0;
+
+static int VnodeScopeListener(
+ kauth_cred_t credential,
+ void * idata,
+ kauth_action_t action,
+ uintptr_t arg0,
+ uintptr_t arg1,
+ uintptr_t arg2,
+ uintptr_t arg3
+)
+ /* A Kauth listener that's called to authorize an action in the vnode scope */
+{
+ #pragma unused(credential)
+ #pragma unused(idata)
+ #pragma unused(arg3)
+ int err;
+ vfs_context_t context;
+ vnode_t vp;
+ vnode_t dvp;
+ char * vpPath;
+ char * dvpPath;
+ struct AuthEvent event;
+ unsigned int i, mpath = 0;
+
+ (void) OSIncrementAtomic(&gActivationCount);
+
+ context = (vfs_context_t) arg0;
+ vp = (vnode_t) arg1;
+ dvp = (vnode_t) arg2;
+
+ vpPath = NULL;
+ dvpPath = NULL;
+
+ /* Convert the vnode, if any, to a path. */
+ err = CreateVnodePath(vp, &vpPath);
+
+ /* Convert the parent directory vnode, if any, to a path. */
+ if (err == 0)
+ err = CreateVnodePath(dvp, &dvpPath);
+
+ /* Tell the user about this request. Note that we filter requests
+ * based on gPrefix. If gPrefix is set, only requests where one
+ * of the paths is prefixed by gPrefix will be printed.
+ */
+ if (err == 0) {
+ for(i = 0; i < gPrefixCount; i++) {
+ if(vpPath && strprefix(vpPath, gPrefixTable[i])) {
+ mpath = 1;
+ } else if(dvpPath && strprefix(dvpPath, gPrefixTable[i])) {
+ mpath = 1;
+ }
+ if(mpath)
+ break;
+ }
+
+ if (mpath) {
+ if(action & CLAMAUTH_EVENTS)
+ printf(
+ "scope=" KAUTH_SCOPE_VNODE ", uid=%ld, vp=%s, dvp=%s\n",
+ (long) kauth_cred_getuid(vfs_context_ucred(context)),
+ (vpPath != NULL) ? vpPath : "<null>",
+ (dvpPath != NULL) ? dvpPath : "<null>"
+ );
+
+ event.pid = vfs_context_pid(context);
+ event.action = action;
+ if(vpPath) {
+ strncpy(event.path, vpPath, sizeof(event.path));
+ event.path[sizeof(event.path) - 1] = 0;
+ } else {
+ event.path[0] = 0;
+ }
+ lck_mtx_lock(gEventQueueLock);
+ if(dev_read && (action & CLAMAUTH_EVENTS)) {
+ // printf("gPrefix: %s, vpPath: %s, dvpPath: %s, action: %d\n", gPrefix, vpPath ? vpPath : "<null>", dvpPath ? dvpPath : "<null>", action);
+ AuthEventEnqueue(&gEventQueue, &event);
+ }
+ lck_mtx_unlock(gEventQueueLock);
+ (void) OSIncrementAtomic(&gEventCount);
+ }
+ } else {
+ printf("ClamAuth.VnodeScopeListener: Error %d.\n", err);
+ }
+
+ if (vpPath != NULL) {
+ OSFree(vpPath, MAXPATHLEN, gMallocTag);
+ }
+ if (dvpPath != NULL) {
+ OSFree(dvpPath, MAXPATHLEN, gMallocTag);
+ }
+
+ (void) OSDecrementAtomic(&gActivationCount);
+
+ return KAUTH_RESULT_DEFER;
+}
+
+static int FileOpScopeListener(
+ kauth_cred_t credential,
+ void * idata,
+ kauth_action_t action,
+ uintptr_t arg0,
+ uintptr_t arg1,
+ uintptr_t arg2,
+ uintptr_t arg3
+ )
+/* A Kauth listener that's called to authorize an action in the file operation */
+{
+#pragma unused(credential)
+#pragma unused(idata)
+#pragma unused(arg2)
+#pragma unused(arg3)
+ struct AuthEvent event;
+ vfs_context_t context;
+ const char *path;
+ unsigned int i, mpath = 0;
+
+ if(!dev_read)
+ return KAUTH_RESULT_DEFER;
+
+ context = (vfs_context_t) arg0;
+ path = (const char *) arg1;
+
+ (void) OSIncrementAtomic(&gActivationCount);
+
+ switch (action) {
+ /* case KAUTH_FILEOP_OPEN: */
+ case KAUTH_FILEOP_EXEC:
+ for(i = 0; i < gPrefixCount; i++) {
+ if(strprefix((const char *) arg1, gPrefixTable[i])) {
+ mpath = 1;
+ break;
+ }
+ }
+ if(mpath) {
+ event.pid = vfs_context_pid(context);
+ event.action = action;
+ strncpy(event.path, path, sizeof(event.path));
+ event.path[sizeof(event.path) - 1] = 0;
+ lck_mtx_lock(gEventQueueLock);
+ AuthEventEnqueue(&gEventQueue, &event);
+ lck_mtx_unlock(gEventQueueLock);
+ }
+ break;
+ default:
+ break;
+ }
+
+ (void) OSDecrementAtomic(&gActivationCount);
+
+ return KAUTH_RESULT_DEFER;
+}
+
+#pragma mark ***** Listener Install/Remove
+
+/* gConfigurationLock is a mutex that protects us from two threads trying to
+ * simultaneously modify the configuration. The configuration is protect in
+ * N ways:
+ *
+ * o During startup, we register our sysctl OID last, so no one can start
+ * modifying the configuration until everything is set up nicely.
+ *
+ * o During normal operations, the sysctl handler (SysctlHandler) takes
+ * the lock to prevent two threads from reconfiguring the system at the
+ * same time.
+ *
+ * o During termination, the stop routine first removes the sysctl OID
+ * and then takes the lock before it removes the listener. The first
+ * act prevents any new sysctl requests coming it, the second blocks
+ * until current sysctl requests are done.
+ *
+ * IMPORTANT:
+ * There is still a race condition here. See the stop routine for a description
+ * of the race and why we can't fix it.
+ */
+
+static lck_mtx_t * gConfigurationLock = NULL;
+
+/* gListener is our handle to the installed scope listener. We need to
+ * keep it around so that we can remove the listener when we're done.
+ */
+
+static kauth_listener_t gListener = NULL;
+
+static void RemoveListener(void)
+ /* Removes the installed scope listener, if any.
+ *
+ * Under almost all circumstances this routine runs under the
+ * gConfigurationLock. The only time that this might not be the case
+ * is when the KEXT's start routine fails prior to gConfigurationLock
+ * being created.
+ */
+{
+ /* First prevent any more threads entering our listener. */
+ if (gListener != NULL) {
+ kauth_unlisten_scope(gListener);
+ gListener = NULL;
+ }
+
+ /* Then wait for any threads within out listener to stop. Note that there
+ * is still a race condition here; there could still be a thread executing
+ * between the OSDecrementAtomic and the return from the listener function
+ * (for example, FileOpScopeListener). However, there's no way to close
+ * this race because of the weak concurrency guarantee for kauth_unlisten_scope.
+ * Moreover, the window is very small and, seeing as this only happens during
+ * reconfiguration, I'm not too worried. However, I am worried enough
+ * to ensure that this loop runs at least once, so we always delay the teardown
+ * for at least one second waiting for the threads to drain from our
+ * listener.
+ */
+
+ do {
+ struct timespec oneSecond;
+
+ oneSecond.tv_sec = 1;
+ oneSecond.tv_nsec = 0;
+
+ (void) msleep(&gActivationCount, NULL, PUSER, "com_apple_dts_kext_ClamAuth.RemoveListener", &oneSecond);
+ } while ( gActivationCount > 0 );
+}
+
+static void InstallListener(void)
+ /* Installs a listener for the specified scope. scope and scopeLen specifies
+ * the scope to listen for. prefix is a parameter for the scope listener.
+ * It may be NULL.
+ *
+ * prefix points into the gConfiguration global variable, so this routine
+ * doesn't make a copy of it. However, it has to make a copy of scope
+ * because scope can point to a place in the middle of the gConfiguration
+ * variable, so there's no guarantee it's null terminated (which we need it
+ * to be in order to call kauth_listen_scope.
+ *
+ * This routine always runs under the gConfigurationLock.
+ */
+{
+
+ assert(gListener == NULL);
+ //gListener = kauth_listen_scope(KAUTH_SCOPE_VNODE, VnodeScopeListener, NULL);
+ gListener = kauth_listen_scope(KAUTH_SCOPE_FILEOP, FileOpScopeListener, NULL);
+ if (gListener == NULL) {
+ printf("ClamAuth.InstallListener: Could not create gListener.\n");
+ RemoveListener();
+ } else {
+ printf("ClamAuth: Installed file listener\n");
+ }
+}
+
+static void ConfigureKauth(const char *configuration)
+ /* This routine is called by the sysctl handler when it notices
+ * that the configuration has changed. It's responsible for
+ * parsing the new configuration string and updating the listener.
+ *
+ * See SysctlHandler for a description of how I chose to handle the
+ * failure case.
+ *
+ * This routine always runs under the gConfigurationLock.
+ */
+{
+ unsigned int i = 0;
+ assert(configuration != NULL);
+
+ /* Remove the existing listener. */
+ RemoveListener();
+
+ /* Parse the configuration string and install the new listener. */
+ if (strcmp(configuration, "remove") == 0) {
+ printf("ClamAuth.ConfigureKauth: Removed listener.\n");
+ } else if ( strprefix(configuration, "monitor ") ) {
+ const char *cursor;
+
+ /* Skip the "monitor ". */
+ cursor = configuration + strlen("monitor ");
+
+ gPrefixCount = 0;
+ while(*cursor == ' ')
+ cursor++;
+
+ if (!*cursor) {
+ printf("ClamAuth.ConfigureKauth: Bad configuration '%s'.\n", configuration);
+ return;
+ }
+
+ while(1) {
+ if(i < MAX_PREFIX_LEN - 1) {
+ if(*cursor == ' ') {
+ gPrefixTable[gPrefixCount][i] = 0;
+ gPrefixCount++;
+ i = 0;
+ if(gPrefixCount >= MAX_PREFIX_NUM) {
+ printf("ClamAuth.ConfigureKauth: Too many paths (> %u).\n", MAX_PREFIX_NUM);
+ gPrefixCount = 0;
+ return;
+ }
+ } else {
+ gPrefixTable[gPrefixCount][i++] = *cursor;
+ }
+ } else {
+ printf("ClamAuth.ConfigureKauth: Path too long (%u > %u).\n", i, MAX_PREFIX_LEN);
+ gPrefixCount = 0;
+ return;
+ }
+ cursor++;
+ if(!*cursor) {
+ gPrefixTable[gPrefixCount][i] = 0;
+ gPrefixCount++;
+ break;
+ }
+ }
+ printf("ClamAuth.ConfigureKauth: Monitoring %u path(s)\n", gPrefixCount);
+ InstallListener();
+ }
+}
+
+/* gConfiguration holds our current configuration string. It's modified by
+ * SysctlHandler (well, by sysctl_handle_string which is called by SysctlHandler).
+ */
+
+static char gConfiguration[1024];
+
+
+static int SysctlHandler(
+ struct sysctl_oid * oidp,
+ void * arg1,
+ int arg2,
+ struct sysctl_req * req
+)
+ /* This routine is called by the kernel when the user reads or
+ * writes our sysctl variable. The arguments are standard for
+ * a sysctl handler.
+ */
+{
+ int result;
+
+ /* Prevent two threads trying to change our configuration at the same
+ * time.
+ */
+ lck_mtx_lock(gConfigurationLock);
+
+ /* Let sysctl_handle_string do all the heavy lifting of getting
+ * and setting the variable.
+ */
+ result = sysctl_handle_string(oidp, arg1, arg2, req);
+
+ /* On the way out, if we got no error and a new value was set,
+ * do our magic.
+ */
+ if ( (result == 0) && (req->newptr != 0) ) {
+ ConfigureKauth(gConfiguration);
+ }
+
+ lck_mtx_unlock(gConfigurationLock);
+
+ return result;
+}
+
+/* Declare our sysctl OID (that is, a variable that the user can
+ * get and set using sysctl). Once this OID is registered (which
+ * is done in the start routine, ClamAuth_start, below), the user
+ * user can get and set our configuration variable (gConfiguration)
+ * using the sysctl command line tool.
+ *
+ * We use OID using SYSCTL_OID rather than SYSCTL_STRING because
+ * we want to override the hander function that's call (we want
+ * SysctlHandler rather than sysctl_handle_string).
+ */
+
+SYSCTL_OID(
+ _kern, /* parent OID */
+ OID_AUTO, /* sysctl number, OID_AUTO means we're only accessible by name */
+ com_apple_dts_kext_ClamAuth, /* our name */
+ CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_KERN, /* we're a string, more or less */
+ gConfiguration, /* sysctl_handle_string gets/sets this string */
+ sizeof(gConfiguration), /* and this is its maximum length */
+ SysctlHandler, /* our handler */
+ "A", /* because that's what SYSCTL_STRING does */
+ "" /* just a comment */
+);
+
+/* gRegisteredOID tracks whether we've registered our OID or not. */
+
+static boolean_t gRegisteredOID = FALSE;
+
+
+
+#pragma mark ***** Start/Stop
+
+/* Prototypes for our entry points */
+extern kern_return_t com_apple_dts_kext_ClamAuth_start(kmod_info_t * ki, void * d);
+extern kern_return_t com_apple_dts_kext_ClamAuth_stop(kmod_info_t * ki, void * d);
+
+extern kern_return_t com_apple_dts_kext_ClamAuth_start(kmod_info_t * ki, void * d)
+/* Called by the system to start up the kext. */
+{
+ #pragma unused(ki)
+ #pragma unused(d)
+ kern_return_t err;
+ struct AuthEvent event;
+
+ ca_devidx = cdevsw_add(-1, &clamauth_cdevsw);
+ if(ca_devidx == -1) {
+ printf("ClamAuth: cdevsw_add() failed\n");
+ return KERN_FAILURE;
+ }
+
+ ca_devnode = devfs_make_node(makedev(ca_devidx, 0), DEVFS_CHAR, UID_ROOT, GID_WHEEL, 0660, "clamauth");
+ if(!ca_devnode) {
+ printf("ClamAuth: Can't create /dev/clamauth\n");
+ return ca_remove();
+ }
+
+ /* Allocate our global resources, needed in order to allocate memory
+ * and locks throughout the rest of the program.
+ */
+ err = KERN_SUCCESS;
+ gMallocTag = OSMalloc_Tagalloc("com.apple.dts.kext.ClamAuth", OSMT_DEFAULT);
+ if (gMallocTag == NULL) {
+ err = KERN_FAILURE;
+ }
+ if (err == KERN_SUCCESS) {
+ gLockGroup = lck_grp_alloc_init("com.apple.dts.kext.ClamAuth", LCK_GRP_ATTR_NULL);
+ if (gLockGroup == NULL) {
+ err = KERN_FAILURE;
+ }
+ }
+
+ /* Allocate the lock that protects our configuration. */
+ if (err == KERN_SUCCESS) {
+ gConfigurationLock = lck_mtx_alloc_init(gLockGroup, LCK_ATTR_NULL);
+ if (gConfigurationLock == NULL) {
+ err = KERN_FAILURE;
+ }
+ }
+
+ /* Event queue lock */
+ if (err == KERN_SUCCESS) {
+ gEventQueueLock = lck_mtx_alloc_init(gLockGroup, LCK_ATTR_NULL);
+ if (gEventQueueLock == NULL) {
+ err = KERN_FAILURE;
+ }
+ }
+ AuthEventInitQueue(&gEventQueue);
+
+ /* Initialize event queue and add version info event */
+ event.action = CLAMAUTH_PROTOCOL_VERSION;
+ strncpy(event.path, "ClamAuth "CLAMAUTH_VERSION"", sizeof(event.path));
+ event.pid = 0xdeadbeef;
+ AuthEventEnqueue(&gEventQueue, &event);
+
+ /* Register our sysctl handler. */
+ if (err == KERN_SUCCESS) {
+ sysctl_register_oid(&sysctl__kern_com_apple_dts_kext_ClamAuth);
+ gRegisteredOID = TRUE;
+ }
+
+ /* If we failed, shut everything down. */
+ if (err != KERN_SUCCESS) {
+ printf("ClamAuth_start: Failed to initialize the driver\n");
+ (void) com_apple_dts_kext_ClamAuth_stop(ki, d);
+ } else
+ printf("ClamAuth_start: ClamAV kernel driver loaded\n");
+
+ return err;
+}
+
+extern kern_return_t com_apple_dts_kext_ClamAuth_stop(kmod_info_t * ki, void * d)
+ /* Called by the system to shut down the kext. */
+{
+ #pragma unused(ki)
+ #pragma unused(d)
+ int ret;
+
+ /* Remove our sysctl handler. This prevents more threads entering the
+ * handler and trying to change the configuration. There is still a
+ * race condition here though. If a thread is already running in our
+ * sysctl handler, there's no way to guarantee that it's done before
+ * we destroy key resources (notably the gConfigurationLock mutex) that
+ * it depends on. That's because sysctl_unregister_oid makes no attempt
+ * to wait until all threads running inside the OID handler are done
+ * before it returns. I could do stuff to minimise the risk, but there's
+ * is no 100% way to close this race so I'm going to ignore it.
+ */
+ if (gRegisteredOID) {
+ sysctl_unregister_oid(&sysctl__kern_com_apple_dts_kext_ClamAuth);
+ gRegisteredOID = FALSE;
+ }
+
+ /* remove the character device */
+ ret = ca_remove();
+
+ /* Shut down the scope listen, if any. Not that we lock gConfigurationLock
+ * because RemoveListener requires it to be locked. Further note that
+ * we only do this if the lock has actually been allocated. If the startup
+ * routine fails, we can get called with gConfigurationLock set to NULL.
+ */
+ if (gConfigurationLock != NULL) {
+ lck_mtx_lock(gConfigurationLock);
+ }
+ RemoveListener();
+ if (gConfigurationLock != NULL) {
+ lck_mtx_unlock(gConfigurationLock);
+ }
+
+ /* Clean up the configuration lock. */
+ if (gConfigurationLock != NULL) {
+ lck_mtx_free(gConfigurationLock, gLockGroup);
+ gConfigurationLock = NULL;
+ }
+
+ /* Clean up the event queue lock. */
+ if (gEventQueueLock != NULL) {
+ lck_mtx_free(gEventQueueLock, gLockGroup);
+ gEventQueueLock = NULL;
+ }
+
+ /* Clean up our global resources. */
+ if (gLockGroup != NULL) {
+ lck_grp_free(gLockGroup);
+ gLockGroup = NULL;
+ }
+ if (gMallocTag != NULL) {
+ OSMalloc_Tagfree(gMallocTag);
+ gMallocTag = NULL;
+ }
+
+ printf("ClamAuth_stop: ClamAV kernel driver removed\n");
+ return ret;
+}
|
[-]
[+]
|
Added |
clamav-0.97.4.tar.bz2/contrib/ClamAuth/source/ClamAuth.xcodeproj
^
|
+(directory)
|
[-]
[+]
|
Added |
clamav-0.97.4.tar.bz2/contrib/ClamAuth/source/ClamAuth.xcodeproj/project.pbxproj
^
|
@@ -0,0 +1,262 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 52ADB27A148676E700208F0E /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 52ADB279148676E700208F0E /* LICENSE */; };
+ 52ADB28014867AF400208F0E /* ClamAuth.c in Sources */ = {isa = PBXBuildFile; fileRef = 52ADB27F14867AF400208F0E /* ClamAuth.c */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 32A4FEC30562C75700D090E7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+ 32A4FEC40562C75800D090E7 /* ClamAuth.kext */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ClamAuth.kext; sourceTree = BUILT_PRODUCTS_DIR; };
+ 52ADB279148676E700208F0E /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
+ 52ADB27F14867AF400208F0E /* ClamAuth.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ClamAuth.c; sourceTree = "<group>"; };
+ E4C7A4390832568C00556BCE /* Kernel.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Kernel.framework; path = /System/Library/Frameworks/Kernel.framework; sourceTree = "<absolute>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 32A4FEBF0562C75700D090E7 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 089C166AFE841209C02AAC07 /* KauthORama */ = {
+ isa = PBXGroup;
+ children = (
+ 52ADB27F14867AF400208F0E /* ClamAuth.c */,
+ 52ADB279148676E700208F0E /* LICENSE */,
+ 32A4FEC30562C75700D090E7 /* Info.plist */,
+ E4C7A4390832568C00556BCE /* Kernel.framework */,
+ 19C28FB6FE9D52B211CA2CBB /* Products */,
+ );
+ name = KauthORama;
+ sourceTree = "<group>";
+ };
+ 19C28FB6FE9D52B211CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 32A4FEC40562C75800D090E7 /* ClamAuth.kext */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ 32A4FEBA0562C75700D090E7 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ 32A4FEB80562C75700D090E7 /* ClamAuth */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = E40CF0E60890089400F3BED8 /* Build configuration list for PBXNativeTarget "ClamAuth" */;
+ buildPhases = (
+ 32A4FEB90562C75700D090E7 /* ShellScript */,
+ 32A4FEBA0562C75700D090E7 /* Headers */,
+ 32A4FEBB0562C75700D090E7 /* Resources */,
+ 32A4FEBD0562C75700D090E7 /* Sources */,
+ 32A4FEBF0562C75700D090E7 /* Frameworks */,
+ 32A4FEC00562C75700D090E7 /* Rez */,
+ 32A4FEC10562C75700D090E7 /* ShellScript */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = ClamAuth;
+ productInstallPath = "$(SYSTEM_LIBRARY_DIR)/Extensions";
+ productName = KauthORama;
+ productReference = 32A4FEC40562C75800D090E7 /* ClamAuth.kext */;
+ productType = "com.apple.product-type.kernel-extension";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 089C1669FE841209C02AAC07 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0420;
+ };
+ buildConfigurationList = E40CF0EA0890089400F3BED8 /* Build configuration list for PBXProject "ClamAuth" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 1;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 089C166AFE841209C02AAC07 /* KauthORama */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 32A4FEB80562C75700D090E7 /* ClamAuth */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 32A4FEBB0562C75700D090E7 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 52ADB27A148676E700208F0E /* LICENSE in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXRezBuildPhase section */
+ 32A4FEC00562C75700D090E7 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXRezBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 32A4FEB90562C75700D090E7 /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "script=\"${SYSTEM_DEVELOPER_DIR}/ProjectBuilder Extras/Kernel Extension Support/KEXTPreprocess\";\nif [ -x \"$script\" ]; then\n . \"$script\"\nfi";
+ };
+ 32A4FEC10562C75700D090E7 /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "script=\"${SYSTEM_DEVELOPER_DIR}/ProjectBuilder Extras/Kernel Extension Support/KEXTPostprocess\";\nif [ -x \"$script\" ]; then\n . \"$script\"\nfi";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 32A4FEBD0562C75700D090E7 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 52ADB28014867AF400208F0E /* ClamAuth.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ E40CF0E70890089400F3BED8 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ INFOPLIST_FILE = Info.plist;
+ MODULE_NAME = com.apple.dts.kext.ClamAuth;
+ MODULE_START = com_apple_dts_kext_ClamAuth_start;
+ MODULE_STOP = com_apple_dts_kext_ClamAuth_stop;
+ MODULE_VERSION = 0.1;
+ PRODUCT_NAME = ClamAuth;
+ WRAPPER_EXTENSION = kext;
+ };
+ name = Debug;
+ };
+ E40CF0E80890089400F3BED8 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ INFOPLIST_FILE = Info.plist;
+ MODULE_NAME = com.apple.dts.kext.ClamAuth;
+ MODULE_START = com_apple_dts_kext_ClamAuth_start;
+ MODULE_STOP = com_apple_dts_kext_ClamAuth_stop;
+ MODULE_VERSION = 0.1;
+ PRODUCT_NAME = ClamAuth;
+ WRAPPER_EXTENSION = kext;
+ };
+ name = Release;
+ };
+ E40CF0EB0890089400F3BED8 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_TREAT_WARNINGS_AS_ERRORS = NO;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_MISSING_PARENTHESES = YES;
+ GCC_WARN_SIGN_COMPARE = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_LABEL = YES;
+ GCC_WARN_UNUSED_PARAMETER = YES;
+ GCC_WARN_UNUSED_VALUE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.5;
+ SDKROOT = macosx10.7;
+ WARNING_CFLAGS = "-Wall";
+ };
+ name = Debug;
+ };
+ E40CF0EC0890089400F3BED8 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ COPY_PHASE_STRIP = YES;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = s;
+ GCC_TREAT_WARNINGS_AS_ERRORS = NO;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_MISSING_PARENTHESES = YES;
+ GCC_WARN_SIGN_COMPARE = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_LABEL = YES;
+ GCC_WARN_UNUSED_PARAMETER = YES;
+ GCC_WARN_UNUSED_VALUE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.5;
+ SDKROOT = macosx10.7;
+ WARNING_CFLAGS = "-Wall";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ E40CF0E60890089400F3BED8 /* Build configuration list for PBXNativeTarget "ClamAuth" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ E40CF0E70890089400F3BED8 /* Debug */,
+ E40CF0E80890089400F3BED8 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Debug;
+ };
+ E40CF0EA0890089400F3BED8 /* Build configuration list for PBXProject "ClamAuth" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ E40CF0EB0890089400F3BED8 /* Debug */,
+ E40CF0EC0890089400F3BED8 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Debug;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 089C1669FE841209C02AAC07 /* Project object */;
+}
|
[-]
[+]
|
Added |
clamav-0.97.4.tar.bz2/contrib/ClamAuth/source/Info.plist
^
|
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>ClamAuth</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.apple.dts.kext.ClamAuth</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>KEXT</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>$(MODULE_VERSION)</string>
+ <key>OSBundleLibraries</key>
+ <dict>
+ <key>com.apple.kpi.bsd</key>
+ <string>8.0.0</string>
+ <key>com.apple.kpi.libkern</key>
+ <string>8.0.0</string>
+ </dict>
+</dict>
+</plist>
|
[-]
[+]
|
Added |
clamav-0.97.4.tar.bz2/contrib/ClamAuth/source/LICENSE
^
|
@@ -0,0 +1,40 @@
+Copyright (C) 2011 Sourcefire, Inc., All Rights Reserved.
+
+The KAuth code is based on KauthORama:
+
+Copyright (c) 2007 by Apple Computer, Inc., All Rights Reserved.
+
+Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc.
+ ("Apple") in consideration of your agreement to the following terms, and your
+ use, installation, modification or redistribution of this Apple software
+ constitutes acceptance of these terms. If you do not agree with these terms,
+ please do not use, install, modify or redistribute this Apple software.
+
+ In consideration of your agreement to abide by the following terms, and subject
+ to these terms, Apple grants you a personal, non-exclusive license, under Apple's
+ copyrights in this original Apple software (the "Apple Software"), to use,
+ reproduce, modify and redistribute the Apple Software, with or without
+ modifications, in source and/or binary forms; provided that if you redistribute
+ the Apple Software in its entirety and without modifications, you must retain
+ this notice and the following text and disclaimers in all such redistributions of
+ the Apple Software. Neither the name, trademarks, service marks or logos of
+ Apple Computer, Inc. may be used to endorse or promote products derived from the
+ Apple Software without specific prior written permission from Apple. Except as
+ expressly stated in this notice, no other rights or licenses, express or implied,
+ are granted by Apple herein, including but not limited to any patent rights that
+ may be infringed by your derivative works or by other works in which the Apple
+ Software may be incorporated.
+
+ The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
+ WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+ WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
+ COMBINATION WITH YOUR PRODUCTS.
+
+ IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
+ OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT
+ (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
|
|
Changed |
clamav-0.97.4.tar.bz2/database/daily.cvd
^
|
|
Changed |
clamav-0.97.4.tar.bz2/docs/clamdoc.pdf
^
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/docs/clamdoc.tex
^
|
@@ -71,7 +71,7 @@
\vspace{3cm}
\begin{flushright}
\rule[-1ex]{8cm}{3pt}\\
- \huge Clam AntiVirus 0.97.3\\
+ \huge Clam AntiVirus 0.97.4\\
\huge \emph{User Manual}\\
\end{flushright}
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/docs/html/clamdoc.html
^
|
@@ -56,7 +56,7 @@
<BR>
<BR>
<DIV ALIGN="RIGHT">
-<BR> <BIG CLASS="HUGE">Clam AntiVirus 0.97.3
+<BR> <BIG CLASS="HUGE">Clam AntiVirus 0.97.4
<BR> <BIG CLASS="HUGE"><SPAN CLASS="textit">User Manual</SPAN>
<BR>
</BIG></BIG></DIV>
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/docs/html/index.html
^
|
@@ -56,7 +56,7 @@
<BR>
<BR>
<DIV ALIGN="RIGHT">
-<BR> <BIG CLASS="HUGE">Clam AntiVirus 0.97.3
+<BR> <BIG CLASS="HUGE">Clam AntiVirus 0.97.4
<BR> <BIG CLASS="HUGE"><SPAN CLASS="textit">User Manual</SPAN>
<BR>
</BIG></BIG></DIV>
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/libclamav/bytecode.c
^
|
@@ -2416,6 +2416,7 @@
return CL_SUCCESS;
}
+ engine->bytecode_mode = CL_BYTECODE_MODE_AUTO;
cli_detect_environment(&bcs->env);
switch (bcs->env.arch) {
case arch_i386:
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/libclamav/bytecode_api.c
^
|
@@ -439,10 +439,10 @@
return v;
}
-int32_t cli_bcapi_get_pe_section(struct cli_bc_ctx *ctx, struct cli_exe_section* section, uint32_t num)
+int32_t cli_bcapi_get_pe_section(struct cli_bc_ctx *ctx, void* section, uint32_t num)
{
if (num < ctx->hooks.pedata->nsections) {
- memcpy(section, &ctx->sections[num], sizeof(*section));
+ memcpy(section, &ctx->sections[num], sizeof(struct cli_exe_section));
return 0;
}
return -1;
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/libclamav/bytecode_api_decl.c
^
|
@@ -52,7 +52,7 @@
int32_t cli_bcapi_file_byteat(struct cli_bc_ctx *ctx , uint32_t);
uint8_t* cli_bcapi_malloc(struct cli_bc_ctx *ctx , uint32_t);
uint32_t cli_bcapi_test2(struct cli_bc_ctx *ctx , uint32_t);
-int32_t cli_bcapi_get_pe_section(struct cli_bc_ctx *ctx , struct cli_exe_section*, uint32_t);
+int32_t cli_bcapi_get_pe_section(struct cli_bc_ctx *ctx , void*, uint32_t);
int32_t cli_bcapi_fill_buffer(struct cli_bc_ctx *ctx , uint8_t*, uint32_t, uint32_t, uint32_t, uint32_t);
int32_t cli_bcapi_extract_new(struct cli_bc_ctx *ctx , int32_t);
int32_t cli_bcapi_read_number(struct cli_bc_ctx *ctx , uint32_t);
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/libclamav/bytecode_api_impl.h
^
|
@@ -50,7 +50,7 @@
int32_t cli_bcapi_file_byteat(struct cli_bc_ctx *ctx , uint32_t);
uint8_t* cli_bcapi_malloc(struct cli_bc_ctx *ctx , uint32_t);
uint32_t cli_bcapi_test2(struct cli_bc_ctx *ctx , uint32_t);
-int32_t cli_bcapi_get_pe_section(struct cli_bc_ctx *ctx , struct cli_exe_section*, uint32_t);
+int32_t cli_bcapi_get_pe_section(struct cli_bc_ctx *ctx , void*, uint32_t);
int32_t cli_bcapi_fill_buffer(struct cli_bc_ctx *ctx , uint8_t*, uint32_t, uint32_t, uint32_t, uint32_t);
int32_t cli_bcapi_extract_new(struct cli_bc_ctx *ctx , int32_t);
int32_t cli_bcapi_read_number(struct cli_bc_ctx *ctx , uint32_t);
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/libclamav/c++/Makefile.am
^
|
@@ -37,7 +37,7 @@
libclamavcxx_la_LDFLAGS = @LLVMCONFIG_LDFLAGS@ @LLVMCONFIG_LIBS@
libclamavcxx_la_DEPENDENCIES = @LLVMCONFIG_LIBFILES@
noinst_LTLIBRARIES = libclamavcxx.la
-libclamavcxx_la_SOURCES += PointerTracking.cpp
+libclamavcxx_la_SOURCES += PointerTracking.cpp PointerTracking.h
else
AM_CPPFLAGS += $(LLVM_INCLUDES) $(LLVM_DEFS)
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/libclamav/c++/Makefile.in
^
|
@@ -51,7 +51,7 @@
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
-@BUILD_EXTERNAL_LLVM_TRUE@am__append_1 = PointerTracking.cpp
+@BUILD_EXTERNAL_LLVM_TRUE@am__append_1 = PointerTracking.cpp PointerTracking.h
@BUILD_EXTERNAL_LLVM_FALSE@am__append_2 = $(LLVM_INCLUDES) $(LLVM_DEFS)
@BUILD_EXTERNAL_LLVM_FALSE@@BUILD_X86_TRUE@am__append_3 = libllvmx86codegen.la
@BUILD_EXTERNAL_LLVM_FALSE@@BUILD_X86_TRUE@am__append_4 = libllvmx86codegen.la
@@ -84,7 +84,7 @@
LTLIBRARIES = $(noinst_LTLIBRARIES)
am__libclamavcxx_la_SOURCES_DIST = bytecode2llvm.cpp \
ClamBCRTChecks.cpp ClamBCModule.h ClamBCDiagnostics.h \
- detect.cpp PointerTracking.cpp
+ detect.cpp PointerTracking.cpp PointerTracking.h
@BUILD_EXTERNAL_LLVM_TRUE@am__objects_1 = \
@BUILD_EXTERNAL_LLVM_TRUE@ libclamavcxx_la-PointerTracking.lo
am_libclamavcxx_la_OBJECTS = libclamavcxx_la-bytecode2llvm.lo \
|
[-]
[+]
|
Added |
clamav-0.97.4.tar.bz2/libclamav/c++/PointerTracking.h
^
|
@@ -0,0 +1,132 @@
+//===- PointerTracking.h - Pointer Bounds Tracking --------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements tracking of pointer bounds.
+// It knows that the libc functions "calloc" and "realloc" allocate memory, thus
+// you should avoid using this pass if they mean something else for your
+// language.
+//
+// All methods assume that the pointer is not NULL, if it is then the returned
+// allocation size is wrong, and the result from checkLimits is wrong too.
+// It also assumes that pointers are valid, and that it is not analyzing a
+// use-after-free scenario.
+// Due to these limitations the "size" returned by these methods should be
+// considered as either 0 or the returned size.
+//
+// Another analysis pass should be used to find use-after-free/NULL dereference
+// bugs.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_ANALYSIS_POINTERTRACKING_H
+#define LLVM_ANALYSIS_POINTERTRACKING_H
+
+#include "llvm/ADT/SmallPtrSet.h"
+#include "llvm/Analysis/Dominators.h"
+#include "llvm/Instructions.h"
+#include "llvm/Pass.h"
+#include "llvm/Support/PredIteratorCache.h"
+
+namespace llvm {
+ class DominatorTree;
+ class ScalarEvolution;
+ class SCEV;
+ class Loop;
+ class LoopInfo;
+ class TargetData;
+
+ // Result from solver, assuming pointer is not NULL,
+ // and it is not a use-after-free situation.
+ enum SolverResult {
+ AlwaysFalse,// always false with above constraints
+ AlwaysTrue,// always true with above constraints
+ Unknown // it can sometimes be true, sometimes false, or it is undecided
+ };
+
+ class PointerTracking : public FunctionPass {
+ public:
+ typedef ICmpInst::Predicate Predicate;
+ static char ID;
+ PointerTracking();
+
+ virtual bool doInitialization(Module &M);
+
+ // If this pointer directly points to an allocation, return
+ // the number of elements of type Ty allocated.
+ // Otherwise return CouldNotCompute.
+ // Since allocations can fail by returning NULL, the real element count
+ // for every allocation is either 0 or the value returned by this function.
+ const SCEV *getAllocationElementCount(Value *P) const;
+
+ // Same as getAllocationSize() but returns size in bytes.
+ // We consider one byte as 8 bits.
+ const SCEV *getAllocationSizeInBytes(Value *V) const;
+
+ // Given a Pointer, determine a base pointer of known size, and an offset
+ // therefrom.
+ // When unable to determine, sets Base to NULL, and Limit/Offset to
+ // CouldNotCompute.
+ // BaseSize, and Offset are in bytes: Pointer == Base + Offset
+ void getPointerOffset(Value *Pointer, Value *&Base, const SCEV *& BaseSize,
+ const SCEV *&Offset) const;
+
+ // Compares the 2 scalar evolution expressions according to predicate,
+ // and if it can prove that the result is always true or always false
+ // return AlwaysTrue/AlwaysFalse. Otherwise it returns Unknown.
+ enum SolverResult compareSCEV(const SCEV *A, Predicate Pred, const SCEV *B,
+ const Loop *L);
+
+ // Determines whether the condition LHS <Pred> RHS is sufficient
+ // for the condition A <Pred> B to hold.
+ // Currently only ULT/ULE is supported.
+ // This errs on the side of returning false.
+ bool conditionSufficient(const SCEV *LHS, Predicate Pred1, const SCEV *RHS,
+ const SCEV *A, Predicate Pred2, const SCEV *B,
+ const Loop *L);
+
+ // Determines whether Offset is known to be always in [0, Limit) bounds.
+ // This errs on the side of returning Unknown.
+ enum SolverResult checkLimits(const SCEV *Offset, const SCEV *Limit,
+ BasicBlock *BB);
+
+ virtual bool runOnFunction(Function &F);
+ virtual void getAnalysisUsage(AnalysisUsage &AU) const;
+ void print(raw_ostream &OS, const Module* = 0) const;
+ Value *computeAllocationCountValue(Value *P, const Type *&Ty) const;
+ private:
+ Function *FF;
+ TargetData *TD;
+ ScalarEvolution *SE;
+ LoopInfo *LI;
+ DominatorTree *DT;
+
+ Function *callocFunc;
+ Function *reallocFunc;
+ PredIteratorCache predCache;
+
+ SmallPtrSet<const SCEV*, 1> analyzing;
+
+ enum SolverResult isLoopGuardedBy(const Loop *L, Predicate Pred,
+ const SCEV *A, const SCEV *B) const;
+ static bool isMonotonic(const SCEV *S);
+ bool scevPositive(const SCEV *A, const Loop *L, bool strict=true) const;
+ bool conditionSufficient(Value *Cond, bool negated,
+ const SCEV *A, Predicate Pred, const SCEV *B);
+ Value *getConditionToReach(BasicBlock *A,
+ DomTreeNodeBase<BasicBlock> *B,
+ bool &negated);
+ Value *getConditionToReach(BasicBlock *A,
+ BasicBlock *B,
+ bool &negated);
+ const SCEV *computeAllocationCount(Value *P, const Type *&Ty) const;
+ const SCEV *computeAllocationCountForType(Value *P, const Type *Ty) const;
+ };
+}
+#endif
+
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/libclamav/entconv.c
^
|
@@ -78,8 +78,11 @@
if(u16 < 0xff) {
assert((uint8_t)u16 != 0);
*out++ = (uint8_t)u16;
- } else {
- size_t i;
+ } else if (u16 == 0x3002 || u16 == 0xFF0E || u16 == 0xFE52) {
+ /* bb #4097 */
+ *out++ = '.';
+ } else {
+ size_t i;
/* normalize only >255 to speed up */
if(limit <= 8) {
/* not enough space available */
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/libclamav/filetypes_int.h
^
|
@@ -56,7 +56,6 @@
"0:0:48692e20546869732069732074686520716d61696c2d73656e64:Qmail bounce:CL_TYPE_ANY:CL_TYPE_MAIL",
"0:0:494433:MP3:CL_TYPE_ANY:CL_TYPE_IGNORED",
"0:0:49545346:MS CHM:CL_TYPE_ANY:CL_TYPE_MSCHM",
- "0:0:4d534346:MS CAB:CL_TYPE_ANY:CL_TYPE_MSCAB",
"0:0:4d5a:MS-EXE/DLL:CL_TYPE_ANY:CL_TYPE_MSEXE",
"0:0:4d6573736167652d49443a20:Mail:CL_TYPE_ANY:CL_TYPE_MAIL",
"0:0:4d6573736167652d49643a20:Mail:CL_TYPE_ANY:CL_TYPE_MAIL",
@@ -117,7 +116,6 @@
"1:*:3c6f626a656374:HTML data:CL_TYPE_ANY:CL_TYPE_HTML",
"1:*:3c736372697074:HTML data:CL_TYPE_ANY:CL_TYPE_HTML",
"1:*:3c7461626c65:HTML data:CL_TYPE_ANY:CL_TYPE_HTML",
- "1:*:4d534346:CAB-SFX:CL_TYPE_ANY:CL_TYPE_CABSFX",
"1:*:4d5a{60-300}50450000:PE:CL_TYPE_ANY:CL_TYPE_MSEXE",
"1:*:504b0304:ZIP-SFX:CL_TYPE_ANY:CL_TYPE_ZIPSFX",
"1:*:526172211a0700:RAR-SFX:CL_TYPE_ANY:CL_TYPE_RARSFX",
@@ -164,7 +162,10 @@
"0:0:377f0683002de218:SQLite WAL:CL_TYPE_ANY:CL_TYPE_IGNORED",
"0:0:53514c69746520666f726d6174203300:SQLite database:CL_TYPE_ANY:CL_TYPE_IGNORED",
"0:0:d9d505f920a163d7:SQLite journal:CL_TYPE_ANY:CL_TYPE_IGNORED",
- "0:0:ffd9ffd8:JPEG (bad header):CL_TYPE_ANY:CL_TYPE_GRAPHICS:70",
+ "0:0:435753:SWF (compressed):CL_TYPE_ANY:CL_TYPE_SWF:71",
+ "0:0:465753:SWF (uncompressed):CL_TYPE_ANY:CL_TYPE_SWF:71",
+ "0:0:4d53434600000000:MS CAB:CL_TYPE_ANY:CL_TYPE_MSCAB",
+ "1:*:4d53434600000000:CAB-SFX:CL_TYPE_ANY:CL_TYPE_CABSFX",
NULL
};
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/libclamav/htmlnorm.c
^
|
@@ -53,6 +53,7 @@
typedef enum {
HTML_BAD_STATE,
HTML_NORM,
+ HTML_8BIT,
HTML_COMMENT,
HTML_CHAR_REF,
HTML_ENTITY_REF_DECODE,
@@ -470,10 +471,40 @@
static inline void html_tag_contents_append(struct tag_contents *cont, const unsigned char* begin,const unsigned char *end)
{
size_t i;
+ uint32_t mbchar = 0;
if(!begin || !end)
return;
for(i = cont->pos; i < MAX_TAG_CONTENTS_LENGTH && (begin < end);i++) {
- cont->contents[i] = *begin++;
+ uint8_t c = *begin++;
+ if (mbchar && (c < 0x80 || mbchar >= 0x10000)) {
+ if (mbchar == 0xE38082 || mbchar == 0xEFBC8E
+ || mbchar == 0xEFB992 ||
+ mbchar == 0xA1 && (c == 0x43 || c == 0x44 || c == 0x4F)) {
+ cont->contents[i++] = '.';
+ if (mbchar == 0xA1) {
+ --i;
+ mbchar = 0;
+ continue;
+ }
+ } else {
+ uint8_t c0 = mbchar >> 16;
+ uint8_t c1 = (mbchar >> 8)&0xff;
+ uint8_t c2 = (mbchar & 0xff);
+ if (c0 && i+1 < MAX_TAG_CONTENTS_LENGTH)
+ cont->contents[i++] = c0;
+ if ((c0 || c1) && i+1 < MAX_TAG_CONTENTS_LENGTH)
+ cont->contents[i++] = c1;
+ if (i+1 < MAX_TAG_CONTENTS_LENGTH)
+ cont->contents[i++] = c2;
+ }
+ mbchar = 0;
+ }
+ if (c >= 0x80) {
+ mbchar = (mbchar << 8) | c;
+ --i;
+ }
+ else
+ cont->contents[i] = c;
}
cont->pos = i;
}
@@ -631,6 +662,8 @@
struct parser_state *js_state = NULL;
const unsigned char *js_begin = NULL, *js_end = NULL;
struct tag_contents contents;
+ uint32_t mbchar = 0;
+ uint32_t mbchar2 = 0;
tag_args.scanContents=0;/* do we need to store the contents of <a></a>?*/
contents.pos = 0;
@@ -749,6 +782,42 @@
next_state = HTML_BAD_STATE;
}
break;
+ case HTML_8BIT:
+ if (*ptr < 0x80 || mbchar >= 0x10000) {
+ if (mbchar == 0xE38082 || mbchar == 0xEFBC8E
+ || mbchar == 0xEFB992 ||
+ mbchar == 0xA1 && (*ptr == 0x43 || *ptr == 0x44 || *ptr == 0x4F)) {
+ /* bb #4097 */
+ html_output_c(file_buff_o2, '.');
+ html_output_c(file_buff_text, '.');
+ if (mbchar == 0xA1) {
+ ptr++;
+ mbchar = 0;
+ continue;
+ }
+ } else {
+ uint8_t c0 = mbchar >> 16;
+ uint8_t c1 = (mbchar >> 8)&0xff;
+ uint8_t c2 = (mbchar & 0xff);
+ if (c0) {
+ html_output_c(file_buff_o2, c0);
+ html_output_c(file_buff_text, c0);
+ }
+ if (c0 || c1) {
+ html_output_c(file_buff_o2, c1);
+ html_output_c(file_buff_text, c1);
+ }
+ html_output_c(file_buff_o2, c2);
+ html_output_c(file_buff_text, c1);
+ }
+ mbchar = 0;
+ state = next_state;
+ next_state = HTML_NORM;
+ } else {
+ mbchar = (mbchar << 8) | *ptr;
+ ptr++;
+ }
+ break;
case HTML_NORM:
if (*ptr == '<') {
ptrend=ptr; /* for use by scanContents */
@@ -781,6 +850,11 @@
state = HTML_CHAR_REF;
next_state = HTML_NORM;
ptr++;
+ } else if (*ptr >= 0x80) {
+ state = HTML_8BIT;
+ next_state = HTML_NORM;
+ mbchar = *ptr;
+ ptr++;
} else {
unsigned char c = tolower(*ptr);
/* normalize ' to " for scripts */
@@ -1007,11 +1081,45 @@
ptr++;
}
} else {
+ if (mbchar2 && (*ptr < 0x80 || mbchar2 >= 0x10000)) {
+ if (mbchar2 == 0xE38082 || mbchar2 == 0xEFBC8E
+ || mbchar2 == 0xEFB992 ||
+ mbchar2 == 0xA1 && (*ptr == 0x43 || *ptr == 0x44 || *ptr == 0x4F)) {
+ html_output_c(file_buff_o2, '.');
+ if (tag_val_length < HTML_STR_LENGTH)
+ tag_val[tag_val_length++] = '.';
+ if (mbchar2 == 0xA1) {
+ ptr++;
+ mbchar2 = 0;
+ continue;
+ }
+ } else {
+ uint8_t c0 = mbchar2 >> 16;
+ uint8_t c1 = (mbchar2 >> 8)&0xff;
+ uint8_t c2 = (mbchar2 & 0xff);
+ if (c0)
+ html_output_c(file_buff_o2, c0);
+ if (c0 || c1)
+ html_output_c(file_buff_o2, c1);
+ html_output_c(file_buff_o2, c2);
+ if (c0 && tag_val_length < HTML_STR_LENGTH)
+ tag_val[tag_val_length++] = c0;
+ if ((c0 || c1) && tag_val_length < HTML_STR_LENGTH)
+ tag_val[tag_val_length++] = c1;
+ if (tag_val_length < HTML_STR_LENGTH)
+ tag_val[tag_val_length++] = c2;
+ }
+ mbchar2 = 0;
+ }
+ if (*ptr >= 0x80)
+ mbchar2 = (mbchar2 << 8) | *ptr;
+ else {
html_output_c(file_buff_o2, tolower(*ptr));
if (tag_val_length < HTML_STR_LENGTH) {
tag_val[tag_val_length++] = *ptr;
}
- ptr++;
+ }
+ ptr++;
}
if (*ptr == '\\') {
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/libclamav/matcher-hash.c
^
|
@@ -127,10 +127,14 @@
static inline int hm_cmp(const uint8_t *itm, const uint8_t *ref, unsigned int keylen) {
+#if WORDS_BIGENDIAN == 0
uint32_t i = *(uint32_t *)itm, r = *(uint32_t *)ref;
if(i!=r)
return (i<r) * 2 -1;
return memcmp(&itm[4], &ref[4], keylen - 4);
+#else
+ return memcmp(itm, ref, keylen);
+#endif
}
static void hm_sort(struct cli_sz_hash *szh, size_t l, size_t r, unsigned int keylen) {
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/libclamav/mbox.c
^
|
@@ -2897,7 +2897,7 @@
time(&now);
for(n = 1; n <= t; n++) {
char filename[NAME_MAX + 1];
- const struct dirent *dent;
+ struct dirent *dent;
#if defined(HAVE_READDIR_R_3) || defined(HAVE_READDIR_R_2)
union {
struct dirent d;
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/libclamav/message.c
^
|
@@ -1202,9 +1202,10 @@
} else
/*
* Some virus attachments don't say how they've
- * been encoded. We assume base64
+ * been encoded. We assume base64.
+ * RFC says encoding should be 7-bit.
*/
- messageSetEncoding(m, "base64");
+ messageSetEncoding(m, "7-bit");
}
#endif
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/libclamav/mpool.c
^
|
@@ -64,7 +64,11 @@
#undef CL_DEBUG /* bb#2222 */
+#ifdef C_HPUX
+#define MIN_FRAGSIZE 1048576 /* Goes with LDFLAGS=-Wl,+pd,1M */
+#else
#define MIN_FRAGSIZE 262144
+#endif
#if SIZEOF_VOID_P==8
static const unsigned int fragsz[] = {
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/libclamav/others.h
^
|
@@ -53,7 +53,7 @@
* in re-enabling affected modules.
*/
-#define CL_FLEVEL 63
+#define CL_FLEVEL 64
#define CL_FLEVEL_DCONF CL_FLEVEL
#define CL_FLEVEL_SIGTOOL CL_FLEVEL
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/libclamav/pe.c
^
|
@@ -2506,7 +2506,7 @@
continue;
while(res_sz>4) { /* look for version_info - NOT RESUMABLE (expecting exactly one versioninfo) */
- uint32_t vinfo_sz, vinfo_val_sz;
+ uint32_t vinfo_sz, vinfo_val_sz, got_varfileinfo = 0;
vinfo_sz = vinfo_val_sz = cli_readint32(vptr);
vinfo_sz &= 0xffff;
@@ -2535,7 +2535,14 @@
if(sfi_sz > vinfo_sz)
break; /* the content is larger than the container */
- /* expecting stringfileinfo to always precede varfileinfo */
+ if(!got_varfileinfo && sfi_sz > 6 + 0x18 && !memcmp(vptr+6, "V\0a\0r\0F\0i\0l\0e\0I\0n\0f\0o\0\0\0", 0x18)) {
+ /* skip varfileinfo as it sometimes appear before stringtableinfo */
+ vptr += sfi_sz;
+ vinfo_sz -= sfi_sz;
+ got_varfileinfo = 1;
+ continue;
+ }
+
if(sfi_sz <= 6 + 0x1e || memcmp(vptr+6, "S\0t\0r\0i\0n\0g\0F\0i\0l\0e\0I\0n\0f\0o\0\0\0", 0x1e)) {
/* - there should be enough room for the header(6) and the key "StringFileInfo"(1e)
* - the key should match */
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/libclamav/readdb.c
^
|
@@ -538,6 +538,8 @@
while(cli_dbgets(buffer, FILEBUFF, fs, dbio)) {
line++;
+ if(buffer[0] == '#')
+ continue;
cli_chomp(buffer);
if(engine->ignored)
strcpy(buffer_cpy, buffer);
@@ -884,6 +886,8 @@
while(cli_dbgets(buffer, FILEBUFF, fs, dbio)) {
line++;
+ if(buffer[0] == '#')
+ continue;
if(!phish)
if(!strncmp(buffer, "HTML.Phishing", 13) || !strncmp(buffer, "Email.Phishing", 14))
@@ -1192,7 +1196,7 @@
} while(0);
#define LDB_TOKENS 67
-static int load_oneldb(char *buffer, int chkpua, int chkign, struct cl_engine *engine, unsigned int options, const char *dbname, unsigned int line, unsigned int *sigs, unsigned bc_idx, const char *buffer_cpy)
+static int load_oneldb(char *buffer, int chkpua, struct cl_engine *engine, unsigned int options, const char *dbname, unsigned int line, unsigned int *sigs, unsigned bc_idx, const char *buffer_cpy, int *skip)
{
const char *sig, *virname, *offset, *logic;
struct cli_ac_lsig **newtable, *lsig;
@@ -1214,8 +1218,11 @@
if (chkpua && cli_chkpua(virname, engine->pua_cats, options))
return CL_SUCCESS;
- if (chkign && cli_chkign(engine->ignored, virname, buffer_cpy))
+ if (engine->ignored && cli_chkign(engine->ignored, virname, buffer_cpy ? buffer_cpy : virname)) {
+ if(skip)
+ *skip = 1;
return CL_SUCCESS;
+ }
if(engine->cb_sigload && engine->cb_sigload("ldb", virname, engine->cb_sigload_ctx)) {
cli_dbgmsg("cli_loadldb: skipping %s due to callback\n", virname);
@@ -1375,6 +1382,8 @@
return CL_EMEM;
while(cli_dbgets(buffer, sizeof(buffer), fs, dbio)) {
line++;
+ if(buffer[0] == '#')
+ continue;
sigs++;
cli_chomp(buffer);
@@ -1382,8 +1391,7 @@
strcpy(buffer_cpy, buffer);
ret = load_oneldb(buffer,
engine->pua_cats && (options & CL_DB_PUA_MODE) && (options & (CL_DB_PUA_INCLUDE | CL_DB_PUA_EXCLUDE)),
- !!engine->ignored,
- engine, options, dbname, line, &sigs, 0, buffer_cpy);
+ engine, options, dbname, line, &sigs, 0, buffer_cpy, NULL);
if (ret)
break;
}
@@ -1409,7 +1417,7 @@
static int cli_loadcbc(FILE *fs, struct cl_engine *engine, unsigned int *signo, unsigned int options, struct cli_dbio *dbio, const char *dbname)
{
char buf[4096];
- int rc;
+ int rc, skip = 0;
struct cli_all_bc *bcs = &engine->bcs;
struct cli_bc *bc;
unsigned sigs = 0;
@@ -1470,7 +1478,6 @@
bc->id = bcs->count;/* must set after _load, since load zeroes */
if (engine->bytecode_mode == CL_BYTECODE_MODE_TEST)
cli_infomsg(NULL, "bytecode %u -> %s\n", bc->id, dbname);
- sigs++;
if (bc->kind == BC_LOGICAL || bc->lsig) {
unsigned oldsigs = sigs;
if (!bc->lsig) {
@@ -1478,12 +1485,17 @@
return CL_EMALFDB;
}
cli_dbgmsg("Bytecode %s(%u) has logical signature: %s\n", dbname, bc->id, bc->lsig);
- rc = load_oneldb(bc->lsig, 0, 0, engine, options, dbname, 0, &sigs, bcs->count, NULL);
+ rc = load_oneldb(bc->lsig, 0, engine, options, dbname, 0, &sigs, bcs->count, NULL, &skip);
if (rc != CL_SUCCESS) {
cli_errmsg("Problem parsing logical signature %s for bytecode %s: %s\n",
bc->lsig, dbname, cl_strerror(rc));
return rc;
}
+ if (skip) {
+ cli_bytecode_destroy(bc);
+ bcs->count--;
+ return CL_SUCCESS;
+ }
if (sigs != oldsigs) {
/* compiler ensures Engine field in lsig matches the one in bytecode,
* so this should never happen. */
@@ -1491,6 +1503,7 @@
return CL_EMALFDB;
}
}
+ sigs++;
if (bc->kind != BC_LOGICAL) {
if (bc->lsig) {
/* runlsig will only flip a status bit, not report a match,
@@ -1557,6 +1570,8 @@
} else {
if(!cli_dbgets(buffer, FILEBUFF, fs, dbio))
break;
+ if(buffer[0] == '#')
+ continue;
cli_chomp(buffer);
}
line++;
@@ -1794,6 +1809,8 @@
while(cli_dbgets(buffer, FILEBUFF, fs, dbio)) {
line++;
+ if(buffer[0] == '#')
+ continue;
cli_chomp(buffer);
tokens_count = cli_strtokenize(buffer, ':', IGN_MAX_TOKENS + 1, tokens);
@@ -1883,6 +1900,8 @@
while(cli_dbgets(buffer, FILEBUFF, fs, dbio)) {
line++;
+ if(buffer[0] == '#')
+ continue;
cli_chomp(buffer);
if(engine->ignored)
strcpy(buffer_cpy, buffer);
@@ -2677,7 +2696,7 @@
int cl_statinidir(const char *dirname, struct cl_stat *dbstat)
{
DIR *dd;
- const struct dirent *dent;
+ struct dirent *dent;
#if defined(HAVE_READDIR_R_3) || defined(HAVE_READDIR_R_2)
union {
struct dirent d;
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/libclamav/scanners.c
^
|
@@ -766,6 +766,37 @@
return ret;
}
+static int vba_scandata(const unsigned char *data, unsigned int len, cli_ctx *ctx)
+{
+ struct cli_matcher *groot = ctx->engine->root[0];
+ struct cli_matcher *troot = ctx->engine->root[2];
+ struct cli_ac_data gmdata, tmdata;
+ struct cli_ac_data *mdata[2];
+ int ret;
+
+ if((ret = cli_ac_initdata(&tmdata, troot->ac_partsigs, troot->ac_lsigs, troot->ac_reloff_num, CLI_DEFAULT_AC_TRACKLEN)))
+ return ret;
+
+ if((ret = cli_ac_initdata(&gmdata, groot->ac_partsigs, groot->ac_lsigs, groot->ac_reloff_num, CLI_DEFAULT_AC_TRACKLEN))) {
+ cli_ac_freedata(&tmdata);
+ return ret;
+ }
+ mdata[0] = &tmdata;
+ mdata[1] = &gmdata;
+
+ ret = cli_scanbuff(data, len, 0, ctx, CL_TYPE_MSOLE2, mdata);
+
+ if(ret != CL_VIRUS) {
+ ret = cli_lsig_eval(ctx, troot, &tmdata, NULL, NULL);
+ if(ret != CL_VIRUS)
+ ret = cli_lsig_eval(ctx, groot, &gmdata, NULL, NULL);
+ }
+ cli_ac_freedata(&tmdata);
+ cli_ac_freedata(&gmdata);
+
+ return ret;
+}
+
static int cli_vba_scandir(const char *dirname, cli_ctx *ctx, struct uniq *U)
{
int ret = CL_CLEAN, i, j, fd, data_len, hasmacros = 0;
@@ -806,7 +837,7 @@
/* cli_dbgmsg("Project content:\n%s", data); */
if(ctx->scanned)
*ctx->scanned += data_len / CL_COUNT_PRECISION;
- if(cli_scanbuff(data, data_len, 0, ctx, CL_TYPE_MSOLE2, NULL) == CL_VIRUS) {
+ if(vba_scandata(data, data_len, ctx) == CL_VIRUS) {
free(data);
ret = CL_VIRUS;
break;
@@ -831,7 +862,6 @@
fd = open(vbaname, O_RDONLY|O_BINARY);
if (fd == -1) continue;
if ((fullname = cli_ppt_vba_read(fd, ctx))) {
- hasmacros++;
if(cli_scandir(fullname, ctx) == CL_VIRUS) {
ret = CL_VIRUS;
}
@@ -858,14 +888,13 @@
for (i = 0; i < vba_project->count; i++) {
cli_dbgmsg("VBADir: Decompress WM project macro:%d key:%d length:%d\n", i, vba_project->key[i], vba_project->length[i]);
data = (unsigned char *)cli_wm_decrypt_macro(fd, vba_project->offset[i], vba_project->length[i], vba_project->key[i]);
- hasmacros++;
if(!data) {
cli_dbgmsg("VBADir: WARNING: WM project '%s' macro %d decrypted to NULL\n", vba_project->name[i], i);
} else {
cli_dbgmsg("Project content:\n%s", data);
if(ctx->scanned)
*ctx->scanned += vba_project->length[i] / CL_COUNT_PRECISION;
- if(cli_scanbuff(data, vba_project->length[i], 0, ctx, CL_TYPE_MSOLE2, NULL) == CL_VIRUS) {
+ if(vba_scandata(data, vba_project->length[i], ctx) == CL_VIRUS) {
free(data);
ret = CL_VIRUS;
break;
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/shared/optparser.c
^
|
@@ -325,6 +325,8 @@
{ "MaxFiles", "max-files", 0, TYPE_NUMBER, MATCH_NUMBER, CLI_DEFAULT_MAXFILES, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "Number of files to be scanned within an archive, a document, or any other\ncontainer file.\nThe value of 0 disables the limit.\nWARNING: disabling this limit or setting it too high may result in severe\ndamage to the system.", "10000" },
+ { "ClamAuth", NULL, 0, TYPE_BOOL, MATCH_BOOL, -1, NULL, 0, OPT_CLAMD, "This option enables on-access scanning with ClamAuth on OS X (BETA).", "no" },
+
{ "ClamukoScanOnAccess", NULL, 0, TYPE_BOOL, MATCH_BOOL, -1, NULL, 0, OPT_CLAMD, "This option enables Clamuko. Dazuko needs to be already configured and\nrunning.", "no" },
{ "ClamukoScannerCount", NULL, 0, TYPE_NUMBER, MATCH_NUMBER, 3, NULL, 0, OPT_CLAMD, "The number of scanner threads that will be started (DazukoFS only).\nHaving multiple scanner threads allows Clamuko to serve multiple\nprocesses simultaneously. This is particularly beneficial on SMP machines.", "3" },
|
[-]
[+]
|
Changed |
clamav-0.97.4.tar.bz2/sigtool/sigtool.c
^
|
@@ -71,7 +71,7 @@
#include "libclamav/readdb.h"
#include "libclamav/others.h"
-#define MAX_DEL_LOOKAHEAD 200
+#define MAX_DEL_LOOKAHEAD 5000
static const struct dblist_s {
const char *ext;
|