[dspam/epel7] fix for bug #1193177

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



commit 5c59161ddb065986a94a97e6d2275e6cc86718a5
Author: Nathanael d. Noblet <nathanael@xxxxxxxxx>
Date:   Thu Feb 19 22:58:04 2015 -0700

    fix for bug #1193177

 dspam-sqlite3_drv.patch | 51 +++++++++++++++++++++++++++++++++++++++++++++++++
 dspam.spec              |  7 ++++++-
 2 files changed, 57 insertions(+), 1 deletion(-)
---
diff --git a/dspam-sqlite3_drv.patch b/dspam-sqlite3_drv.patch
new file mode 100644
index 0000000..95b6264
--- /dev/null
+++ b/dspam-sqlite3_drv.patch
@@ -0,0 +1,51 @@
+diff -up ./src/sqlite3_drv.c.sdg ./src/sqlite3_drv.c
+--- ./src/sqlite3_drv.c.sdg	2015-02-16 12:18:49.000000000 -0500
++++ ./src/sqlite3_drv.c	2015-02-16 13:28:52.000000000 -0500
+@@ -435,6 +435,13 @@ _ds_setall_spamrecords (DSPAM_CTX * CTX,
+     return EUNKNOWN;
+   }
+ 
++  if ((sqlite3_exec(s->dbh, "BEGIN", NULL, NULL, NULL)) != SQLITE_OK)
++  {
++    buffer_destroy (query);
++    LOGDEBUG ("_ds_setall_spamrecords: BEGIN transaction failed");
++    return EINVAL;
++  }
++
+   ds_diction_getstat(diction, s->control_token, &control);
+ 
+   snprintf (queryhead, sizeof (queryhead),
+@@ -521,6 +528,7 @@ _ds_setall_spamrecords (DSPAM_CTX * CTX,
+           LOGDEBUG ("_ds_setall_spamrecords: unable to run query: %s", query->data);
+           ds_diction_close(ds_c);
+           buffer_destroy(query);
++	  sqlite3_exec(s->dbh, "ROLLBACK", NULL, NULL, NULL);
+           return EFAILURE;
+         }
+       }
+@@ -552,11 +560,17 @@ _ds_setall_spamrecords (DSPAM_CTX * CTX,
+       _sqlite_drv_query_error (err, query->data);
+       LOGDEBUG ("_ds_setall_spamrecords: unable to run query: %s", query->data);
+       buffer_destroy(query);
++      sqlite3_exec(s->dbh, "ROLLBACK", NULL, NULL, NULL);
+       return EFAILURE;
+     }
+   }
+ 
+   buffer_destroy (query);
++  if ((sqlite3_exec(s->dbh, "COMMIT", NULL, NULL, NULL)) != SQLITE_OK)
++  {
++    LOGDEBUG ("_ds_setall_spamrecords: COMMIT transaction failed");
++    return EINVAL;
++  }
+   return 0;
+ }
+ 
+@@ -1336,7 +1350,7 @@ _sqlite_drv_query_error (const char *err
+     fclose (file);
+   }
+ 
+-  free((char *)error);
++  sqlite3_free((char *)error);
+   return;
+ }
diff --git a/dspam.spec b/dspam.spec
index e6e90ee..044909f 100644
--- a/dspam.spec
+++ b/dspam.spec
@@ -12,7 +12,7 @@
 Summary:                A library and Mail Delivery Agent for Bayesian SPAM filtering
 Name:                   dspam
 Version:                3.10.2
-Release:                9%{?dist}
+Release:                10%{?dist}
 License:                GPLv2
 Group:                  System Environment/Daemons
 Source0:                http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
@@ -28,6 +28,7 @@ Patch2:                 dspam-3.9.0-dspamsock.patch
 Patch3:                 dspam-default-server-port.patch
 Patch4:                 dspam-3.10.2.exim.patch
 Patch5:                 dspam-recipient-corruption.patch
+Patch7:                 dspam-sqlite3_drv.patch
 
 URL:                    http://www.nuclearelephant.com/
 # kept to be able to build EPEL versions
@@ -142,6 +143,7 @@ Web-based interface for DSPAM's powerful Anti-Spam engine.
 %patch3 -p0
 %patch4 -p0
 %patch5 -p1
+%patch7 -p1
 
 %build
 
@@ -371,6 +373,9 @@ exit 0
 %config(noreplace) %{_sysconfdir}/httpd/conf.d/dspam-web.conf
 
 %changelog
+* Thu Feb 19 2015 Nathanael Noblet <nathanael@xxxxxxx> - 3.10.2-10
+- Fix for bug #1193177
+
 * Thu May 23 2013 Nathanael Noblet <nathanael@xxxxxxx> - 3.10.2-9
 - Patch for recipient corruption bug
 
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel





[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux