summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-03-16 16:01:10 +0100
committerKarolin Seeger <kseeger@samba.org>2009-04-15 09:06:42 +0200
commitb1488be7d4d7f1d078a0ed48acf8562575957c89 (patch)
tree99039fc68d1d35420114668d3399a6a5ab343944 /source4
parent9ae9f905a3f5b16a3e0175cc20bb3ea1d189531d (diff)
downloadsamba-b1488be7d4d7f1d078a0ed48acf8562575957c89.tar.gz
s4-smbtorture: fix RPC-SPOOLSS test after PrinterData changes.
Guenther (cherry picked from commit 0e2139c6936b28015a8a2a539810c2bd7821d36f) (cherry picked from commit 2e91b3abbe9cb2451ed363d98e987f8ed89ed63b)
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/spoolss.c15
-rw-r--r--source4/torture/rpc/spoolss_win.c2
2 files changed, 9 insertions, 8 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 9e02c903969..c16def09d20 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -1337,7 +1337,7 @@ static bool test_GetPrinterData(struct torture_context *tctx,
NTSTATUS status;
struct spoolss_GetPrinterData r;
uint32_t needed;
- enum spoolss_PrinterDataType type;
+ enum winreg_Type type;
union spoolss_PrinterData data;
r.in.handle = handle;
@@ -1372,7 +1372,7 @@ static bool test_GetPrinterDataEx(struct torture_context *tctx,
{
NTSTATUS status;
struct spoolss_GetPrinterDataEx r;
- uint32_t type;
+ enum winreg_Type type;
uint32_t needed;
r.in.handle = handle;
@@ -1419,16 +1419,15 @@ static bool test_EnumPrinterData(struct torture_context *tctx, struct dcerpc_pip
do {
uint32_t value_size = 0;
uint32_t data_size = 0;
- uint32_t printerdata_type = 0;
- DATA_BLOB data = data_blob(NULL,0);
+ enum winreg_Type type = 0;
r.in.value_offered = value_size;
r.out.value_needed = &value_size;
r.in.data_offered = data_size;
r.out.data_needed = &data_size;
- r.out.printerdata_type = &printerdata_type;
- r.out.buffer = &data;
+ r.out.type = &type;
+ r.out.data = talloc_zero_array(tctx, uint8_t, 0);
torture_comment(tctx, "Testing EnumPrinterData\n");
@@ -1437,7 +1436,9 @@ static bool test_EnumPrinterData(struct torture_context *tctx, struct dcerpc_pip
torture_assert_ntstatus_ok(tctx, status, "EnumPrinterData failed");
r.in.value_offered = value_size;
+ r.out.value_name = talloc_zero_array(tctx, const char, value_size);
r.in.data_offered = data_size;
+ r.out.data = talloc_zero_array(tctx, uint8_t, data_size);
status = dcerpc_spoolss_EnumPrinterData(p, tctx, &r);
@@ -1517,7 +1518,7 @@ static bool test_SetPrinterData(struct torture_context *tctx,
r.in.handle = handle;
r.in.value_name = value_name;
- r.in.type = SPOOLSS_PRINTER_DATA_TYPE_STRING;
+ r.in.type = REG_SZ;
r.in.data.string = "dog";
torture_comment(tctx, "Testing SetPrinterData\n");
diff --git a/source4/torture/rpc/spoolss_win.c b/source4/torture/rpc/spoolss_win.c
index 1f22c398424..b7ee2386dae 100644
--- a/source4/torture/rpc/spoolss_win.c
+++ b/source4/torture/rpc/spoolss_win.c
@@ -156,7 +156,7 @@ static bool test_GetPrinterData(struct torture_context *tctx,
NTSTATUS status;
struct spoolss_GetPrinterData gpd;
uint32_t needed;
- enum spoolss_PrinterDataType type;
+ enum winreg_Type type;
union spoolss_PrinterData data;
torture_comment(tctx, "Testing GetPrinterData(%s).\n", value_name);