c-icap / c-icap-modules Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v2.0
License: GNU General Public License v2.0
When enabling support for hiredis, I get these errors:
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -std=c++11 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wall -fvisibility=hidden -DCI_BUILD_MODULE -D_REENTRANT -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wall -D_FILE_OFFSET_BITS=64 -I/usr/include -I/usr/include/c_icap -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -c redis.cc -fPIC -DPIC -o .libs/redis_la-redis.o
make[2]: Leaving directory '/builddir/build/BUILD/c-icap-modules-fd1a1b7757e28ac547954f2eb63f4815fa241bd3/modules'
In file included from /usr/include/c_icap/stats.h:24,
from redis.cc:9:
/usr/include/c_icap/atomic.h: In function 'void ci_atomic_fetch_add_u32_gl(uint32_t*, uint32_t)':
/usr/include/c_icap/atomic.h:353:62: error: return-statement with a value, in function returning 'void' [-fpermissive]
353 | return ci_atomic_fetch_add_ ## name ## _non_inline_gl(counter, add); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/include/c_icap/atomic.h:432:1: note: in expansion of macro '__ci_implement_atomic_ops_non_inline'
432 | __ci_implement_atomic_ops_non_inline(static inline, u32, uint32_t);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c_icap/atomic.h: In function 'void ci_atomic_fetch_sub_u32_gl(uint32_t*, uint32_t)':
/usr/include/c_icap/atomic.h:356:62: error: return-statement with a value, in function returning 'void' [-fpermissive]
356 | return ci_atomic_fetch_sub_ ## name ## _non_inline_gl(counter, sub); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/include/c_icap/atomic.h:432:1: note: in expansion of macro '__ci_implement_atomic_ops_non_inline'
432 | __ci_implement_atomic_ops_non_inline(static inline, u32, uint32_t);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c_icap/atomic.h: In function 'void ci_atomic_fetch_add_i32_gl(int32_t*, int32_t)':
/usr/include/c_icap/atomic.h:353:62: error: return-statement with a value, in function returning 'void' [-fpermissive]
353 | return ci_atomic_fetch_add_ ## name ## _non_inline_gl(counter, add); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/include/c_icap/atomic.h:433:1: note: in expansion of macro '__ci_implement_atomic_ops_non_inline'
433 | __ci_implement_atomic_ops_non_inline(static inline, i32, int32_t);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c_icap/atomic.h: In function 'void ci_atomic_fetch_sub_i32_gl(int32_t*, int32_t)':
/usr/include/c_icap/atomic.h:356:62: error: return-statement with a value, in function returning 'void' [-fpermissive]
356 | return ci_atomic_fetch_sub_ ## name ## _non_inline_gl(counter, sub); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/include/c_icap/atomic.h:433:1: note: in expansion of macro '__ci_implement_atomic_ops_non_inline'
433 | __ci_implement_atomic_ops_non_inline(static inline, i32, int32_t);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c_icap/atomic.h: In function 'void ci_atomic_fetch_add_u64_gl(uint64_t*, uint64_t)':
/usr/include/c_icap/atomic.h:353:62: error: return-statement with a value, in function returning 'void' [-fpermissive]
353 | return ci_atomic_fetch_add_ ## name ## _non_inline_gl(counter, add); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/include/c_icap/atomic.h:434:1: note: in expansion of macro '__ci_implement_atomic_ops_non_inline'
434 | __ci_implement_atomic_ops_non_inline(static inline, u64, uint64_t);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c_icap/atomic.h: In function 'void ci_atomic_fetch_sub_u64_gl(uint64_t*, uint64_t)':
/usr/include/c_icap/atomic.h:356:62: error: return-statement with a value, in function returning 'void' [-fpermissive]
356 | return ci_atomic_fetch_sub_ ## name ## _non_inline_gl(counter, sub); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/include/c_icap/atomic.h:434:1: note: in expansion of macro '__ci_implement_atomic_ops_non_inline'
434 | __ci_implement_atomic_ops_non_inline(static inline, u64, uint64_t);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c_icap/atomic.h: In function 'void ci_atomic_fetch_add_i64_gl(int64_t*, int64_t)':
/usr/include/c_icap/atomic.h:353:62: error: return-statement with a value, in function returning 'void' [-fpermissive]
353 | return ci_atomic_fetch_add_ ## name ## _non_inline_gl(counter, add); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/include/c_icap/atomic.h:435:1: note: in expansion of macro '__ci_implement_atomic_ops_non_inline'
435 | __ci_implement_atomic_ops_non_inline(static inline, i64, int64_t);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c_icap/atomic.h: In function 'void ci_atomic_fetch_sub_i64_gl(int64_t*, int64_t)':
/usr/include/c_icap/atomic.h:356:62: error: return-statement with a value, in function returning 'void' [-fpermissive]
356 | return ci_atomic_fetch_sub_ ## name ## _non_inline_gl(counter, sub); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/include/c_icap/atomic.h:435:1: note: in expansion of macro '__ci_implement_atomic_ops_non_inline'
435 | __ci_implement_atomic_ops_non_inline(static inline, i64, int64_t);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [Makefile:635: redis_la-redis.lo] Error 1
make[1]: *** [Makefile:425: all-recursive] Error 1
make: *** [Makefile:357: all] Error 2
Btw, any documentation on how this feature should be used?
Hello, the latest version (0.5.5) is not tagged in this repository.
Thanks.
Hi,
I'd like to implement network file scanner on top of icap server, that will get it's responses from squid proxy.
So far I used python icap implementation, and I've decided to check c-icap for achieving better performance.
For a start, my implementation need to get callback on RESPMOD, read the file in stream and than instantly write it back to the squid server. What should. be the best way to achieve this goal ?
Thanks
make all-recursive
make[1]: Entering directory '/home/vtk/Downloads/c-icap-modules'
Making all in .
make[2]: Entering directory '/home/vtk/Downloads/c-icap-modules'
make[2]: Leaving directory '/home/vtk/Downloads/c-icap-modules'
Making all in modules
make[2]: Entering directory '/home/vtk/Downloads/c-icap-modules/modules'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/vtk/Downloads/c-icap-modules/modules'
Making all in services
make[2]: Entering directory '/home/vtk/Downloads/c-icap-modules/services'
Making all in url_check
make[3]: Entering directory '/home/vtk/Downloads/c-icap-modules/services/url_check'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/vtk/Downloads/c-icap-modules/services/url_check'
Making all in virus_scan
make[3]: Entering directory '/home/vtk/Downloads/c-icap-modules/services/virus_scan'
/bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../include -g -O2 -Wall -fvisibility=hidden -DCI_BUILD_MODULE -D_REENTRANT -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -I/usr/local/include -I/usr/local/include/c_icap -MT virus_scan_la-virus_scan.lo -MD -MP -MF .deps/virus_scan_la-virus_scan.Tpo -c -o virus_scan_la-virus_scan.lo test -f 'virus_scan.c' || echo './'
virus_scan.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../include -g -O2 -Wall -fvisibility=hidden -DCI_BUILD_MODULE -D_REENTRANT -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -I/usr/local/include -I/usr/local/include/c_icap -MT virus_scan_la-virus_scan.lo -MD -MP -MF .deps/virus_scan_la-virus_scan.Tpo -c virus_scan.c -fPIC -DPIC -o .libs/virus_scan_la-virus_scan.o
virus_scan.c: In function ‘virus_scan_init_service’:
virus_scan.c:217:78: warning: passing argument 3 of ‘ci_stat_entry_register’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
QS = ci_stat_entry_register("Requests scanned", STAT_INT64_T, stats_label);
^~~~~~~~~~~
In file included from virus_scan.c:36:0:
/usr/local/include/c_icap/stats.h:78:22: note: expected ‘char *’ but argument is of type ‘const char *’
CI_DECLARE_FUNC(int) ci_stat_entry_register(char *label, int type, char *group);
^~~~~~~~~~~~~~~~~~~~~~
virus_scan.c:218:81: warning: passing argument 3 of ‘ci_stat_entry_register’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
QS = ci_stat_entry_register("Virmode requests", STAT_INT64_T, stats_label);
^~~~~~~~~~~
In file included from virus_scan.c:36:0:
/usr/local/include/c_icap/stats.h:78:22: note: expected ‘char *’ but argument is of type ‘const char *’
CI_DECLARE_FUNC(int) ci_stat_entry_register(char *label, int type, char *group);
^~~~~~~~~~~~~~~~~~~~~~
virus_scan.c:219:79: warning: passing argument 3 of ‘ci_stat_entry_register’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ES = ci_stat_entry_register("Body bytes scanned", STAT_KBS_T, stats_label);
^~~~~~~~~~~
In file included from virus_scan.c:36:0:
/usr/local/include/c_icap/stats.h:78:22: note: expected ‘char *’ but argument is of type ‘const char *’
CI_DECLARE_FUNC(int) ci_stat_entry_register(char *label, int type, char *group);
^~~~~~~~~~~~~~~~~~~~~~
virus_scan.c:220:79: warning: passing argument 3 of ‘ci_stat_entry_register’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
FOUND = ci_stat_entry_register("Viruses found", STAT_INT64_T, stats_label);
^~~~~~~~~~~
In file included from virus_scan.c:36:0:
/usr/local/include/c_icap/stats.h:78:22: note: expected ‘char *’ but argument is of type ‘const char *’
CI_DECLARE_FUNC(int) ci_stat_entry_register(char *label, int type, char *group);
^~~~~~~~~~~~~~~~~~~~~~
virus_scan.c:221:79: warning: passing argument 3 of ‘ci_stat_entry_register’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
LURES = ci_stat_entry_register("Scan failures", STAT_INT64_T, stats_label);
^~~~~~~~~~~
In file included from virus_scan.c:36:0:
/usr/local/include/c_icap/stats.h:78:22: note: expected ‘char *’ but argument is of type ‘const char *’
CI_DECLARE_FUNC(int) ci_stat_entry_register(char *label, int type, char *group);
^~~~~~~~~~~~~~~~~~~~~~
virus_scan.c: In function ‘must_scanned’:
virus_scan.c:1039:24: warning: implicit declaration of function ‘ci_magic_type_groups’; did you mean ‘ci_data_type_groups’? [-Wimplicit-function-declaration]
file_groups = ci_magic_type_groups(file_type);
^~~~~~~~~~~~~~~~~~~~
ci_data_type_groups
virus_scan.c:1039:22: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
file_groups = ci_magic_type_groups(file_type);
^
virus_scan.c:1042:26: error: ‘CI_MAGIC_MAX_TYPE_GROUPS’ undeclared (first use in this function); did you mean ‘INADDR_MAX_LOCAL_GROUP’?
while ( i < CI_MAGIC_MAX_TYPE_GROUPS && file_groups[i] >= 0) {
^~~~~~~~~~~~~~~~~~~~~~~~
INADDR_MAX_LOCAL_GROUP
virus_scan.c:1042:26: note: each undeclared identifier is reported only once for each function it appears in
Makefile:511: recipe for target 'virus_scan_la-virus_scan.lo' failed
make[3]: *** [virus_scan_la-virus_scan.lo] Error 1
make[3]: Leaving directory '/home/vtk/Downloads/c-icap-modules/services/virus_scan'
Makefile:364: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/vtk/Downloads/c-icap-modules/services'
Makefile:412: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/vtk/Downloads/c-icap-modules'
Makefile:344: recipe for target 'all' failed
make: *** [all] Error 2
The above error occurs while doing make. Any workaround?
When using srv_content_filtering.Match,Found many false negatives
Hello.
The module cannot be built due libclamav API changes. From ClamAV 0.101.0 announce:
Libclamav API changes:
The following scanning functions now require a filename argument.
This will enable ClamAV to report more details warning and error information in the future, and will also allow for more sensible temp file names. The filename argument may be NULL if a filename is not available.
cl_scandesc
cl_scandesc_callback
cl_scanmap_callback
Scanning options have been converted from a single flag bit-field into a structure of multiple categorized flag bit-fields. This change enabled us to add new scanning options requested by the community. In addition, the name of each scan option has changed a little. As a result, the API changes will require libclamav users to modify how they initialize and pass scan options into calls such as cl_scandesc() .
As in c-icap/c-icap-server#50, also the modules would need some update on the autotools part:
$ autoreconf -vif
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
aclocal: warning: couldn't open directory 'm4': No such file or directory
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: aclocal --force -I m4
autoreconf: running: /usr/bin/autoconf --force
configure.ac:8: warning: 'AM_CONFIG_HEADER': this macro is obsolete.
configure.ac:8: You should use the 'AC_CONFIG_HEADERS' macro instead.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
aclocal.m4:781: AM_CONFIG_HEADER is expanded from...
configure.ac:8: the top level
configure.ac:23: warning: The macro `AC_LIBTOOL_DLOPEN' is obsolete.
configure.ac:23: You should run autoupdate.
m4/ltoptions.m4:113: AC_LIBTOOL_DLOPEN is expanded from...
configure.ac:23: the top level
configure.ac:23: warning: AC_LIBTOOL_DLOPEN: Remove this warning and the call to _LT_SET_OPTION when you
configure.ac:23: put the 'dlopen' option into LT_INIT's first parameter.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
m4/ltoptions.m4:113: AC_LIBTOOL_DLOPEN is expanded from...
configure.ac:23: the top level
configure.ac:24: warning: The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
configure.ac:24: You should run autoupdate.
m4/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:24: the top level
configure.ac:24: warning: AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you
configure.ac:24: put the 'win32-dll' option into LT_INIT's first parameter.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
m4/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:24: the top level
configure.ac:25: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:25: You should run autoupdate.
m4/libtool.m4:100: AC_PROG_LIBTOOL is expanded from...
configure.ac:25: the top level
configure.ac:175: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:175: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
configure.ac:175: the top level
configure.ac:184: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:184: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
configure.ac:184: the top level
configure.ac:196: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:196: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
configure.ac:196: the top level
configure.ac:209: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:209: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
configure.ac:209: the top level
configure.ac:449: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:449: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
configure.ac:449: the top level
configure.ac:471: warning: The macro `AC_HEADER_STDC' is obsolete.
configure.ac:471: You should run autoupdate.
./lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
configure.ac:471: the top level
configure.ac:487: warning: AC_OUTPUT should be used without arguments.
configure.ac:487: You should run autoupdate.
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:14: installing './compile'
configure.ac:13: installing './config.guess'
configure.ac:13: installing './config.sub'
configure.ac:10: installing './install-sh'
configure.ac:10: installing './missing'
modules/Makefile.am: installing './depcomp'
autoreconf: Leaving directory '.'
Thanks.
More of a question, but am I correct that the recent released version 0.5.7 doesn't support lmdb for sguardDB, etc, yet?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.