summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-03-21 03:50:49 +0100
committerGünther Deschner <gd@samba.org>2008-03-21 04:16:21 +0100
commit3c2d315b4cb9c13df5c9cc5d45544b422cc42567 (patch)
tree0754f77190b75f41ea6ddeac02052a580645e6a7 /source3
parent10f40399e0ee510ff8d1b4dcad249b3aa44e9720 (diff)
downloadsamba-3c2d315b4cb9c13df5c9cc5d45544b422cc42567.tar.gz
samba-3c2d315b4cb9c13df5c9cc5d45544b422cc42567.tar.bz2
samba-3c2d315b4cb9c13df5c9cc5d45544b422cc42567.zip
Add support for setting resume handle in netsessenum rpcclient command.
Guenther (This used to be commit a01588d65f67ac23a5a2a741bb0419830e42868c)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpcclient/cmd_srvsvc.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source3/rpcclient/cmd_srvsvc.c b/source3/rpcclient/cmd_srvsvc.c
index a8549829fa..51c9819c49 100644
--- a/source3/rpcclient/cmd_srvsvc.c
+++ b/source3/rpcclient/cmd_srvsvc.c
@@ -687,12 +687,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;
}
@@ -708,6 +709,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;
@@ -744,7 +750,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)) {