s3:rpcclient: add rpcclient_msg_ctx
authorStefan Metzmacher <metze@samba.org>
Mon, 16 Sep 2013 16:24:44 +0000 (18:24 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 7 Jan 2014 11:47:10 +0000 (12:47 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/rpcclient/rpcclient.c
source3/rpcclient/rpcclient.h

index eae6bbdb5278e517d3f5dbf630351dd8cd805032..7435446873a90d5a44af82e755ad1e8cc2e8ad35 100644 (file)
@@ -33,6 +33,7 @@
 #include "libsmb/libsmb.h"
 #include "auth/gensec/gensec.h"
 #include "../libcli/smb/smbXcli_base.h"
+#include "messages.h"
 
 enum pipe_auth_type_spnego {
        PIPE_AUTH_TYPE_SPNEGO_NONE = 0,
@@ -48,6 +49,7 @@ static enum dcerpc_AuthLevel pipe_default_auth_level = DCERPC_AUTH_LEVEL_NONE;
 static unsigned int timeout = 0;
 static enum dcerpc_transport_t default_transport = NCACN_NP;
 
+struct messaging_context *rpcclient_msg_ctx;
 struct user_auth_info *rpcclient_auth_info;
 struct cli_state *rpcclient_cli_state;
 
@@ -987,6 +989,9 @@ out_free:
        /* We must load interfaces after we load the smb.conf */
        load_interfaces();
 
+       rpcclient_msg_ctx = messaging_init(talloc_autofree_context(),
+                       samba_tevent_context_init(talloc_autofree_context()));
+
        /*
         * Get password
         * from stdin if necessary
index ae12cac4d0a511d0c559efd3e0b87ed784d9151c..48f38c2770c58e38eb22db08454d7604428ab5cb 100644 (file)
@@ -41,6 +41,7 @@ struct cmd_set {
        const char *usage;
 };
 
+extern struct messaging_context *rpcclient_msg_ctx;
 extern struct cli_state *rpcclient_cli_state;
 
 #endif /* RPCCLIENT_H */