summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-03-17 03:08:34 +0100
committerGünther Deschner <gd@samba.org>2009-03-17 12:15:33 +0100
commit87d97ad0422c771ea575e9a5e68d0d2e5bfe25be (patch)
treec906417d656b6a1e307d9ee22cf539f05232906d
parent3255651b8375c12fc2ed668e5e1e433b00921455 (diff)
downloadsamba-87d97ad0422c771ea575e9a5e68d0d2e5bfe25be.tar.gz
samba-87d97ad0422c771ea575e9a5e68d0d2e5bfe25be.tar.bz2
samba-87d97ad0422c771ea575e9a5e68d0d2e5bfe25be.zip
s4-smbtorture: fix test_EnumPrinterKey.
Guenther
-rw-r--r--source4/torture/rpc/spoolss_win.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/torture/rpc/spoolss_win.c b/source4/torture/rpc/spoolss_win.c
index b7ee2386da..71c1ce9e99 100644
--- a/source4/torture/rpc/spoolss_win.c
+++ b/source4/torture/rpc/spoolss_win.c
@@ -366,22 +366,22 @@ static bool test_EnumPrinterKey(struct torture_context *tctx,
NTSTATUS status;
struct spoolss_EnumPrinterKey epk;
uint32_t needed = 0;
+ const char **key_buffer = NULL;
torture_comment(tctx, "Testing EnumPrinterKey(%s)\n", key);
epk.in.handle = handle;
epk.in.key_name = talloc_strdup(tctx, key);
- epk.in.key_buffer_size = 0;
+ epk.in.offered = 0;
epk.out.needed = &needed;
- epk.out.key_buffer = talloc_array(tctx, uint16_t, 0);
+ epk.out.key_buffer = &key_buffer;
status = dcerpc_spoolss_EnumPrinterKey(p, tctx, &epk);
torture_assert_ntstatus_ok(tctx, status, "EnumPrinterKey failed");
if (W_ERROR_EQUAL(epk.out.result, WERR_MORE_DATA)) {
- epk.in.key_buffer_size = needed;
- epk.out.key_buffer = talloc_array(tctx, uint16_t, needed/2);
+ epk.in.offered = needed;
status = dcerpc_spoolss_EnumPrinterKey(p, tctx, &epk);
torture_assert_ntstatus_ok(tctx, status,
"EnumPrinterKey failed");