diff options
Diffstat (limited to 'source4/rpc_server/common')
-rw-r--r-- | source4/rpc_server/common/common.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/rpc_server/common/common.h b/source4/rpc_server/common/common.h index a45f183ca6..67c758a698 100644 --- a/source4/rpc_server/common/common.h +++ b/source4/rpc_server/common/common.h @@ -43,12 +43,19 @@ 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->conn, (inhandle), DCESRV_HANDLE_ANY); \ + (h) = dcesrv_handle_fetch(dce_call->context, (inhandle), DCESRV_HANDLE_ANY); \ DCESRV_CHECK_HANDLE(h); \ if ((t) != DCESRV_HANDLE_ANY && (h)->wire_handle.handle_type != (t)) { \ return retval; \ } \ } while (0) +/* 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); \ + DCESRV_CHECK_HANDLE(h); \ +} while (0) + #define DCESRV_PULL_HANDLE(h, inhandle, t) DCESRV_PULL_HANDLE_RETVAL(h, inhandle, t, NT_STATUS_INVALID_HANDLE) #define DCESRV_PULL_HANDLE_WERR(h, inhandle, t) DCESRV_PULL_HANDLE_RETVAL(h, inhandle, t, WERR_BADFID) |