1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-30 19:42:05 +03:00

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 73cb4aad22)
This commit is contained in:
Andrew Tridgell
2005-06-19 09:31:34 +00:00
committed by Gerald (Jerry) Carter
parent 68853a1c7b
commit c7496c6cdb
10 changed files with 364 additions and 507 deletions

View File

@ -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)