mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s3:rpcclient: use dcerpc_binding_handle client stubs in cmd_ntsvcs.c
metze
This commit is contained in:
parent
fbcbeabd65
commit
d99e9c389b
@ -27,11 +27,12 @@ static WERROR cmd_ntsvcs_get_version(struct rpc_pipe_client *cli,
|
||||
int argc,
|
||||
const char **argv)
|
||||
{
|
||||
struct dcerpc_binding_handle *b = cli->binding_handle;
|
||||
NTSTATUS status;
|
||||
WERROR werr;
|
||||
uint16_t version;
|
||||
|
||||
status = rpccli_PNP_GetVersion(cli, mem_ctx,
|
||||
status = dcerpc_PNP_GetVersion(b, mem_ctx,
|
||||
&version, &werr);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
return ntstatus_to_werror(status);
|
||||
@ -49,6 +50,7 @@ static WERROR cmd_ntsvcs_validate_dev_inst(struct rpc_pipe_client *cli,
|
||||
int argc,
|
||||
const char **argv)
|
||||
{
|
||||
struct dcerpc_binding_handle *b = cli->binding_handle;
|
||||
NTSTATUS status;
|
||||
WERROR werr;
|
||||
const char *devicepath = NULL;
|
||||
@ -65,7 +67,7 @@ static WERROR cmd_ntsvcs_validate_dev_inst(struct rpc_pipe_client *cli,
|
||||
flags = atoi(argv[2]);
|
||||
}
|
||||
|
||||
status = rpccli_PNP_ValidateDeviceInstance(cli, mem_ctx,
|
||||
status = dcerpc_PNP_ValidateDeviceInstance(b, mem_ctx,
|
||||
devicepath,
|
||||
flags,
|
||||
&werr);
|
||||
@ -81,6 +83,7 @@ static WERROR cmd_ntsvcs_hw_prof_flags(struct rpc_pipe_client *cli,
|
||||
int argc,
|
||||
const char **argv)
|
||||
{
|
||||
struct dcerpc_binding_handle *b = cli->binding_handle;
|
||||
NTSTATUS status;
|
||||
WERROR werr;
|
||||
const char *devicepath = NULL;
|
||||
@ -96,7 +99,7 @@ static WERROR cmd_ntsvcs_hw_prof_flags(struct rpc_pipe_client *cli,
|
||||
|
||||
devicepath = argv[1];
|
||||
|
||||
status = rpccli_PNP_HwProfFlags(cli, mem_ctx,
|
||||
status = dcerpc_PNP_HwProfFlags(b, mem_ctx,
|
||||
0,
|
||||
devicepath,
|
||||
0,
|
||||
@ -119,6 +122,7 @@ static WERROR cmd_ntsvcs_get_hw_prof_info(struct rpc_pipe_client *cli,
|
||||
int argc,
|
||||
const char **argv)
|
||||
{
|
||||
struct dcerpc_binding_handle *b = cli->binding_handle;
|
||||
NTSTATUS status;
|
||||
WERROR werr;
|
||||
uint32_t idx = 0;
|
||||
@ -127,7 +131,7 @@ static WERROR cmd_ntsvcs_get_hw_prof_info(struct rpc_pipe_client *cli,
|
||||
|
||||
ZERO_STRUCT(info);
|
||||
|
||||
status = rpccli_PNP_GetHwProfInfo(cli, mem_ctx,
|
||||
status = dcerpc_PNP_GetHwProfInfo(b, mem_ctx,
|
||||
idx,
|
||||
&info,
|
||||
size,
|
||||
@ -145,6 +149,7 @@ static WERROR cmd_ntsvcs_get_dev_reg_prop(struct rpc_pipe_client *cli,
|
||||
int argc,
|
||||
const char **argv)
|
||||
{
|
||||
struct dcerpc_binding_handle *b = cli->binding_handle;
|
||||
NTSTATUS status;
|
||||
WERROR werr;
|
||||
const char *devicepath = NULL;
|
||||
@ -170,7 +175,7 @@ static WERROR cmd_ntsvcs_get_dev_reg_prop(struct rpc_pipe_client *cli,
|
||||
buffer = talloc_array(mem_ctx, uint8_t, buffer_size);
|
||||
W_ERROR_HAVE_NO_MEMORY(buffer);
|
||||
|
||||
status = rpccli_PNP_GetDeviceRegProp(cli, mem_ctx,
|
||||
status = dcerpc_PNP_GetDeviceRegProp(b, mem_ctx,
|
||||
devicepath,
|
||||
property,
|
||||
®_data_type,
|
||||
@ -191,6 +196,7 @@ static WERROR cmd_ntsvcs_get_dev_list_size(struct rpc_pipe_client *cli,
|
||||
int argc,
|
||||
const char **argv)
|
||||
{
|
||||
struct dcerpc_binding_handle *b = cli->binding_handle;
|
||||
NTSTATUS status;
|
||||
WERROR werr;
|
||||
uint32_t size = 0;
|
||||
@ -210,7 +216,7 @@ static WERROR cmd_ntsvcs_get_dev_list_size(struct rpc_pipe_client *cli,
|
||||
flags = atoi(argv[2]);
|
||||
}
|
||||
|
||||
status = rpccli_PNP_GetDeviceListSize(cli, mem_ctx,
|
||||
status = dcerpc_PNP_GetDeviceListSize(b, mem_ctx,
|
||||
filter,
|
||||
&size,
|
||||
flags,
|
||||
@ -229,6 +235,7 @@ static WERROR cmd_ntsvcs_get_dev_list(struct rpc_pipe_client *cli,
|
||||
int argc,
|
||||
const char **argv)
|
||||
{
|
||||
struct dcerpc_binding_handle *b = cli->binding_handle;
|
||||
NTSTATUS status;
|
||||
WERROR werr;
|
||||
const char *filter = NULL;
|
||||
@ -258,7 +265,7 @@ static WERROR cmd_ntsvcs_get_dev_list(struct rpc_pipe_client *cli,
|
||||
return WERR_NOMEM;
|
||||
}
|
||||
|
||||
status = rpccli_PNP_GetDeviceList(cli, mem_ctx,
|
||||
status = dcerpc_PNP_GetDeviceList(b, mem_ctx,
|
||||
filter,
|
||||
buffer,
|
||||
&length,
|
||||
|
Loading…
Reference in New Issue
Block a user