]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:rpc_client: make most of rpc_pipe_client internal struct members
authorStefan Metzmacher <metze@samba.org>
Thu, 19 Sep 2024 04:43:14 +0000 (06:43 +0200)
committerJule Anger <janger@samba.org>
Thu, 12 Jun 2025 11:27:15 +0000 (11:27 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit ae88941c8a2e4e9c7d0deb9c39dcbb2f9fab0ebb)

source3/rpc_client/cli_pipe.c
source3/rpc_client/rpc_client.h

index c1b7930fe9e8228d29dabc8e50db90e5a0fe47a3..b2588da57cafa41487ca7ff82c3d8faf83d35f43 100644 (file)
@@ -19,6 +19,8 @@
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
+#define SOURCE3_LIBRPC_INTERNALS 1
+
 #include "includes.h"
 #include "libsmb/namequery.h"
 #include "../lib/util/tevent_ntstatus.h"
index b1c3db5245190347bd1753cb89d08a120c7f6ee8..84422188a498444d1667e45eb247b131575c0e90 100644 (file)
 #include "../librpc/ndr/libndr.h"
 #include "rpc_client/rpc_transport.h"
 
+#ifdef SOURCE3_LIBRPC_INTERNALS
+#define SOURCE3_LIBRPC_INTERNALS_BEGIN
+#define SOURCE3_LIBRPC_INTERNALS_END
+#else /* SOURCE3_LIBRPC_INTERNALS */
+#define SOURCE3_LIBRPC_INTERNALS_BEGIN struct {
+#define SOURCE3_LIBRPC_INTERNALS_END } internal;
+#endif /* not SOURCE3_LIBRPC_INTERNALS */
+
 struct dcerpc_binding_handle;
 
 struct rpc_pipe_client {
        struct rpc_pipe_client *prev, *next;
 
+       char *printer_username;
+       char *desthost;
+       char *srv_name_slash;
+
+       struct dcerpc_binding_handle *binding_handle;
+
+       SOURCE3_LIBRPC_INTERNALS_BEGIN
+
        DATA_BLOB transport_session_key;
        struct rpc_cli_transport *transport;
-       struct dcerpc_binding_handle *binding_handle;
 
        /*
         * This is per connection
@@ -55,13 +70,11 @@ struct rpc_pipe_client {
        struct ndr_syntax_id transfer_syntax;
        bool verified_pcontext;
 
-       char *printer_username;
-       char *desthost;
-       char *srv_name_slash;
-
        uint16_t max_xmit_frag;
 
        struct pipe_auth_data *auth;
+
+       SOURCE3_LIBRPC_INTERNALS_END;
 };
 
 #endif /* _RPC_CLIENT_H */