summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/spoolss.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-03-13 00:20:52 +0100
committerGünther Deschner <gd@samba.org>2010-03-13 01:12:21 +0100
commitf064a182eb3a28e49cec6aa3d9baaad8d85f13e6 (patch)
tree72ba01bc59ed25d1808fbb27c2025c8d22a74e22 /source4/torture/rpc/spoolss.c
parenta2be29dfa32a675249f743632a24450d5147a112 (diff)
downloadsamba-f064a182eb3a28e49cec6aa3d9baaad8d85f13e6.tar.gz
samba-f064a182eb3a28e49cec6aa3d9baaad8d85f13e6.tar.bz2
samba-f064a182eb3a28e49cec6aa3d9baaad8d85f13e6.zip
s4-smbtorture: make sure RPC-SPOOLSS passes against 64bit archs (w2k8r2).
Guenther
Diffstat (limited to 'source4/torture/rpc/spoolss.c')
-rw-r--r--source4/torture/rpc/spoolss.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 5b2bc86825..32510070b9 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -2958,7 +2958,8 @@ static bool test_GetPrinterDataEx(struct torture_context *tctx,
static bool test_GetPrinterData_list(struct torture_context *tctx,
struct dcerpc_pipe *p,
- struct policy_handle *handle)
+ struct policy_handle *handle,
+ const char **architecture)
{
const char *list[] = {
"W3SvcInstalled",
@@ -2989,6 +2990,13 @@ static bool test_GetPrinterData_list(struct torture_context *tctx,
torture_assert_int_equal(tctx, type, type_ex, "type mismatch");
torture_assert_int_equal(tctx, needed, needed_ex, "needed mismatch");
torture_assert_mem_equal(tctx, data, data_ex, needed, "data mismatch");
+
+ if (strequal(list[i], "Architecture")) {
+ if (architecture) {
+ DATA_BLOB blob = data_blob_const(data, needed);
+ *architecture = reg_val_data_string(tctx, lp_iconv_convenience(tctx->lp_ctx), REG_SZ, blob);
+ }
+ }
}
return true;
@@ -4928,7 +4936,7 @@ bool torture_rpc_spoolss(struct torture_context *torture)
ctx = talloc_zero(torture, struct test_spoolss_context);
ret &= test_OpenPrinter_server(torture, p, &ctx->server_handle);
- ret &= test_GetPrinterData_list(torture, p, &ctx->server_handle);
+ ret &= test_GetPrinterData_list(torture, p, &ctx->server_handle, &environment);
ret &= test_EnumForms(torture, p, &ctx->server_handle, true);
ret &= test_AddForm(torture, p, &ctx->server_handle, true);
ret &= test_EnumPorts(torture, p, ctx);