From 7568f49134c548c470e99c51e237ad3e225d6488 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 6 Jan 2010 19:33:39 +0100 Subject: s4-smbtorture: add test_SetPrinter to RPC-SPOOLSS. Guenther --- source4/torture/rpc/spoolss.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'source4/torture/rpc') diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index d37384201b..b8ed501575 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -933,6 +933,32 @@ static bool test_GetPrinter(struct torture_context *tctx, return true; } +static bool test_SetPrinter(struct torture_context *tctx, + struct dcerpc_pipe *p, + struct policy_handle *handle, + struct spoolss_SetPrinterInfoCtr *info_ctr, + struct spoolss_DevmodeContainer *devmode_ctr, + struct sec_desc_buf *secdesc_ctr, + enum spoolss_PrinterControl command) +{ + struct spoolss_SetPrinter r; + + r.in.handle = handle; + r.in.info_ctr = info_ctr; + r.in.devmode_ctr = devmode_ctr; + r.in.secdesc_ctr = secdesc_ctr; + r.in.command = command; + + torture_comment(tctx, "Testing SetPrinter Level %d\n", r.in.info_ctr->level); + + torture_assert_ntstatus_ok(tctx, dcerpc_spoolss_SetPrinter(p, tctx, &r), + "failed to call SetPrinter"); + torture_assert_werr_ok(tctx, r.out.result, + "failed to call SetPrinter"); + + return true; +} + static bool test_SetPrinter_errors(struct torture_context *tctx, struct dcerpc_pipe *p, struct policy_handle *handle) -- cgit