From eaa8acf6e3488618c6e4f76576b19230037d364f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 12 May 2017 12:27:26 +0200 Subject: [PATCH] s4:ldap_server: remove useless indentation level arround gensec_session_info() Check with git show -w Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- source4/ldap_server/ldap_bind.c | 44 ++++++++++++++++----------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/source4/ldap_server/ldap_bind.c b/source4/ldap_server/ldap_bind.c index cd6b7e43f96..c33eaac9c0e 100644 --- a/source4/ldap_server/ldap_bind.c +++ b/source4/ldap_server/ldap_bind.c @@ -512,33 +512,31 @@ static NTSTATUS ldapsrv_BindSASL(struct ldapsrv_call *call) } } - { - status = gensec_session_info(conn->gensec, call, &session_info); - if (!NT_STATUS_IS_OK(status)) { - result = LDAP_OPERATIONS_ERROR; - errstr = talloc_asprintf(reply, - "SASL:[%s]: Failed to get session info: %s", - req->creds.SASL.mechanism, nt_errstr(status)); - goto do_reply; - } else { - talloc_unlink(conn, conn->session_info); - conn->session_info = talloc_steal(conn, session_info); + status = gensec_session_info(conn->gensec, call, &session_info); + if (!NT_STATUS_IS_OK(status)) { + result = LDAP_OPERATIONS_ERROR; + errstr = talloc_asprintf(reply, + "SASL:[%s]: Failed to get session info: %s", + req->creds.SASL.mechanism, nt_errstr(status)); + goto do_reply; + } else { + talloc_unlink(conn, conn->session_info); + conn->session_info = talloc_steal(conn, session_info); - /* don't leak the old LDB */ - talloc_unlink(conn, conn->ldb); + /* don't leak the old LDB */ + talloc_unlink(conn, conn->ldb); - call->conn->authz_logged = true; + call->conn->authz_logged = true; - status = ldapsrv_backend_Init(conn); + status = ldapsrv_backend_Init(conn); - if (!NT_STATUS_IS_OK(status)) { - result = LDAP_OPERATIONS_ERROR; - errstr = talloc_asprintf(reply, - "SASL:[%s]: Failed to advise samdb of new credentials: %s", - req->creds.SASL.mechanism, - nt_errstr(status)); - goto do_reply; - } + if (!NT_STATUS_IS_OK(status)) { + result = LDAP_OPERATIONS_ERROR; + errstr = talloc_asprintf(reply, + "SASL:[%s]: Failed to advise samdb of new credentials: %s", + req->creds.SASL.mechanism, + nt_errstr(status)); + goto do_reply; } } -- 2.47.2