summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-09-13 11:06:00 +0200
committerAndrew Bartlett <abartlet@samba.org>2013-10-17 08:48:51 +1300
commit053b9759003d3a36856945faaeb9879e8fe445d5 (patch)
tree912cee057c65f937259ebeb94c0ae35d03cce65f
parent1974dbe30c83726a5fce86cbdb31b4375461d30b (diff)
downloadsamba-053b9759003d3a36856945faaeb9879e8fe445d5.tar.gz
samba-053b9759003d3a36856945faaeb9879e8fe445d5.tar.bz2
samba-053b9759003d3a36856945faaeb9879e8fe445d5.zip
s3:rpcclient: introduce global rpcclient_cli_state
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-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 */