s4:rpc_server: add dcesrv_handle_{create,lookup}() functions
[samba.git] / source4 / rpc_server / handles.c
index b2b9962a4f596022638fc3a06f272009540b6b95..043870fa663e635ee4d882d4b308f61abdc43cac 100644 (file)
@@ -73,6 +73,13 @@ _PUBLIC_ struct dcesrv_handle *dcesrv_handle_new(struct dcesrv_connection_contex
        return h;
 }
 
+_PUBLIC_
+struct dcesrv_handle *dcesrv_handle_create(struct dcesrv_call_state *call,
+                                          uint8_t handle_type)
+{
+       return dcesrv_handle_new(call->context, handle_type);
+}
+
 /**
   find an internal handle given a wire handle. If the wire handle is NULL then
   allocate a new handle
@@ -122,3 +129,11 @@ _PUBLIC_ struct dcesrv_handle *dcesrv_handle_fetch(
 
        return NULL;
 }
+
+_PUBLIC_
+struct dcesrv_handle *dcesrv_handle_lookup(struct dcesrv_call_state *call,
+                                          const struct policy_handle *p,
+                                          uint8_t handle_type)
+{
+       return dcesrv_handle_fetch(call->context, p, handle_type);
+}