1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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)
|