Hi, attached is a patch which adds read_config support to libdpsam. There are for sure projects which want to read the dspam configuration file. For this I've added read_config to libdspam.
The next is that dspam links against the shared libdspam. So the dspam binary is smaller and needs less memory. -- andreas -- http://www.cynapses.org/ - cybernetic synapses
Index: dspam-3.8.0/src/Makefile.am =================================================================== --- dspam-3.8.0.orig/src/Makefile.am +++ dspam-3.8.0/src/Makefile.am @@ -34,7 +34,7 @@ DEFS = @DEFS@ -DLOGDIR=\"$(logdir)\" \ -DCONFIG_DEFAULT=\"$(sysconfdir)/dspam.conf\"\ -D_THREAD_SAFE -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D_GNU_SOURCE -lib_LTLIBRARIES = libdspam.la +lib_LTLIBRARIES = libdspam.la if DYNAMIC_DRIVER if BUILD_HASH_DRV @@ -59,7 +59,7 @@ bin_PROGRAMS = dspam dspamc # installed for libdspam include_HEADERS = buffer.h config_shared.h decode.h error.h diction.h \ libdspam.h libdspam_objects.h nodetree.h tokenizer.h ldap_client.h \ - storage_driver.h heap.h config.h + storage_driver.h heap.h config.h pref.h read_config.h # libdspam.a contans objects common for dspam and tools/* binaries libdspam_la_SOURCES = \ @@ -67,19 +67,20 @@ libdspam_la_SOURCES = \ libdspam.c libdspam.h \ heap.c heap.h \ diction.c diction.h \ - base64.c base64.h \ + base64.c base64.h \ buffer.c buffer.h \ util.c util.h \ nodetree.c nodetree.h \ - error.c error.h \ + error.c error.h \ decode.c decode.h \ pref.c pref.h \ + read_config.c read_config.h \ config_shared.c config_shared.h \ bnr.c bnr.h \ hash.c hash.h \ list.c list.h \ ldap_client.c ldap_client.h \ - tokenizer.c tokenizer.h \ + tokenizer.c tokenizer.h \ storage_driver.h if BUILD_NCORE @@ -172,24 +173,23 @@ dspam_SOURCES = \ dspam.c dspam.h \ buffer.h \ storage_driver.h \ - read_config.c read_config.h \ + read_config.h \ config_api.c config_api.h \ daemon.c daemon.h \ client.c client.h \ agent_shared.c agent_shared.h dspam_LDADD = libdspam.la -dspam_LDFLAGS = -static dspamc_SOURCES = \ - config.h libdspam.h language.h \ + config.h language.h \ dspamc.c dspamc.h \ buffer.h error.h \ - read_config.c read_config.h \ + read_config.h \ client.c client.h \ agent_shared.c agent_shared.h -dspamc_LDADD = -lm buffer.o config_shared.o error.o pref.o nodetree.o util.o $(NETLIBS) +dspamc_LDADD = -lm buffer.o config_shared.o error.o read_config.o pref.o nodetree.o util.o $(NETLIBS) dspamc_LDFLAGS = -static # Failing of chgrp is expected and normal case when someone do
signature.asc
Description: OpenPGP digital signature