summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/rpcclient.c4
-rw-r--r--source3/rpcclient/rpcclient.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index 42c565d211..c88e6b30d8 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -49,6 +49,7 @@ static unsigned int timeout = 0;
static enum dcerpc_transport_t default_transport = NCACN_NP;
struct user_auth_info *rpcclient_auth_info;
+struct cli_state *rpcclient_cli_state;
/* List to hold groups of commands.
*
@@ -1113,7 +1114,7 @@ out_free:
#endif
/* Load command lists */
-
+ rpcclient_cli_state = cli;
timeout = cli_set_timeout(cli, 10000);
cmd_set = rpcclient_command_list;
@@ -1161,6 +1162,7 @@ out_free:
}
done:
+ rpcclient_cli_state = NULL;
if (cli != NULL) {
cli_shutdown(cli);
}
diff --git a/source3/rpcclient/rpcclient.h b/source3/rpcclient/rpcclient.h
index 762c54aacd..ae12cac4d0 100644
--- a/source3/rpcclient/rpcclient.h
+++ b/source3/rpcclient/rpcclient.h
@@ -41,4 +41,6 @@ struct cmd_set {
const char *usage;
};
+extern struct cli_state *rpcclient_cli_state;
+
#endif /* RPCCLIENT_H */