1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-03 01:18:10 +03:00

dcesrv_core: add DCESRV_NOT_USED_ON_WIRE() helper macro

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15425

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
(cherry picked from commit 01577b93cb)
This commit is contained in:
Stefan Metzmacher 2024-09-10 13:56:38 +02:00 committed by Jule Anger
parent 30d744d0a6
commit c7166d2d61

View File

@ -578,6 +578,14 @@ NTSTATUS dcesrv_transport_session_key(struct dcesrv_call_state *call,
return; \
} while(0)
#define DCESRV_NOT_USED_ON_WIRE(__opname) \
static void dcesrv_## __opname(struct dcesrv_call_state *dce_call,\
TALLOC_CTX *mem_ctx, \
struct __opname *r) \
{ \
DCESRV_FAULT_VOID(DCERPC_FAULT_OP_RNG_ERROR); \
}
/* a useful macro for checking the validity of a dcerpc policy handle
and giving the right fault code if invalid */
#define DCESRV_CHECK_HANDLE(h) do {if (!(h)) DCESRV_FAULT(DCERPC_FAULT_CONTEXT_MISMATCH); } while (0)