summaryrefslogtreecommitdiff
path: root/source4/ldap_server/ldap_bind.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-06-19 09:31:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:30 -0500
commitc7496c6cdb7bdcdd483868c21457350f567ec054 (patch)
tree5584e0aaf51f9504bc5754d79a147b39af766de2 /source4/ldap_server/ldap_bind.c
parent68853a1c7be11ffaaef4ad2e3f78a97f0b401b68 (diff)
downloadsamba-c7496c6cdb7bdcdd483868c21457350f567ec054.tar.gz
samba-c7496c6cdb7bdcdd483868c21457350f567ec054.tar.bz2
samba-c7496c6cdb7bdcdd483868c21457350f567ec054.zip
r7747: - simplified the ldap server buffer handling
- got rid of the special cases for sasl buffers - added a tls_socket_pending() call to determine how much data is waiting on a tls connection - removed the attempt at async handling of ldap calls. The buffers/sockets are all async, but the calls themselves are sync. (This used to be commit 73cb4aad229d08e17e22d5792580bd43a61b142a)
Diffstat (limited to 'source4/ldap_server/ldap_bind.c')
-rw-r--r--source4/ldap_server/ldap_bind.c32
1 files changed, 7 insertions, 25 deletions
diff --git a/source4/ldap_server/ldap_bind.c b/source4/ldap_server/ldap_bind.c
index 7b416c9726..aba35e0b56 100644
--- a/source4/ldap_server/ldap_bind.c
+++ b/source4/ldap_server/ldap_bind.c
@@ -44,7 +44,8 @@ static NTSTATUS ldapsrv_BindSimple(struct ldapsrv_call *call)
resp->response.referral = NULL;
resp->SASL.secblob = data_blob(NULL, 0);
- return ldapsrv_queue_reply(call, reply);
+ ldapsrv_queue_reply(call, reply);
+ return NT_STATUS_OK;
}
static NTSTATUS ldapsrv_BindSASL(struct ldapsrv_call *call)
@@ -56,8 +57,6 @@ static NTSTATUS ldapsrv_BindSASL(struct ldapsrv_call *call)
int result;
const char *errstr;
NTSTATUS status = NT_STATUS_OK;
- NTSTATUS sasl_status;
- BOOL ret;
DEBUG(10, ("BindSASL dn: %s\n",req->dn));
@@ -105,6 +104,7 @@ reply:
} else if (NT_STATUS_IS_OK(status)) {
result = LDAP_SUCCESS;
errstr = NULL;
+ call->conn->enable_wrap = True;
} else {
result = 49;
errstr = talloc_asprintf(reply, "SASL:[%s]: %s", req->creds.SASL.mechanism, nt_errstr(status));
@@ -115,27 +115,8 @@ reply:
resp->response.errormessage = errstr;
resp->response.referral = NULL;
- sasl_status = status;
- status = ldapsrv_queue_reply(call, reply);
- if (!NT_STATUS_IS_OK(sasl_status) || !NT_STATUS_IS_OK(status)) {
- return status;
- }
-
- status = ldapsrv_do_responses(call->conn);
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
-
- ret = ldapsrv_append_to_buf(&conn->sasl_out_buffer, conn->out_buffer.data, conn->out_buffer.length);
- if (!ret) {
- return NT_STATUS_NO_MEMORY;
- }
- ldapsrv_consumed_from_buf(&conn->out_buffer, conn->out_buffer.length);
- if (NT_STATUS_IS_OK(status)) {
- status = gensec_session_info(conn->gensec, &conn->session_info);
- }
-
- return status;
+ ldapsrv_queue_reply(call, reply);
+ return NT_STATUS_OK;
}
NTSTATUS ldapsrv_BindRequest(struct ldapsrv_call *call)
@@ -163,7 +144,8 @@ NTSTATUS ldapsrv_BindRequest(struct ldapsrv_call *call)
resp->response.referral = NULL;
resp->SASL.secblob = data_blob(NULL, 0);
- return ldapsrv_queue_reply(call, reply);
+ ldapsrv_queue_reply(call, reply);
+ return NT_STATUS_OK;
}
NTSTATUS ldapsrv_UnbindRequest(struct ldapsrv_call *call)