summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-10-08 09:55:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:39:33 -0500
commit1e14572a2648b000ec6b1567fa72ca9ba6531c48 (patch)
tree5985122952195b19601bf2f286e3f92640158889
parent0b1b8704bdb7c8a37738db722d3b2ac2d2a3e298 (diff)
downloadsamba-1e14572a2648b000ec6b1567fa72ca9ba6531c48.tar.gz
samba-1e14572a2648b000ec6b1567fa72ca9ba6531c48.tar.bz2
samba-1e14572a2648b000ec6b1567fa72ca9ba6531c48.zip
r10832: free the old session info
metze (This used to be commit 16b2569788348ee3654557cf714ea3b204375c3c)
-rw-r--r--source4/ldap_server/ldap_bind.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/ldap_server/ldap_bind.c b/source4/ldap_server/ldap_bind.c
index 9c9cca362b..e9d38ad93b 100644
--- a/source4/ldap_server/ldap_bind.c
+++ b/source4/ldap_server/ldap_bind.c
@@ -105,6 +105,7 @@ reply:
errstr = NULL;
} else if (NT_STATUS_IS_OK(status)) {
struct ldapsrv_partition *part;
+ struct auth_session_info *old_session_info;
result = LDAP_SUCCESS;
errstr = NULL;
@@ -112,11 +113,15 @@ reply:
gensec_have_feature(call->conn->gensec, GENSEC_FEATURE_SIGN)) {
call->conn->enable_wrap = True;
}
+ old_session_info = call->conn->session_info;
+ call->conn->session_info = NULL;
status = gensec_session_info(call->conn->gensec, &call->conn->session_info);
if (!NT_STATUS_IS_OK(status)) {
+ call->conn->session_info = old_session_info;
result = LDAP_OPERATIONS_ERROR;
errstr = talloc_asprintf(reply, "SASL:[%s]: Failed to get session info: %s", req->creds.SASL.mechanism, nt_errstr(status));
} else {
+ talloc_free(old_session_info);
for (part = call->conn->partitions; part; part = part->next) {
if (!part->ops->Bind) {
continue;