s3:rpcclient: use dcerpc_binding_handle client stubs in cmd_ntsvcs.c
authorStefan Metzmacher <metze@samba.org>
Tue, 4 Jan 2011 09:52:14 +0000 (10:52 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 4 Jan 2011 15:37:19 +0000 (16:37 +0100)
metze

source3/rpcclient/cmd_ntsvcs.c

index 95b905ab2ddf3330a8d5df0d0f38246a4b3e3703..68135d5fff0fc9bfd4647c2a4ab7e80b3ff47a64 100644 (file)
@@ -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,
                                             &reg_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,