1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s4-smbtorture: add test_SetPrinter to RPC-SPOOLSS.

Guenther
This commit is contained in:
Günther Deschner 2010-01-06 19:33:39 +01:00
parent 0457cf915b
commit 7568f49134

View File

@ -933,6 +933,32 @@ static bool test_GetPrinter(struct torture_context *tctx,
return true; 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, static bool test_SetPrinter_errors(struct torture_context *tctx,
struct dcerpc_pipe *p, struct dcerpc_pipe *p,
struct policy_handle *handle) struct policy_handle *handle)