aboutsummaryrefslogtreecommitdiffstats
path: root/main/cyrus-sasl/cyrus-sasl-2.1.27-dbm-errno.patch
diff options
context:
space:
mode:
authorMartin H├Ąger <martin.haeger@gmail.com>2021-02-21 16:37:32 +0100
committerRasmus Thomsen <oss@cogitri.dev>2021-03-10 22:08:46 +0000
commit930b3523093760e6f6f9d2ee012642f9d3e2f2d8 (patch)
tree1da320658fab20fb244fe9b04e51829ab8e73c50 /main/cyrus-sasl/cyrus-sasl-2.1.27-dbm-errno.patch
parent6fc5e6c61680be17dc61e2a48c3c38f1c4808085 (diff)
downloadaports-930b3523093760e6f6f9d2ee012642f9d3e2f2d8.tar.gz
aports-930b3523093760e6f6f9d2ee012642f9d3e2f2d8.tar.bz2
aports-930b3523093760e6f6f9d2ee012642f9d3e2f2d8.tar.xz
main/cyrus-sasl: (db_gdbm) fix gdbm_errno overlay from gdbm_close
gdbm_close also sets gdbm_errno since version 1.17. This leads to a problem in libsasl as the gdbm_close incovation overlays the gdbm_errno value which is then later used for the error handling. Upstream: https://github.com/cyrusimap/cyrus-sasl/pull/554
Diffstat (limited to 'main/cyrus-sasl/cyrus-sasl-2.1.27-dbm-errno.patch')
-rw-r--r--main/cyrus-sasl/cyrus-sasl-2.1.27-dbm-errno.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/main/cyrus-sasl/cyrus-sasl-2.1.27-dbm-errno.patch b/main/cyrus-sasl/cyrus-sasl-2.1.27-dbm-errno.patch
new file mode 100644
index 0000000000..dd9147d9f5
--- /dev/null
+++ b/main/cyrus-sasl/cyrus-sasl-2.1.27-dbm-errno.patch
@@ -0,0 +1,29 @@
+From af48f6fec9a7b6374d4153c5db894d4a1f349645 Mon Sep 17 00:00:00 2001
+From: Jonas Jelten <jj@sft.mx>
+Date: Sat, 2 Feb 2019 20:53:37 +0100
+Subject: [PATCH] db_gdbm: fix gdbm_errno overlay from gdbm_close
+
+`gdbm_close` also sets gdbm_errno since version 1.17.
+This leads to a problem in `libsasl` as the `gdbm_close` incovation overlays
+the `gdbm_errno` value which is then later used for the error handling.
+---
+ sasldb/db_gdbm.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/sasldb/db_gdbm.c b/sasldb/db_gdbm.c
+index ee56a6bf..c908808e 100644
+--- a/sasldb/db_gdbm.c
++++ b/sasldb/db_gdbm.c
+@@ -107,9 +107,11 @@ int _sasldb_getdata(const sasl_utils_t *utils,
+ gkey.dptr = key;
+ gkey.dsize = key_len;
+ gvalue = gdbm_fetch(db, gkey);
++ int fetch_errno = gdbm_errno;
++
+ gdbm_close(db);
+ if (! gvalue.dptr) {
+- if (gdbm_errno == GDBM_ITEM_NOT_FOUND) {
++ if (fetch_errno == GDBM_ITEM_NOT_FOUND) {
+ utils->seterror(conn, SASL_NOLOG,
+ "user: %s@%s property: %s not found in %s",
+ authid, realm, propName, path);