commit 2b5cd1d6eafb5324e8f600ba78bf31f4af557958 Author: Nathanael d. Noblet <nathanael@xxxxxxxxx> Date: Thu Feb 19 23:02:59 2015 -0700 fix #1193177 dspam-sqlite3_drv.patch | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ dspam.spec | 8 +++++++- 2 files changed, 58 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 c442814..66f37ab 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: 5%{?dist} +Release: 6%{?dist} License: GPLv2 Group: System Environment/Daemons Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz @@ -27,6 +27,8 @@ Source99: dspam-filter-requires.sh Patch1: dspam-3.9.0-docs.patch Patch2: dspam-3.9.0-dspamsock.patch Patch3: dspam-recipient-corruption.patch +Patch7: dspam-sqlite3_drv.patch + URL: http://www.nuclearelephant.com/ # kept to be able to build EPEL versions Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) @@ -140,6 +142,7 @@ Web-based interface for DSPAM's powerful Anti-Spam engine. %patch1 -p0 %patch2 -p0 %patch3 -p1 +%patch7 -p1 %build @@ -379,6 +382,9 @@ exit 0 %config(noreplace) %{_sysconfdir}/httpd/conf.d/dspam-web.conf %changelog +* Thu Feb 19 2015 Nathanael Noblet <nathanael@xxxxxxx> - 3.10.2-6 +- Fix for bug #1193177 + * Fri Jan 30 2015 Nathanael Noblet <nathanael@xxxxxxx> - 3.10.2-5 - Updated dspamc permissions - fixes bug #1185489 -- 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