]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
dcesrv_core: add DCESRV_NOT_USED_ON_WIRE() helper macro
authorStefan Metzmacher <metze@samba.org>
Tue, 10 Sep 2024 11:56:38 +0000 (13:56 +0200)
committerJule Anger <janger@samba.org>
Wed, 13 Nov 2024 10:39:12 +0000 (10:39 +0000)
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 01577b93cbb0a26aba3209cde69475be2e1c5fb8)

librpc/rpc/dcesrv_core.h

index 2bc194008990dbe1ca17e094e135622fa94fed51..24750872b3f5f60fd766727e473700e7565f3c5d 100644 (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)