1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r16795: Fix crash found by Dave Fenwick <djf@samba.org>.

The session_info was not being attached to the connection, so
subsequent checks in the kludge_acl module were looking at free()ed
memory.

Andrew Bartlett
(This used to be commit 7e9079ac7a)
This commit is contained in:
Andrew Bartlett 2006-07-04 03:32:39 +00:00 committed by Gerald (Jerry) Carter
parent 3c9281f014
commit 9da5d4fd69

View File

@ -60,6 +60,7 @@ static NTSTATUS ldapsrv_BindSimple(struct ldapsrv_call *call)
talloc_free(call->conn->session_info);
call->conn->session_info = session_info;
talloc_steal(call->conn, session_info);
/* don't leak the old LDB */
talloc_free(call->conn->ldb);
@ -187,6 +188,7 @@ static NTSTATUS ldapsrv_BindSASL(struct ldapsrv_call *call)
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);
talloc_steal(conn, conn->session_info);
/* don't leak the old LDB */
talloc_free(conn->ldb);