From 3954cd83aa6976ef8c799eeee00f81fefb693934 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 6 Feb 2009 13:28:48 +0100 Subject: s4-smbtorture: fix test_GetPrinterDriver2. Guenther --- source4/torture/rpc/spoolss.c | 8 +++++++- source4/torture/rpc/spoolss_win.c | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 70c4acb025..d9080b92ae 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -1605,6 +1605,9 @@ static bool test_GetPrinterDriver2(struct dcerpc_pipe *p, { NTSTATUS status; struct spoolss_GetPrinterDriver2 r; + uint32_t needed; + uint32_t server_major_version; + uint32_t server_minor_version; r.in.handle = handle; r.in.architecture = "W32X86"; @@ -1613,6 +1616,9 @@ static bool test_GetPrinterDriver2(struct dcerpc_pipe *p, r.in.offered = 0; r.in.client_major_version = 0; r.in.client_minor_version = 0; + r.out.needed = &needed; + r.out.server_major_version = &server_major_version; + r.out.server_minor_version = &server_minor_version; printf("Testing GetPrinterDriver2\n"); @@ -1623,7 +1629,7 @@ static bool test_GetPrinterDriver2(struct dcerpc_pipe *p, } if (W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) { - r.in.offered = r.out.needed; + r.in.offered = needed; status = dcerpc_spoolss_GetPrinterDriver2(p, tctx, &r); } diff --git a/source4/torture/rpc/spoolss_win.c b/source4/torture/rpc/spoolss_win.c index d7496d007a..cc998cb302 100644 --- a/source4/torture/rpc/spoolss_win.c +++ b/source4/torture/rpc/spoolss_win.c @@ -276,6 +276,9 @@ static bool test_GetPrinterDriver2(struct torture_context *tctx, NTSTATUS status; struct spoolss_GetPrinterDriver2 gpd2; DATA_BLOB blob = data_blob_talloc_zero(tctx, 87424); + uint32_t needed; + uint32_t server_major_version; + uint32_t server_minor_version; torture_comment(tctx, "Testing GetPrinterDriver2\n"); @@ -286,6 +289,9 @@ static bool test_GetPrinterDriver2(struct torture_context *tctx, gpd2.in.offered = 87424; gpd2.in.client_major_version = 3; gpd2.in.client_minor_version = 0; + gpd2.out.needed = &needed; + gpd2.out.server_major_version = &server_major_version; + gpd2.out.server_minor_version = &server_minor_version; status = dcerpc_spoolss_GetPrinterDriver2(p, tctx, &gpd2); torture_assert_ntstatus_ok(tctx, status, "GetPrinterDriver2 failed"); -- cgit