diff options
author | Günther Deschner <gd@samba.org> | 2008-02-18 02:40:55 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-03-26 16:46:58 +0100 |
commit | 6e026fff3f21284fa28144b66cc050deeae759aa (patch) | |
tree | 537e78555f0ba9527f9c3b182c90eb7bf797bc54 | |
parent | 0bdcc557ee4d52d266b7ec6dee5d2381c0601ce1 (diff) | |
download | samba-6e026fff3f21284fa28144b66cc050deeae759aa.tar.gz samba-6e026fff3f21284fa28144b66cc050deeae759aa.tar.bz2 samba-6e026fff3f21284fa28144b66cc050deeae759aa.zip |
Add ntsvcs_getdevregprop command to rpcclient.
Guenther
(This used to be commit 4abe30fdae511422dccd04d0287d962192beadcb)
-rw-r--r-- | source3/rpcclient/cmd_ntsvcs.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/source3/rpcclient/cmd_ntsvcs.c b/source3/rpcclient/cmd_ntsvcs.c index b7b37e2fa6..7fd9e79755 100644 --- a/source3/rpcclient/cmd_ntsvcs.c +++ b/source3/rpcclient/cmd_ntsvcs.c @@ -177,6 +177,45 @@ static WERROR cmd_ntsvcs_get_hw_prof_info(struct rpc_pipe_client *cli, return werr; } +static WERROR cmd_ntsvcs_get_dev_reg_prop(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + int argc, + const char **argv) +{ + NTSTATUS status; + WERROR werr; + const char *devicepath = NULL; + uint32_t property = DEV_REGPROP_DESC; + uint32_t unknown1 = 0; + uint8_t buffer; + uint32_t buffer_size = 0; + uint32_t unknown2 = 0; + uint32_t unknown3 = 0; + + if (argc < 2) { + printf("usage: %s [devicepath]\n", argv[0]); + return WERR_OK; + } + + devicepath = argv[1]; + + status = rpccli_PNP_GetDeviceRegProp(cli, mem_ctx, + devicepath, + property, + &unknown1, + &buffer, + &buffer_size, + &unknown2, + unknown3, + &werr); + if (!NT_STATUS_IS_OK(status)) { + return ntstatus_to_werror(status); + } + + return werr; +} + + struct cmd_set ntsvcs_commands[] = { { "NTSVCS" }, @@ -185,5 +224,6 @@ struct cmd_set ntsvcs_commands[] = { { "ntsvcs_getdevlistsize", RPC_RTYPE_WERROR, NULL, cmd_ntsvcs_get_device_list_size, PI_NTSVCS, NULL, "Query NTSVCS get device list", "" }, { "ntsvcs_hwprofflags", RPC_RTYPE_WERROR, NULL, cmd_ntsvcs_hw_prof_flags, PI_NTSVCS, NULL, "Query NTSVCS HW prof flags", "" }, { "ntsvcs_hwprofinfo", RPC_RTYPE_WERROR, NULL, cmd_ntsvcs_get_hw_prof_info, PI_NTSVCS, NULL, "Query NTSVCS HW prof info", "" }, + { "ntsvcs_getdevregprop", RPC_RTYPE_WERROR, NULL, cmd_ntsvcs_get_dev_reg_prop, PI_NTSVCS, NULL, "Query NTSVCS device registry property", "" }, { NULL } }; |