summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-01-06 19:33:39 +0100
committerGünther Deschner <gd@samba.org>2010-01-06 22:09:36 +0100
commit7568f49134c548c470e99c51e237ad3e225d6488 (patch)
tree1e12f42ca50384a6ce835c49b0abd6806a3f2d3a /source4
parent0457cf915b724e3afd54ab1b5c8b96dcb5b7550a (diff)
downloadsamba-7568f49134c548c470e99c51e237ad3e225d6488.tar.gz
samba-7568f49134c548c470e99c51e237ad3e225d6488.tar.bz2
samba-7568f49134c548c470e99c51e237ad3e225d6488.zip
s4-smbtorture: add test_SetPrinter to RPC-SPOOLSS.
Guenther
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/spoolss.c26
1 files changed, 26 insertions, 0 deletions
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)