Hi,
there are some things I stumbled over during my last server update.
If spamsum is enabled at compile time, make will fail because
ldconfig is not in PATH (at least for debian). And more important
if spamsum can't find the specified file, it throws back a segmentation
fault.
I also updated the usage hints when spamdrop -h is called.
Regards
Christoph Wilke
--- clapf-nightly/config.h 2009-12-03 15:37:17.000000000 +0100
+++ clapf-20091203/config.h 2009-12-06 19:55:46.000000000 +0100
@@ -55,7 +55,7 @@
#define CLAPFUSAGE "usage: " PROGNAME " -c <config file> -u <uid> -g <gid> -d -V -h"
-#define SPAMDROPUSAGE "usage: spamdrop [-c <config file>] [-u <username>] [-s] [-p] [-H | -S] < message"
+#define SPAMDROPUSAGE "usage: spamdrop [-c <config file>] [-u <username> | -U uid] [-f from] [-r recipient] [-dsp] [-H | -S | -D] < message"
#define LOG_PRIORITY LOG_INFO
--- clapf-0.4.2-rc1.orig/contrib/spamsum/Makefile.in 2009-09-11 14:54:10.000000000 +0200
+++ clapf-0.4.2-rc1/contrib/spamsum/Makefile.in 2009-09-15 20:34:43.000000000 +0200
@@ -35,7 +35,7 @@
ar cr libspamsum.a $(OBJS)
ranlib libspamsum.a
$(CC) -shared -Wl,-soname,libspamsum.so.$(SPAMSUM_VERSION) -o libspamsum.so.$(LIBSPAMSUM_VERSION) $(OBJS) $(MYSQL_OBJS) $(LIBS) $(LDAP_LIBS) @LDFLAGS@
- ldconfig -n .
+ (PATH="\$PATH:/sbin" ldconfig -n .)
ln -sf libspamsum.so.$(SPAMSUM_VERSION) libspamsum.so
%.o: $(srcdir)/%.c
--- clapf-0.4.2-rc1.orig/contrib/spamsum/ssum.c 2009-09-11 14:54:10.000000000 +0200
+++ clapf-0.4.2-rc1/contrib/spamsum/ssum.c 2009-09-15 21:18:28.000000000 +0200
@@ -17,7 +17,7 @@
for(i=1;i<argc;i++){
sum = spamsum_file(argv[i], flags, block_size);
- printf("%s\n", sum);
+ if ( sum != NULL ) printf("%s\n", sum);
free(sum);
}