]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:librpc: make all but dcerpc_pipe->binding_handle internal struct members
authorStefan Metzmacher <metze@samba.org>
Wed, 18 Sep 2024 21:35:20 +0000 (23:35 +0200)
committerJule Anger <janger@samba.org>
Thu, 12 Jun 2025 11:27:15 +0000 (11:27 +0000)
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 <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 353af4b70559be1665df345655af43a61177c710)

13 files changed:
source4/librpc/rpc/dcerpc.c
source4/librpc/rpc/dcerpc.h
source4/librpc/rpc/dcerpc_auth.c
source4/librpc/rpc/dcerpc_connect.c
source4/librpc/rpc/dcerpc_roh.c
source4/librpc/rpc/dcerpc_schannel.c
source4/librpc/rpc/dcerpc_secondary.c
source4/librpc/rpc/dcerpc_smb.c
source4/librpc/rpc/dcerpc_sock.c
source4/librpc/rpc/dcerpc_util.c
source4/librpc/rpc/pyrpc.c
source4/librpc/rpc/pyrpc_util.c
source4/rpc_server/remote/dcesrv_remote.c

index feacdcb2f59188851e763a56c6a259c73d481678..2224186aee235de34bbb68faf866537254410bde 100644 (file)
@@ -20,6 +20,8 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#define SOURCE4_LIBRPC_INTERNALS 1
+
 #include "includes.h"
 #include "lib/util/util_file.h"
 #include "system/filesys.h"
index dab66501b924fb88174b066938e85bf8d5f56a13..5b14f7b79ce8f5de88bb38daabad66649015306f 100644 (file)
 #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 */
index 7f84bdf38a3b478a7f65390bb4ca1ba4b7d0ec37..e8e48cef23cf2ae3d53e38654b381a199b3d14ac 100644 (file)
@@ -21,6 +21,8 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#define SOURCE4_LIBRPC_INTERNALS 1
+
 #include "includes.h"
 #include <tevent.h>
 #include "libcli/composite/composite.h"
index 69183a22875a6e4c5863440e5f5f0a53d8ebc3eb..7745b699a62ad15e4029001a29a48ce53bd0e0d9 100644 (file)
@@ -22,6 +22,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#define SOURCE4_LIBRPC_INTERNALS 1
 
 #include "includes.h"
 #include "libcli/composite/composite.h"
index 82ed5315805d6cafbd24b5288737f0511fc55640..c2fc5293ce7d9d2e569fd2c58339984f1f3882ad 100644 (file)
@@ -19,6 +19,8 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#define SOURCE4_LIBRPC_INTERNALS 1
+
 #include "includes.h"
 #include "lib/events/events.h"
 #include "lib/util/tevent_ntstatus.h"
index 8622791fe302a1b68b9442e23862c2c229badce4..033b964233cae5b3cef827dbdeaca69fa40adf3f 100644 (file)
@@ -21,6 +21,8 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#define SOURCE4_LIBRPC_INTERNALS 1
+
 #include "includes.h"
 #include <tevent.h>
 #include "auth/auth.h"
index 55068dc107249d0b9acc27c2f7e3f2872b9dc441..7a4c254d5894c5e5c73b955ef024ca7c80834f8f 100644 (file)
@@ -22,6 +22,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#define SOURCE4_LIBRPC_INTERNALS 1
 
 #include "includes.h"
 #include "libcli/composite/composite.h"
index 259de719928f84e49509a75cf2c4d3f59bc23470..26fd2b0789f018df649edd8fddf79bf55943c493 100644 (file)
@@ -20,6 +20,8 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#define SOURCE4_LIBRPC_INTERNALS 1
+
 #include "includes.h"
 #include "system/filesys.h"
 #include <tevent.h>
index ec5a5ca8f8ef107dc1be939aa9e9823367f6843c..24eb17ed3b31396423d57b00fda93c962672a074 100644 (file)
@@ -21,6 +21,8 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#define SOURCE4_LIBRPC_INTERNALS 1
+
 #include "includes.h"
 #include "system/filesys.h"
 #include "lib/events/events.h"
index f40b872ab407e49aecfa11443dfa5b870e87e580..d0a163500fe48b54f6ee83c5362792b7efbc9e56 100644 (file)
@@ -22,6 +22,8 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#define SOURCE4_LIBRPC_INTERNALS 1
+
 #include "includes.h"
 #include "lib/events/events.h"
 #include "libcli/composite/composite.h"
index 4f7f4cd1d9643032a9e888e38f7c699f3c829e75..5ea829b80fb14e0cafd38cf337b90a7ff1b0252a 100644 (file)
@@ -17,6 +17,8 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#define SOURCE4_LIBRPC_INTERNALS 1
+
 #include "lib/replace/system/python.h"
 #include "python/py3compat.h"
 #include "includes.h"
index a0910b4f802dca2814b6ee516d5250e2e6476b11..e8de2f39eaeb76841d87b119382bb99136f14ae3 100644 (file)
@@ -20,6 +20,8 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#define SOURCE4_LIBRPC_INTERNALS 1
+
 #include "lib/replace/system/python.h"
 #include "python/py3compat.h"
 #include "includes.h"
index 08927521a1ea4f61199a7ce2985684b2d69a07e3..2500694f9d59f483602d995edd92c6bf0126e933 100644 (file)
@@ -20,6 +20,8 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#define SOURCE4_LIBRPC_INTERNALS 1
+
 #include "includes.h"
 #include <tevent.h>
 #include "rpc_server/dcerpc_server.h"