diff options
author | Günther Deschner <gd@samba.org> | 2010-01-06 19:33:39 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2010-01-07 10:25:49 +0100 |
commit | 95a8b65efcfda5f8509857f12ad14bc70636fa01 (patch) | |
tree | cb2cad32ac1c143223d71af15807b960a7d6afd6 /source4 | |
parent | 534ddef376b9fffe42fa5a10b5f0f529d04a057b (diff) | |
download | samba-95a8b65efcfda5f8509857f12ad14bc70636fa01.tar.gz samba-95a8b65efcfda5f8509857f12ad14bc70636fa01.tar.xz samba-95a8b65efcfda5f8509857f12ad14bc70636fa01.zip |
s4-smbtorture: add test_SetPrinter to RPC-SPOOLSS.
Guenther
(cherry picked from commit 7568f49134c548c470e99c51e237ad3e225d6488)
(cherry picked from commit d7375656d058cef1a47158132eb0599becb1a779)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/rpc/spoolss.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index d37384201b4..b8ed5015756 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) |