From: Stefan Metzmacher Date: Thu, 8 Nov 2018 11:20:44 +0000 (+0100) Subject: s4:rpc_server: only use the new dcesrv_handle_{create,lookup}() api X-Git-Tag: talloc-2.1.15~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=237ae037f4e5683213f3ef0d02ac3d411ca1889f;p=thirdparty%2Fsamba.git s4:rpc_server: only use the new dcesrv_handle_{create,lookup}() api BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113 BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892 Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- diff --git a/source4/rpc_server/dcerpc_server.h b/source4/rpc_server/dcerpc_server.h index 8cf7ed8cf04..ba14ab8f824 100644 --- a/source4/rpc_server/dcerpc_server.h +++ b/source4/rpc_server/dcerpc_server.h @@ -161,20 +161,20 @@ struct dcesrv_call_state { * created and fetch using the dcesrv_handle_* functions. * * Use -* dcesrv_handle_new(struct dcesrv_connection \*, uint8 handle_type) +* dcesrv_handle_create(struct dcesrv_call_state \*, uint8 handle_type) * to obtain a new handle of the specified type. Handle types are * unique within each pipe. * * The handle can later be fetched again using: * -* struct dcesrv_handle *dcesrv_handle_fetch( -* struct dcesrv_connection *dce_conn, +* struct dcesrv_handle *dcesrv_handle_lookup( +* struct dcesrv_call_state *dce_call, * struct policy_handle *p, * uint8 handle_type) * * and destroyed by: * -* dcesrv_handle_destroy(struct dcesrv_handle *). +* TALLOC_FREE(struct dcesrv_handle *). * * User data should be stored in the 'data' member of the dcesrv_handle * struct. @@ -481,7 +481,7 @@ NTSTATUS dcesrv_transport_session_key(struct dcesrv_call_state *call, invalid handle or retval if the handle is of the wrong type */ #define DCESRV_PULL_HANDLE_RETVAL(h, inhandle, t, retval) do { \ - (h) = dcesrv_handle_fetch(dce_call->context, (inhandle), DCESRV_HANDLE_ANY); \ + (h) = dcesrv_handle_lookup(dce_call, (inhandle), DCESRV_HANDLE_ANY); \ DCESRV_CHECK_HANDLE(h); \ if ((t) != DCESRV_HANDLE_ANY && (h)->wire_handle.handle_type != (t)) { \ return retval; \ @@ -491,7 +491,7 @@ NTSTATUS dcesrv_transport_session_key(struct dcesrv_call_state *call, /* this checks for a valid policy handle and gives a dcerpc fault if its the wrong type of handle */ #define DCESRV_PULL_HANDLE_FAULT(h, inhandle, t) do { \ - (h) = dcesrv_handle_fetch(dce_call->context, (inhandle), t); \ + (h) = dcesrv_handle_lookup(dce_call, (inhandle), t); \ DCESRV_CHECK_HANDLE(h); \ } while (0)