s4:rpc_server: only use the new dcesrv_handle_{create,lookup}() api
authorStefan Metzmacher <metze@samba.org>
Thu, 8 Nov 2018 11:20:44 +0000 (12:20 +0100)
committerJeremy Allison <jra@samba.org>
Sat, 12 Jan 2019 02:13:35 +0000 (03:13 +0100)
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 <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/rpc_server/dcerpc_server.h

index 8cf7ed8cf04abc3e87df8f7e6d194b25dbc17f96..ba14ab8f824eace11f3a868760d5706779d6c899 100644 (file)
@@ -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)