Minor fixes

Baruch Even baruch at ev-en.org
Wed Oct 23 12:47:26 CEST 2002


I couldn't do without forgetting the patches, so here they are.

Baruch

* Baruch Even <baruch at ev-en.org> [021023 11:39]:
> Hello,
> 
> I've started using bogofilter and liked it, I also looked at the todo
> list, the bug list and the code and would like to provide the following
> feedback and patches.
> 
> Bug #618200 is about Judy and can be closed.
> 
> Bug #609897 is about null bytes and was fixed in CVS already.
> 
> Bug #616242, string overflow in stats, is fixed by patch strncpy.patch
> 
> Bug #624300, syslog should be optional, is already implemented, and
> syslog.patch prevents log from being opened needlessly.
> 
> I also provide:
> 
> makefile.patch - version.sh is run from local directory, my computer
> doesn't have . in the path.
> 
> todo.patch - Modifies the todo a little
> 
> typo.patch - a minor comment typo in lexer.l
> 
> That's it for now.
> 
> Thanks for a cool program!
> 
> Baruch
> 
> p.s. Where can I find the mailing list archives?
> 
> -- 
> Baruch Even
> http://baruch.ev-en.org/
> 
> ---------------------------------------------------------------------
> FAQ: http://bogofilter.sourceforge.net/bogofilter-faq.html
> To unsubscribe, e-mail: bogofilter-dev-unsubscribe at aotto.com
> For summary digest subscription: bogofilter-dev-digest-subscribe at aotto.com
> For more commands, e-mail: bogofilter-dev-help at aotto.com

-- 
Baruch Even
http://baruch.ev-en.org/
-------------- next part --------------
Index: Makefile.am
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/Makefile.am,v
retrieving revision 1.35
diff -u -r1.35 Makefile.am
--- Makefile.am	23 Oct 2002 03:37:14 -0000	1.35
+++ Makefile.am	23 Oct 2002 08:03:02 -0000
@@ -39,7 +39,7 @@
 #
 VERSION_FROM=main.c bogofilter.c bogoutil.c lexer.l
 version.h:	version.sh $(VERSION_FROM)
-	version.sh $(VERSION_FROM) >$@
+	./version.sh $(VERSION_FROM) >$@
 #
 debugtest: debug.c
 	$(CC) -DMAIN $(CFLAGS) -o debugtest debug.c

-------------- next part --------------
Index: bogofilter.c
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/bogofilter.c,v
retrieving revision 1.49
diff -u -r1.49 bogofilter.c
--- bogofilter.c	22 Oct 2002 21:20:40 -0000	1.49
+++ bogofilter.c	23 Oct 2002 08:03:04 -0000
@@ -322,6 +322,7 @@
 	}
 	hit->prob = prob;
 	strncpy(hit->key, text, MAXTOKENLEN);
+	hit->key[MAXTOKENLEN] = '\0';
     }
 }
 

-------------- next part --------------
Index: main.c
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/main.c,v
retrieving revision 1.47
diff -u -r1.47 main.c
--- main.c	23 Oct 2002 03:32:47 -0000	1.47
+++ main.c	23 Oct 2002 08:03:06 -0000
@@ -105,10 +105,6 @@
     int	  ch;
     int   exitcode = 0;
 
-#ifdef HAVE_SYSLOG_H
-    openlog ( "bogofilter", LOG_PID, LOG_DAEMON );
-#endif
-
     set_dir_from_env(directory, "HOME", BOGODIR);
     set_dir_from_env(directory, "BOGOFILTER_DIR", NULL);
 
@@ -284,6 +280,8 @@
 #ifdef HAVE_SYSLOG_H
     if (logflag)
     {
+	openlog("bogofilter", LOG_PID, LOG_DAEMON);
+
 	switch (run_type)
 	{
 	case RUN_NORMAL:
@@ -296,6 +294,8 @@
 	    syslog(LOG_INFO, msg_register);
 	    break;
 	}
+
+	closelog();
     }
 #endif
 
-------------- next part --------------
Index: TODO
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/TODO,v
retrieving revision 1.5
diff -u -r1.5 TODO
--- TODO	17 Sep 2002 00:26:28 -0000	1.5
+++ TODO	23 Oct 2002 08:03:02 -0000
@@ -42,7 +42,7 @@
 with existing web mail systems.
 
 9) Performance Enhancement: Investigate if mmap/msync might help
-performance. Don't the db3 libraries probably already implement these?
+performance. The db4 library does it already.
 
 10) New Feature: Add support for a user configurable list of headers that 
 should be used to ignore (single or multi-line) headers that appear in the 
@@ -55,15 +55,11 @@
 the configure script to fail if this option is used on a system that does 
 not have fcntl support.
 
-12) Record the message count as a value in the db file. Use a magic key that 
-can't collide with any words (by using uppercase letters or nonprintable 
-characters). This will obviate the need for .count files.
-
-13) Create a wordlist import/export tool that runs as a separate CLI
+12) Create a wordlist import/export tool that runs as a separate CLI
 program. It should be able to dump wordlists into 'makemap' compatible text
 files, and be able to convert those files back to wordlist files.
 
-14) Provide support for the BerkeleyDB v1 API. If the configure script can't
+13) Provide support for the BerkeleyDB v1 API. If the configure script can't
 find a version 2+ version of the BerkeleyDB package, it should #define
 a variable that allows alternate database procedures to be compiled in.
 

-------------- next part --------------
Index: lexer.l
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/lexer.l,v
retrieving revision 1.13
diff -u -r1.13 lexer.l
--- lexer.l	22 Oct 2002 11:30:34 -0000	1.13
+++ lexer.l	23 Oct 2002 08:03:05 -0000
@@ -25,7 +25,7 @@
 // We throw away *all* tokens of length 1 or 2.
 //
 // These are optimizations to keep the token lists from bloating.
-// The big win is regognizing machine-generated unique IDs that
+// The big win is recognizing machine-generated unique IDs that
 // we'll never see again and shouldn't 
 //
 // We don't treat dot between two alphanumerics as a separator,




More information about the bogofilter-dev mailing list