diff options
-rw-r--r-- | source4/librpc/idl/spoolss.idl | 2 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_spoolss.c | 11 | ||||
-rw-r--r-- | source4/torture/rpc/spoolss.c | 3 |
3 files changed, 5 insertions, 11 deletions
diff --git a/source4/librpc/idl/spoolss.idl b/source4/librpc/idl/spoolss.idl index 8f12b266cf..0c7b2ae548 100644 --- a/source4/librpc/idl/spoolss.idl +++ b/source4/librpc/idl/spoolss.idl @@ -384,7 +384,7 @@ [in] uint32 access_required, [in] uint32 level, [in,switch_is(level)] spoolss_UserLevel userlevel, - [out] policy_handle *handle + [out,ref] policy_handle *handle ); /******************/ diff --git a/source4/librpc/ndr/ndr_spoolss.c b/source4/librpc/ndr/ndr_spoolss.c index d346ebd9b2..be3082d69e 100644 --- a/source4/librpc/ndr/ndr_spoolss.c +++ b/source4/librpc/ndr/ndr_spoolss.c @@ -1152,16 +1152,7 @@ NTSTATUS ndr_pull_spoolss_44(struct ndr_pull *ndr, struct spoolss_44 *r) NTSTATUS ndr_pull_spoolss_OpenPrinterEx(struct ndr_pull *ndr, struct spoolss_OpenPrinterEx *r) { - uint32 _ptr_handle; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_handle)); - if (_ptr_handle) { - NDR_ALLOC(ndr, r->out.handle); - } else { - r->out.handle = NULL; - } - if (r->out.handle) { - NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle)); - } + NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle)); NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 83a7778a59..7f4809109a 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -25,6 +25,7 @@ static BOOL test_OpenPrinterEx(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) { struct spoolss_OpenPrinterEx r; struct spoolss_UserLevel1 userlevel1; + struct policy_handle handle; NTSTATUS status; r.in.printername = "p"; @@ -33,6 +34,8 @@ static BOOL test_OpenPrinterEx(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) r.in.devmode_ctr.devmode = NULL; r.in.access_required = 0x12345678; r.in.level = 1; + r.out.handle = &handle; + userlevel1.size = 1234; userlevel1.client = "hello"; userlevel1.user = "spottyfoot!"; |