summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/spoolss.c7
-rw-r--r--source4/torture/rpc/spoolss_win.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 6c0126ed7b..d0252d8d69 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -1242,17 +1242,22 @@ static bool test_EnumPrinterDataEx(struct torture_context *tctx,
{
NTSTATUS status;
struct spoolss_EnumPrinterDataEx r;
+ uint32_t needed;
+ uint32_t count;
r.in.handle = handle;
r.in.key_name = "PrinterDriverData";
r.in.offered = 0;
+ r.out.needed = &needed;
+ r.out.count = &count;
torture_comment(tctx, "Testing EnumPrinterDataEx\n");
status = dcerpc_spoolss_EnumPrinterDataEx(p, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "EnumPrinterDataEx failed");
- r.in.offered = r.out.needed;
+ r.in.offered = needed;
+ r.out.buffer = talloc_array(tctx, uint8_t, needed);
status = dcerpc_spoolss_EnumPrinterDataEx(p, tctx, &r);
diff --git a/source4/torture/rpc/spoolss_win.c b/source4/torture/rpc/spoolss_win.c
index cc998cb302..24a8dbc7e9 100644
--- a/source4/torture/rpc/spoolss_win.c
+++ b/source4/torture/rpc/spoolss_win.c
@@ -378,17 +378,22 @@ static bool test_EnumPrinterDataEx(struct torture_context *tctx,
{
NTSTATUS status;
struct spoolss_EnumPrinterDataEx epde;
+ uint32_t needed;
+ uint32_t count;
torture_comment(tctx, "Testing EnumPrinterDataEx(%s)\n", key);
epde.in.handle = handle;
epde.in.key_name = talloc_strdup(tctx, key);
epde.in.offered = 0;
+ epde.out.needed = &needed;
+ epde.out.count = &count;
status = dcerpc_spoolss_EnumPrinterDataEx(p, tctx, &epde);
torture_assert_ntstatus_ok(tctx, status, "EnumPrinterDataEx failed.");
if (W_ERROR_EQUAL(epde.out.result, WERR_MORE_DATA)) {
- epde.in.offered = epde.out.needed;
+ epde.in.offered = needed;
+ epde.out.buffer = talloc_array(tctx, uint8_t, needed);
status = dcerpc_spoolss_EnumPrinterDataEx(p, tctx, &epde);
torture_assert_ntstatus_ok(tctx, status,
"EnumPrinterDataEx failed.");