diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl index c9d9b368460..43f62356b55 100644 --- a/librpc/idl/spoolss.idl +++ b/librpc/idl/spoolss.idl @@ -2425,7 +2425,7 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor") [default]; } spoolss_PrintProcDataTypesInfo; - [public,noopnum,noprint] WERROR _spoolss_EnumPrintProcDataTypes( + [public,noopnum,noprint] WERROR _spoolss_EnumPrintProcessorDataTypes( [in,unique] [string,charset(UTF16)] uint16 *servername, [in,unique] [string,charset(UTF16)] uint16 *print_processor_name, [in] uint32 level, @@ -2435,12 +2435,12 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor") [out,ref] uint32 *needed, [out,ref] uint32 *count ); - [public,noopnum,noprint] void __spoolss_EnumPrintProcDataTypes( + [public,noopnum,noprint] void __spoolss_EnumPrintProcessorDataTypes( [in] uint32 level, [in] uint32 count, [out,switch_is(level)] spoolss_PrintProcDataTypesInfo info[count] ); - [nopull,nopush] WERROR spoolss_EnumPrintProcDataTypes( + [nopull,nopush] WERROR spoolss_EnumPrintProcessorDataTypes( [in,unique] [string,charset(UTF16)] uint16 *servername, [in,unique] [string,charset(UTF16)] uint16 *print_processor_name, [in] uint32 level, diff --git a/librpc/ndr/ndr_spoolss_buf.c b/librpc/ndr/ndr_spoolss_buf.c index 8104ffde00c..c1d175fcbe5 100644 --- a/librpc/ndr/ndr_spoolss_buf.c +++ b/librpc/ndr/ndr_spoolss_buf.c @@ -424,9 +424,9 @@ uint32_t ndr_size_spoolss_EnumPrintProcessors_info(TALLOC_CTX *mem_ctx, /* spoolss_EnumPrintProcessors */ -enum ndr_err_code ndr_push_spoolss_EnumPrintProcDataTypes(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrintProcDataTypes *r) +enum ndr_err_code ndr_push_spoolss_EnumPrintProcessorDataTypes(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrintProcessorDataTypes *r) { - NDR_SPOOLSS_PUSH_ENUM(spoolss_EnumPrintProcDataTypes,{ + NDR_SPOOLSS_PUSH_ENUM(spoolss_EnumPrintProcessorDataTypes,{ _r.in.servername = r->in.servername; _r.in.print_processor_name = r->in.print_processor_name; },{ @@ -436,9 +436,9 @@ enum ndr_err_code ndr_push_spoolss_EnumPrintProcDataTypes(struct ndr_push *ndr, return NDR_ERR_SUCCESS; } -enum ndr_err_code ndr_pull_spoolss_EnumPrintProcDataTypes(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrintProcDataTypes *r) +enum ndr_err_code ndr_pull_spoolss_EnumPrintProcessorDataTypes(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrintProcessorDataTypes *r) { - NDR_SPOOLSS_PULL_ENUM(spoolss_EnumPrintProcDataTypes,{ + NDR_SPOOLSS_PULL_ENUM(spoolss_EnumPrintProcessorDataTypes,{ r->in.servername = _r.in.servername; r->in.print_processor_name = _r.in.print_processor_name; },{ @@ -448,10 +448,10 @@ enum ndr_err_code ndr_pull_spoolss_EnumPrintProcDataTypes(struct ndr_pull *ndr, return NDR_ERR_SUCCESS; } -uint32_t ndr_size_spoolss_EnumPrintProcDataTypes_info(TALLOC_CTX *mem_ctx, +uint32_t ndr_size_spoolss_EnumPrintProcessorDataTypes_info(TALLOC_CTX *mem_ctx, uint32_t level, uint32_t count, union spoolss_PrintProcDataTypesInfo *info) { - NDR_SPOOLSS_SIZE_ENUM_LEVEL(spoolss_EnumPrintProcDataTypes); + NDR_SPOOLSS_SIZE_ENUM_LEVEL(spoolss_EnumPrintProcessorDataTypes); } /* diff --git a/librpc/ndr/ndr_spoolss_buf.h b/librpc/ndr/ndr_spoolss_buf.h index 77053cb13d7..b0fde305c3e 100644 --- a/librpc/ndr/ndr_spoolss_buf.h +++ b/librpc/ndr/ndr_spoolss_buf.h @@ -55,11 +55,11 @@ enum ndr_err_code ndr_pull_spoolss_EnumMonitors(struct ndr_pull *ndr, int flags, uint32_t ndr_size_spoolss_EnumMonitors_info(TALLOC_CTX *mem_ctx, uint32_t level, uint32_t count, union spoolss_MonitorInfo *info); enum ndr_err_code ndr_push_spoolss_EnumPrintProcessors(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrintProcessors *r); enum ndr_err_code ndr_pull_spoolss_EnumPrintProcessors(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrintProcessors *r); -uint32_t ndr_size_spoolss_EnumPrintProcessors_info(TALLOC_CTX *mem_ctx, +uint32_t ndr_size_spoolss_EnumPrintProcessors_info(TALLOC_CTX *mem_ctx, uint32_t level, uint32_t count, union spoolss_PrintProcessorInfo *info); -enum ndr_err_code ndr_push_spoolss_EnumPrintProcDataTypes(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrintProcDataTypes *r); -enum ndr_err_code ndr_pull_spoolss_EnumPrintProcDataTypes(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrintProcDataTypes *r); -uint32_t ndr_size_spoolss_EnumPrintProcDataTypes_info(TALLOC_CTX *mem_ctx, +enum ndr_err_code ndr_push_spoolss_EnumPrintProcessorDataTypes(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrintProcessorDataTypes *r); +enum ndr_err_code ndr_pull_spoolss_EnumPrintProcessorDataTypes(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrintProcessorDataTypes *r); +uint32_t ndr_size_spoolss_EnumPrintProcessorDataTypes_info(TALLOC_CTX *mem_ctx, uint32_t level, uint32_t count, union spoolss_PrintProcDataTypesInfo *info); enum ndr_err_code ndr_push_spoolss_EnumPrinterDataEx(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrinterDataEx *r); enum ndr_err_code ndr_pull_spoolss_EnumPrinterDataEx(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrinterDataEx *r); diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c index f262d888d12..7f6ed8e3c91 100644 --- a/source3/rpc_client/cli_spoolss.c +++ b/source3/rpc_client/cli_spoolss.c @@ -490,7 +490,7 @@ WERROR rpccli_spoolss_enumprintprocessors(struct rpc_pipe_client *cli, } /********************************************************************** - convencience wrapper around rpccli_spoolss_EnumPrintProcDataTypes + convencience wrapper around rpccli_spoolss_EnumPrintProcessorDataTypes **********************************************************************/ WERROR rpccli_spoolss_enumprintprocessordatatypes(struct rpc_pipe_client *cli, @@ -513,16 +513,16 @@ WERROR rpccli_spoolss_enumprintprocessordatatypes(struct rpc_pipe_client *cli, W_ERROR_HAVE_NO_MEMORY(buffer.data); } - status = dcerpc_spoolss_EnumPrintProcDataTypes(b, mem_ctx, - servername, - print_processor_name, - level, - (offered > 0) ? &buffer : NULL, - offered, - count, - info, - &needed, - &werror); + status = dcerpc_spoolss_EnumPrintProcessorDataTypes(b, mem_ctx, + servername, + print_processor_name, + level, + (offered > 0) ? &buffer : NULL, + offered, + count, + info, + &needed, + &werror); if (!NT_STATUS_IS_OK(status)) { return ntstatus_to_werror(status); } @@ -532,16 +532,16 @@ WERROR rpccli_spoolss_enumprintprocessordatatypes(struct rpc_pipe_client *cli, buffer = data_blob_talloc_zero(mem_ctx, needed); W_ERROR_HAVE_NO_MEMORY(buffer.data); - status = dcerpc_spoolss_EnumPrintProcDataTypes(b, mem_ctx, - servername, - print_processor_name, - level, - (offered > 0) ? &buffer : NULL, - offered, - count, - info, - &needed, - &werror); + status = dcerpc_spoolss_EnumPrintProcessorDataTypes(b, mem_ctx, + servername, + print_processor_name, + level, + (offered > 0) ? &buffer : NULL, + offered, + count, + info, + &needed, + &werror); } if (!NT_STATUS_IS_OK(status)) { return ntstatus_to_werror(status); diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c index 90aac33a65b..6433e12d134 100644 --- a/source3/rpc_server/spoolss/srv_spoolss_nt.c +++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c @@ -9256,11 +9256,11 @@ static WERROR enumprintprocdatatypes_level_1(TALLOC_CTX *mem_ctx, } /**************************************************************** - _spoolss_EnumPrintProcDataTypes + _spoolss_EnumPrintProcessorDataTypes ****************************************************************/ -WERROR _spoolss_EnumPrintProcDataTypes(struct pipes_struct *p, - struct spoolss_EnumPrintProcDataTypes *r) +WERROR _spoolss_EnumPrintProcessorDataTypes(struct pipes_struct *p, + struct spoolss_EnumPrintProcessorDataTypes *r) { WERROR result; @@ -9270,7 +9270,7 @@ WERROR _spoolss_EnumPrintProcDataTypes(struct pipes_struct *p, return WERR_INVALID_PARAM; } - DEBUG(5,("_spoolss_EnumPrintProcDataTypes\n")); + DEBUG(5,("_spoolss_EnumPrintProcessorDataTypes\n")); *r->out.count = 0; *r->out.needed = 0; @@ -9295,7 +9295,7 @@ WERROR _spoolss_EnumPrintProcDataTypes(struct pipes_struct *p, } *r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(p->mem_ctx, - spoolss_EnumPrintProcDataTypes, + spoolss_EnumPrintProcessorDataTypes, *r->out.info, r->in.level, *r->out.count); *r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL); diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 1fcf3795fef..3dafed045c4 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -951,15 +951,15 @@ static bool test_EnumPrintProcessors(struct torture_context *tctx, return true; } -static bool test_EnumPrintProcDataTypes_level(struct torture_context *tctx, - struct dcerpc_binding_handle *b, - const char *print_processor_name, - uint32_t level, - uint32_t *count_p, - union spoolss_PrintProcDataTypesInfo **info_p, - WERROR expected_result) +static bool test_EnumPrintProcessorDataTypes_level(struct torture_context *tctx, + struct dcerpc_binding_handle *b, + const char *print_processor_name, + uint32_t level, + uint32_t *count_p, + union spoolss_PrintProcDataTypesInfo **info_p, + WERROR expected_result) { - struct spoolss_EnumPrintProcDataTypes r; + struct spoolss_EnumPrintProcessorDataTypes r; DATA_BLOB blob; uint32_t needed; uint32_t count; @@ -974,24 +974,24 @@ static bool test_EnumPrintProcDataTypes_level(struct torture_context *tctx, r.out.count = &count; r.out.info = &info; - torture_comment(tctx, "Testing EnumPrintProcDataTypes(%s) level %u\n", + torture_comment(tctx, "Testing EnumPrintProcessorDataTypes(%s) level %u\n", r.in.print_processor_name, r.in.level); torture_assert_ntstatus_ok(tctx, - dcerpc_spoolss_EnumPrintProcDataTypes_r(b, tctx, &r), - "EnumPrintProcDataTypes failed"); + dcerpc_spoolss_EnumPrintProcessorDataTypes_r(b, tctx, &r), + "EnumPrintProcessorDataTypes failed"); if (W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) { blob = data_blob_talloc_zero(tctx, needed); r.in.buffer = &blob; r.in.offered = needed; torture_assert_ntstatus_ok(tctx, - dcerpc_spoolss_EnumPrintProcDataTypes_r(b, tctx, &r), - "EnumPrintProcDataTypes failed"); + dcerpc_spoolss_EnumPrintProcessorDataTypes_r(b, tctx, &r), + "EnumPrintProcessorDataTypes failed"); } torture_assert_werr_equal(tctx, r.out.result, expected_result, - "EnumPrintProcDataTypes failed"); + "EnumPrintProcessorDataTypes failed"); - CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrintProcDataTypes, info, level, count, needed, 4); + CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrintProcessorDataTypes, info, level, count, needed, 4); if (count_p) { *count_p = count; @@ -1003,8 +1003,8 @@ static bool test_EnumPrintProcDataTypes_level(struct torture_context *tctx, return true; } -static bool test_EnumPrintProcDataTypes(struct torture_context *tctx, - void *private_data) +static bool test_EnumPrintProcessorDataTypes(struct torture_context *tctx, + void *private_data) { struct test_spoolss_context *ctx = talloc_get_type_abort(private_data, struct test_spoolss_context); @@ -1016,12 +1016,12 @@ static bool test_EnumPrintProcDataTypes(struct torture_context *tctx, struct dcerpc_binding_handle *b = p->binding_handle; torture_assert(tctx, - test_EnumPrintProcDataTypes_level(tctx, b, NULL, 1, NULL, NULL, WERR_UNKNOWN_PRINTPROCESSOR), - "test_EnumPrintProcDataTypes_level failed"); + test_EnumPrintProcessorDataTypes_level(tctx, b, NULL, 1, NULL, NULL, WERR_UNKNOWN_PRINTPROCESSOR), + "test_EnumPrintProcessorDataTypes_level failed"); torture_assert(tctx, - test_EnumPrintProcDataTypes_level(tctx, b, "nonexisting", 1, NULL, NULL, WERR_UNKNOWN_PRINTPROCESSOR), - "test_EnumPrintProcDataTypes_level failed"); + test_EnumPrintProcessorDataTypes_level(tctx, b, "nonexisting", 1, NULL, NULL, WERR_UNKNOWN_PRINTPROCESSOR), + "test_EnumPrintProcessorDataTypes_level failed"); for (i=0;i