mirror of
https://github.com/samba-team/samba.git
synced 2025-10-24 15:33:20 +03:00
r4640: first stage in the server side support for multiple context_ids on one pipe
this stage does the following:
- simplifies the dcerpc_handle handling, and all the callers of it
- split out the context_id depenent state into a linked list of established contexts
- fixed some talloc handling in several rpc servers that i noticed while doing the above
(This used to be commit fde042b3fc)
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
3136462ea9
commit
577218b2ad
@@ -26,14 +26,6 @@
|
||||
#include "rpc_server/common/common.h"
|
||||
#include "rpc_server/drsuapi/dcesrv_drsuapi.h"
|
||||
|
||||
/*
|
||||
destroy a general handle.
|
||||
*/
|
||||
static void drsuapi_handle_destroy(struct dcesrv_connection *conn, struct dcesrv_handle *h)
|
||||
{
|
||||
talloc_free(h->data);
|
||||
}
|
||||
|
||||
/*
|
||||
drsuapi_DsBind
|
||||
*/
|
||||
@@ -57,14 +49,13 @@ static WERROR drsuapi_DsBind(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem
|
||||
return WERR_FOOBAR;
|
||||
}
|
||||
|
||||
handle = dcesrv_handle_new(dce_call->conn, DRSUAPI_BIND_HANDLE);
|
||||
handle = dcesrv_handle_new(dce_call->context, DRSUAPI_BIND_HANDLE);
|
||||
if (!handle) {
|
||||
talloc_free(b_state);
|
||||
return WERR_NOMEM;
|
||||
}
|
||||
|
||||
handle->data = b_state;
|
||||
handle->destroy = drsuapi_handle_destroy;
|
||||
handle->data = talloc_steal(handle, b_state);
|
||||
|
||||
bind_info = talloc_p(mem_ctx, struct drsuapi_DsBindInfoCtr);
|
||||
WERR_TALLOC_CHECK(bind_info);
|
||||
@@ -88,7 +79,7 @@ static WERROR drsuapi_DsBind(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem
|
||||
drsuapi_DsUnbind
|
||||
*/
|
||||
static WERROR drsuapi_DsUnbind(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
|
||||
struct drsuapi_DsUnbind *r)
|
||||
struct drsuapi_DsUnbind *r)
|
||||
{
|
||||
struct dcesrv_handle *h;
|
||||
|
||||
@@ -96,10 +87,7 @@ static WERROR drsuapi_DsUnbind(struct dcesrv_call_state *dce_call, TALLOC_CTX *m
|
||||
|
||||
DCESRV_PULL_HANDLE_WERR(h, r->in.bind_handle, DRSUAPI_BIND_HANDLE);
|
||||
|
||||
/* this causes the callback drsuapi_handle_destroy() to be called by
|
||||
the handle destroy code which destroys the state associated
|
||||
with the handle */
|
||||
dcesrv_handle_destroy(dce_call->conn, h);
|
||||
talloc_free(h);
|
||||
|
||||
ZERO_STRUCTP(r->out.bind_handle);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user