summaryrefslogtreecommitdiff
path: root/mail/dbmail/files/patch-0018-Add-definition-for-authldap_free
diff options
context:
space:
mode:
Diffstat (limited to 'mail/dbmail/files/patch-0018-Add-definition-for-authldap_free')
-rw-r--r--mail/dbmail/files/patch-0018-Add-definition-for-authldap_free63
1 files changed, 63 insertions, 0 deletions
diff --git a/mail/dbmail/files/patch-0018-Add-definition-for-authldap_free b/mail/dbmail/files/patch-0018-Add-definition-for-authldap_free
new file mode 100644
index 000000000000..c0f86c1e3b2b
--- /dev/null
+++ b/mail/dbmail/files/patch-0018-Add-definition-for-authldap_free
@@ -0,0 +1,63 @@
+From cf3b24b2ea79c262c7827a954da9105a21b2c7d7 Mon Sep 17 00:00:00 2001
+From: Alan Hicks <ahicks@p-o.co.uk>
+Date: Fri, 14 Oct 2016 13:59:56 +0100
+Subject: [PATCH 18/33] Add definition for authldap_free
+
+---
+ src/modules/authldap.c | 33 +++++++++++++++++----------------
+ 1 file changed, 17 insertions(+), 16 deletions(-)
+
+diff --git src/modules/authldap.c src/modules/authldap.c
+index 2bf3b95..065ee31 100644
+--- src/modules/authldap.c
++++ src/modules/authldap.c
+@@ -28,22 +28,7 @@
+
+ extern char configFile[PATH_MAX];
+
+-/*
+- signal-safe releasing of thread-local ldap connection
+-*/
+-static void authldap_free(gpointer data)
+-{
+- LDAP *c = (LDAP *)data;
+- struct sigaction act, oldact;
+-
+- memset(&act, 0, sizeof(act));
+- memset(&oldact, 0, sizeof(oldact));
+- act.sa_handler = SIG_IGN;
+- sigaction(SIGPIPE, &act, &oldact);
+- ldap_unbind(c);
+- sigaction(SIGPIPE, &oldact, 0);
+-}
+-
++static void authldap_free(gpointer data);
+ static GPrivate ldap_conn_key = G_PRIVATE_INIT (authldap_free);
+ static GOnce ldap_conn_once = G_ONCE_INIT;
+ static int authldap_connect(void);
+@@ -177,6 +162,22 @@ static LDAP * ldap_con_get(void)
+ }
+
+ /*
++ signal-safe releasing of thread-local ldap connection
++*/
++static void authldap_free(gpointer data)
++{
++ LDAP *c = (LDAP *)data;
++ struct sigaction act, oldact;
++
++ memset(&act, 0, sizeof(act));
++ memset(&oldact, 0, sizeof(oldact));
++ act.sa_handler = SIG_IGN;
++ sigaction(SIGPIPE, &act, &oldact);
++ ldap_unbind(c);
++ sigaction(SIGPIPE, &oldact, 0);
++}
++
++/*
+ * auth_ldap_bind()
+ *
+ * Bind to server using config credentials
+--
+2.10.1 (Apple Git-78)
+