summaryrefslogtreecommitdiffstats
path: root/source4
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-02-06 13:28:48 +0100
committerGünther Deschner <gd@samba.org>2009-02-06 14:59:22 +0100
commit3954cd83aa6976ef8c799eeee00f81fefb693934 (patch)
treef5280661777dd95a830843ba44ac1c978507b447 /source4
parent99398e8768f308f01b3298bfbc3bb783f6ea8c2f (diff)
downloadsamba-3954cd83aa6976ef8c799eeee00f81fefb693934.tar.gz
samba-3954cd83aa6976ef8c799eeee00f81fefb693934.tar.xz
samba-3954cd83aa6976ef8c799eeee00f81fefb693934.zip
s4-smbtorture: fix test_GetPrinterDriver2.
Guenther
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/spoolss.c8
-rw-r--r--source4/torture/rpc/spoolss_win.c6
2 files changed, 13 insertions, 1 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 70c4acb025a..d9080b92ae4 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 d7496d007ae..cc998cb302e 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");