summaryrefslogtreecommitdiff
path: root/source3/rpcclient/cmd_ntsvcs.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-11-12 09:23:38 +0100
committerGünther Deschner <gd@samba.org>2008-11-12 10:18:46 +0100
commit0241b2cbdaf3f7f33ac5c15326957de7be734305 (patch)
tree9bed8b4101702643839aee655763c35c822fd223 /source3/rpcclient/cmd_ntsvcs.c
parent8d8386cc4d3347b145768ed81ea97559a3912fef (diff)
downloadsamba-0241b2cbdaf3f7f33ac5c15326957de7be734305.tar.gz
samba-0241b2cbdaf3f7f33ac5c15326957de7be734305.tar.bz2
samba-0241b2cbdaf3f7f33ac5c15326957de7be734305.zip
s3-rpcclient: some corrections for the PNP_GetDeviceRegProp client.
Guenther
Diffstat (limited to 'source3/rpcclient/cmd_ntsvcs.c')
-rw-r--r--source3/rpcclient/cmd_ntsvcs.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/source3/rpcclient/cmd_ntsvcs.c b/source3/rpcclient/cmd_ntsvcs.c
index a3ddde22a3..20d6928473 100644
--- a/source3/rpcclient/cmd_ntsvcs.c
+++ b/source3/rpcclient/cmd_ntsvcs.c
@@ -148,11 +148,11 @@ static WERROR cmd_ntsvcs_get_dev_reg_prop(struct rpc_pipe_client *cli,
WERROR werr;
const char *devicepath = NULL;
uint32_t property = DEV_REGPROP_DESC;
- uint32_t unknown1 = 0;
+ uint32_t reg_data_type = REG_NONE;
uint8_t buffer;
uint32_t buffer_size = 0;
- uint32_t unknown2 = 0;
- uint32_t unknown3 = 0;
+ uint32_t needed = 0;
+ uint32_t flags = 0;
if (argc < 2) {
printf("usage: %s [devicepath]\n", argv[0]);
@@ -161,14 +161,19 @@ static WERROR cmd_ntsvcs_get_dev_reg_prop(struct rpc_pipe_client *cli,
devicepath = argv[1];
+ if (argc >= 3) {
+ buffer_size = atoi(argv[2]);
+ needed = buffer_size;
+ }
+
status = rpccli_PNP_GetDeviceRegProp(cli, mem_ctx,
devicepath,
property,
- &unknown1,
+ &reg_data_type,
&buffer,
&buffer_size,
- &unknown2,
- unknown3,
+ &needed,
+ flags,
&werr);
if (!NT_STATUS_IS_OK(status)) {
return ntstatus_to_werror(status);