diff options
author | Jeremy Allison <jra@samba.org> | 2008-11-19 15:06:05 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-11-19 15:06:05 -0800 |
commit | 804e63909bc3c9e4e2ca67f67eb56a1422f85fba (patch) | |
tree | 32a567b8ecfbafbe5938fd9a99a3565c2eeb77e6 /source3/rpcclient/cmd_ntsvcs.c | |
parent | 31a8c4df1305b63729e49a61e27bc9e1825af0d0 (diff) | |
parent | f9d691d9d808ec2f91f3f469fe2201b0909a8552 (diff) | |
download | samba-804e63909bc3c9e4e2ca67f67eb56a1422f85fba.tar.gz samba-804e63909bc3c9e4e2ca67f67eb56a1422f85fba.tar.bz2 samba-804e63909bc3c9e4e2ca67f67eb56a1422f85fba.zip |
Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba
Diffstat (limited to 'source3/rpcclient/cmd_ntsvcs.c')
-rw-r--r-- | source3/rpcclient/cmd_ntsvcs.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/rpcclient/cmd_ntsvcs.c b/source3/rpcclient/cmd_ntsvcs.c index 11f16d3462..eb620d06b2 100644 --- a/source3/rpcclient/cmd_ntsvcs.c +++ b/source3/rpcclient/cmd_ntsvcs.c @@ -149,13 +149,13 @@ static WERROR cmd_ntsvcs_get_dev_reg_prop(struct rpc_pipe_client *cli, const char *devicepath = NULL; uint32_t property = DEV_REGPROP_DESC; uint32_t reg_data_type = REG_NONE; - uint8_t buffer; + uint8_t *buffer; uint32_t buffer_size = 0; uint32_t needed = 0; uint32_t flags = 0; if (argc < 2) { - printf("usage: %s [devicepath]\n", argv[0]); + printf("usage: %s [devicepath] [buffersize]\n", argv[0]); return WERR_OK; } @@ -166,11 +166,14 @@ static WERROR cmd_ntsvcs_get_dev_reg_prop(struct rpc_pipe_client *cli, needed = buffer_size; } + buffer = talloc_array(mem_ctx, uint8_t, buffer_size); + W_ERROR_HAVE_NO_MEMORY(buffer); + status = rpccli_PNP_GetDeviceRegProp(cli, mem_ctx, devicepath, property, ®_data_type, - &buffer, + buffer, &buffer_size, &needed, flags, |