summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-02-06 13:44:44 +0100
committerGünther Deschner <gd@samba.org>2009-02-06 14:59:22 +0100
commit88aaac39fa2a38997c11d4f545f3e223129a5a6a (patch)
treebabef8e09cf60080221d0abf37fb9aaa3578af17 /source4/torture/rpc
parent8ddb81ca0addf1c9bad4f624e55ee5679aa3fe4c (diff)
downloadsamba-88aaac39fa2a38997c11d4f545f3e223129a5a6a.tar.gz
samba-88aaac39fa2a38997c11d4f545f3e223129a5a6a.tar.bz2
samba-88aaac39fa2a38997c11d4f545f3e223129a5a6a.zip
s4-smbtorture: fix test_EnumPrinterDataEx.
Guenther
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.");