diff --git a/config.h.in b/config.h.in index 232912c6aa..ad14bc3d4d 100644 --- a/config.h.in +++ b/config.h.in @@ -174,9 +174,6 @@ /* GeoIP geographic lookup functionality */ #cmakedefine USE_GEOIP -/* Use libclamav */ -#undef USE_LIBCLAMAV - /* Use Google's perftools */ #cmakedefine USE_PERFTOOLS diff --git a/src/FileAnalyzer.cc b/src/FileAnalyzer.cc index 91645334ad..7f9e0b2c2d 100644 --- a/src/FileAnalyzer.cc +++ b/src/FileAnalyzer.cc @@ -7,10 +7,6 @@ magic_t File_Analyzer::magic = 0; magic_t File_Analyzer::magic_mime = 0; #endif -#ifdef HAVE_LIBCLAMAV -struct cl_node* File_Analyzer::clam_root = 0; -#endif - File_Analyzer::File_Analyzer(Connection* conn) : TCP_ApplicationAnalyzer(AnalyzerTag::File, conn) { @@ -23,11 +19,6 @@ File_Analyzer::File_Analyzer(Connection* conn) InitMagic(&magic_mime, MAGIC_MIME); } #endif - -#ifdef HAVE_LIBCLAMAV - if ( ! clam_root ) - InitClamAV(); -#endif } void File_Analyzer::DeliverStream(int len, const u_char* data, bool orig) @@ -74,19 +65,6 @@ void File_Analyzer::Identify() vl->append(new StringVal(descr ? descr : "")); vl->append(new StringVal(mime ? mime : "")); ConnectionEvent(file_transferred, vl); - -#ifdef HAVE_LIBCLAMAV - const char* virname; - int ret = cl_scanbuff(buffer, buffer_len, &virname, clam_root); - - if ( ret == CL_VIRUS ) - { - val_list* vl = new val_list; - vl->append(BuildConnVal()); - vl->append(new StringVal(virname)); - ConnectionEvent(file_virus, vl); - } -#endif } #ifdef HAVE_LIBMAGIC @@ -105,27 +83,3 @@ void File_Analyzer::InitMagic(magic_t* magic, int flags) } } #endif - -#ifdef HAVE_LIBCLAMAV -void File_Analyzer::InitClamAV() - { - unsigned int sigs; - int ret = cl_loaddbdir(cl_retdbdir(), &clam_root, &sigs); - - if ( ret ) - { - error(fmt("can't load ClamAV database: %s", cl_perror(ret))); - clam_root = 0; - return; - } - - ret = cl_build(clam_root); - if ( ret ) - { - error(fmt("can't init ClamAV database: %s", cl_perror(ret))); - cl_free(clam_root); - clam_root = 0; - return; - } - } -#endif diff --git a/src/FileAnalyzer.h b/src/FileAnalyzer.h index a978181d57..f343547210 100644 --- a/src/FileAnalyzer.h +++ b/src/FileAnalyzer.h @@ -11,10 +11,6 @@ #include #endif -#ifdef HAVE_LIBCLAMAV -#include -#endif - class File_Analyzer : public TCP_ApplicationAnalyzer { public: File_Analyzer(Connection* conn); @@ -43,11 +39,6 @@ protected: static magic_t magic; static magic_t magic_mime; #endif - -#ifdef HAVE_LIBCLAMAV - static void InitClamAV(); - static struct cl_node *clam_root; -#endif }; #endif