tinycdb bugfix from Michael Tokarev

Matthias Andree matthias.andree at gmx.de
Sat Jul 12 16:36:53 CEST 2003


Michael sent this tinycdb bug fix and tried to Cc: this list, but as he
isn't subscribed, his mail didn't get through.

Here's his patch:

--- cdb.c.orig	Thu Jun 26 20:36:55 2003
+++ cdb.c	Sat Jul 12 00:18:39 2003
@@ -351,8 +351,7 @@
       error(ENOMEM, "unable to allocate memory");
     strcat(strcpy(tmpname, dbname), ".tmp");
   }
-  fd = open(tmpname,
-            (flags & F_WARNDUP ? O_RDWR : O_WRONLY) | O_CREAT | O_TRUNC, 0644);
+  fd = open(tmpname, O_RDWR | O_CREAT | O_TRUNC, 0644);
   if (fd < 0)
     error(errno, "unable to create %s", tmpname);
   cdb_make_start(&cdb, fd);

-- 
Matthias Andree




More information about the bogofilter-dev mailing list