summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-03-21 03:50:49 +0100
committerKarolin Seeger <kseeger@bando.sernet.private>2008-03-31 14:21:20 +0200
commit9b6173de91d3dc53500924067b2b25f8499e6303 (patch)
tree9c1822776fe05ffcb76de9cd5ad2550f51337eeb
parentecfb160a7f2e0d0fd98c759b2df2a47b8d0dc809 (diff)
downloadsamba-9b6173de91d3dc53500924067b2b25f8499e6303.tar.gz
samba-9b6173de91d3dc53500924067b2b25f8499e6303.tar.xz
samba-9b6173de91d3dc53500924067b2b25f8499e6303.zip
Add support for setting resume handle in netsessenum rpcclient command.
Guenther (cherry picked from commit a01588d65f67ac23a5a2a741bb0419830e42868c)
-rw-r--r--source/rpcclient/cmd_srvsvc.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/rpcclient/cmd_srvsvc.c b/source/rpcclient/cmd_srvsvc.c
index 912c673649c..a1da29d37e0 100644
--- a/source/rpcclient/cmd_srvsvc.c
+++ b/source/rpcclient/cmd_srvsvc.c
@@ -689,12 +689,13 @@ static WERROR cmd_srvsvc_net_sess_enum(struct rpc_pipe_client *cli,
struct srvsvc_NetSessCtr502 ctr502;
uint32_t total_entries = 0;
uint32_t resume_handle = 0;
+ uint32_t *resume_handle_p = NULL;
uint32_t level = 1;
const char *client = NULL;
const char *user = NULL;
- if (argc > 5) {
- printf("Usage: %s [client] [user]\n", argv[0]);
+ if (argc > 6) {
+ printf("Usage: %s [client] [user] [level] [resume_handle]\n", argv[0]);
return WERR_OK;
}
@@ -710,6 +711,11 @@ static WERROR cmd_srvsvc_net_sess_enum(struct rpc_pipe_client *cli,
level = atoi(argv[3]);
}
+ if (argc >= 5) {
+ resume_handle = atoi(argv[4]);
+ resume_handle_p = &resume_handle;
+ }
+
ZERO_STRUCT(info_ctr);
info_ctr.level = level;
@@ -746,7 +752,7 @@ static WERROR cmd_srvsvc_net_sess_enum(struct rpc_pipe_client *cli,
&info_ctr,
0xffffffff,
&total_entries,
- &resume_handle,
+ resume_handle_p,
&result);
if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(result)) {