1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-14 00:58:38 +03:00

s4-smbtorture: fix test_GetPrinterDriver2.

Guenther
This commit is contained in:
Günther Deschner 2009-02-06 13:28:48 +01:00
parent 99398e8768
commit 3954cd83aa
2 changed files with 13 additions and 1 deletions

View File

@ -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);
}

View File

@ -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");