From: Stefan Metzmacher Date: Wed, 18 Sep 2024 21:35:20 +0000 (+0200) Subject: s4:librpc: make all but dcerpc_pipe->binding_handle internal struct members X-Git-Tag: samba-4.21.7~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91e8d63c638cbcc478faccb82191335550a08003;p=thirdparty%2Fsamba.git s4:librpc: make all but dcerpc_pipe->binding_handle internal struct members We could use a dcerpc_internal.h for struct dcecli_security and struct dcecli_connection, but in struct dcerpc_pipe we still expose binding_handle and changing that would require way too much work for now... Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme (cherry picked from commit 353af4b70559be1665df345655af43a61177c710) --- diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c index feacdcb2f59..2224186aee2 100644 --- a/source4/librpc/rpc/dcerpc.c +++ b/source4/librpc/rpc/dcerpc.c @@ -20,6 +20,8 @@ along with this program. If not, see . */ +#define SOURCE4_LIBRPC_INTERNALS 1 + #include "includes.h" #include "lib/util/util_file.h" #include "system/filesys.h" diff --git a/source4/librpc/rpc/dcerpc.h b/source4/librpc/rpc/dcerpc.h index dab66501b92..5b14f7b79ce 100644 --- a/source4/librpc/rpc/dcerpc.h +++ b/source4/librpc/rpc/dcerpc.h @@ -32,6 +32,14 @@ #include "../librpc/ndr/libndr.h" #include "../librpc/rpc/rpc_common.h" +#ifdef SOURCE4_LIBRPC_INTERNALS +#define SOURCE4_LIBRPC_INTERNALS_BEGIN +#define SOURCE4_LIBRPC_INTERNALS_END +#else /* SOURCE4_LIBRPC_INTERNALS */ +#define SOURCE4_LIBRPC_INTERNALS_BEGIN struct { +#define SOURCE4_LIBRPC_INTERNALS_END } internal; +#endif /* not SOURCE4_LIBRPC_INTERNALS */ + struct tevent_context; struct tevent_req; struct dcerpc_binding_handle; @@ -46,6 +54,8 @@ struct dcecli_connection; struct gensec_settings; struct cli_credentials; struct dcecli_security { + SOURCE4_LIBRPC_INTERNALS_BEGIN + enum dcerpc_AuthType auth_type; enum dcerpc_AuthLevel auth_level; uint32_t auth_context_id; @@ -61,6 +71,7 @@ struct dcecli_security { bool verified_bitmask1; + SOURCE4_LIBRPC_INTERNALS_END }; /* @@ -68,6 +79,8 @@ struct dcecli_security { */ struct rpc_request; struct dcecli_connection { + SOURCE4_LIBRPC_INTERNALS_BEGIN + uint32_t call_id; uint32_t srv_max_xmit_frag; uint32_t srv_max_recv_frag; @@ -114,6 +127,8 @@ struct dcecli_connection { /* the negotiated bind time features */ uint16_t bind_time_features; + + SOURCE4_LIBRPC_INTERNALS_END }; /* @@ -122,6 +137,8 @@ struct dcecli_connection { struct dcerpc_pipe { struct dcerpc_binding_handle *binding_handle; + SOURCE4_LIBRPC_INTERNALS_BEGIN + uint32_t context_id; struct GUID object; @@ -146,6 +163,8 @@ struct dcerpc_pipe { bool timed_out; bool verified_pcontext; + + SOURCE4_LIBRPC_INTERNALS_END }; /* default timeout for all rpc requests, in seconds */ diff --git a/source4/librpc/rpc/dcerpc_auth.c b/source4/librpc/rpc/dcerpc_auth.c index 7f84bdf38a3..e8e48cef23c 100644 --- a/source4/librpc/rpc/dcerpc_auth.c +++ b/source4/librpc/rpc/dcerpc_auth.c @@ -21,6 +21,8 @@ along with this program. If not, see . */ +#define SOURCE4_LIBRPC_INTERNALS 1 + #include "includes.h" #include #include "libcli/composite/composite.h" diff --git a/source4/librpc/rpc/dcerpc_connect.c b/source4/librpc/rpc/dcerpc_connect.c index 69183a22875..7745b699a62 100644 --- a/source4/librpc/rpc/dcerpc_connect.c +++ b/source4/librpc/rpc/dcerpc_connect.c @@ -22,6 +22,7 @@ along with this program. If not, see . */ +#define SOURCE4_LIBRPC_INTERNALS 1 #include "includes.h" #include "libcli/composite/composite.h" diff --git a/source4/librpc/rpc/dcerpc_roh.c b/source4/librpc/rpc/dcerpc_roh.c index 82ed5315805..c2fc5293ce7 100644 --- a/source4/librpc/rpc/dcerpc_roh.c +++ b/source4/librpc/rpc/dcerpc_roh.c @@ -19,6 +19,8 @@ along with this program. If not, see . */ +#define SOURCE4_LIBRPC_INTERNALS 1 + #include "includes.h" #include "lib/events/events.h" #include "lib/util/tevent_ntstatus.h" diff --git a/source4/librpc/rpc/dcerpc_schannel.c b/source4/librpc/rpc/dcerpc_schannel.c index 8622791fe30..033b964233c 100644 --- a/source4/librpc/rpc/dcerpc_schannel.c +++ b/source4/librpc/rpc/dcerpc_schannel.c @@ -21,6 +21,8 @@ along with this program. If not, see . */ +#define SOURCE4_LIBRPC_INTERNALS 1 + #include "includes.h" #include #include "auth/auth.h" diff --git a/source4/librpc/rpc/dcerpc_secondary.c b/source4/librpc/rpc/dcerpc_secondary.c index 55068dc1072..7a4c254d589 100644 --- a/source4/librpc/rpc/dcerpc_secondary.c +++ b/source4/librpc/rpc/dcerpc_secondary.c @@ -22,6 +22,7 @@ along with this program. If not, see . */ +#define SOURCE4_LIBRPC_INTERNALS 1 #include "includes.h" #include "libcli/composite/composite.h" diff --git a/source4/librpc/rpc/dcerpc_smb.c b/source4/librpc/rpc/dcerpc_smb.c index 259de719928..26fd2b0789f 100644 --- a/source4/librpc/rpc/dcerpc_smb.c +++ b/source4/librpc/rpc/dcerpc_smb.c @@ -20,6 +20,8 @@ along with this program. If not, see . */ +#define SOURCE4_LIBRPC_INTERNALS 1 + #include "includes.h" #include "system/filesys.h" #include diff --git a/source4/librpc/rpc/dcerpc_sock.c b/source4/librpc/rpc/dcerpc_sock.c index ec5a5ca8f8e..24eb17ed3b3 100644 --- a/source4/librpc/rpc/dcerpc_sock.c +++ b/source4/librpc/rpc/dcerpc_sock.c @@ -21,6 +21,8 @@ along with this program. If not, see . */ +#define SOURCE4_LIBRPC_INTERNALS 1 + #include "includes.h" #include "system/filesys.h" #include "lib/events/events.h" diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c index f40b872ab40..d0a163500fe 100644 --- a/source4/librpc/rpc/dcerpc_util.c +++ b/source4/librpc/rpc/dcerpc_util.c @@ -22,6 +22,8 @@ along with this program. If not, see . */ +#define SOURCE4_LIBRPC_INTERNALS 1 + #include "includes.h" #include "lib/events/events.h" #include "libcli/composite/composite.h" diff --git a/source4/librpc/rpc/pyrpc.c b/source4/librpc/rpc/pyrpc.c index 4f7f4cd1d96..5ea829b80fb 100644 --- a/source4/librpc/rpc/pyrpc.c +++ b/source4/librpc/rpc/pyrpc.c @@ -17,6 +17,8 @@ along with this program. If not, see . */ +#define SOURCE4_LIBRPC_INTERNALS 1 + #include "lib/replace/system/python.h" #include "python/py3compat.h" #include "includes.h" diff --git a/source4/librpc/rpc/pyrpc_util.c b/source4/librpc/rpc/pyrpc_util.c index a0910b4f802..e8de2f39eae 100644 --- a/source4/librpc/rpc/pyrpc_util.c +++ b/source4/librpc/rpc/pyrpc_util.c @@ -20,6 +20,8 @@ along with this program. If not, see . */ +#define SOURCE4_LIBRPC_INTERNALS 1 + #include "lib/replace/system/python.h" #include "python/py3compat.h" #include "includes.h" diff --git a/source4/rpc_server/remote/dcesrv_remote.c b/source4/rpc_server/remote/dcesrv_remote.c index 08927521a1e..2500694f9d5 100644 --- a/source4/rpc_server/remote/dcesrv_remote.c +++ b/source4/rpc_server/remote/dcesrv_remote.c @@ -20,6 +20,8 @@ along with this program. If not, see . */ +#define SOURCE4_LIBRPC_INTERNALS 1 + #include "includes.h" #include #include "rpc_server/dcerpc_server.h"