diff options
author | Günther Deschner <gd@samba.org> | 2010-02-15 21:55:06 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-02-15 22:15:33 +0100 |
commit | a6192d766fad88cf1425d77c303d977e08fba208 (patch) | |
tree | d44b59267c6b02842a9d42fd08c4529cc411d7d4 | |
parent | cdf2f6b672a17c34e7c16cc22c179e01d8281bcf (diff) | |
download | samba-a6192d766fad88cf1425d77c303d977e08fba208.tar.gz samba-a6192d766fad88cf1425d77c303d977e08fba208.tar.bz2 samba-a6192d766fad88cf1425d77c303d977e08fba208.zip |
s4-smbtorture: use test_SetPrinter call in spoolss security descriptor tests.
Guenther
-rw-r--r-- | source4/torture/rpc/spoolss.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 5303c942ce..242b305393 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -951,7 +951,7 @@ static bool test_SetPrinter(struct torture_context *tctx, r.in.secdesc_ctr = secdesc_ctr; r.in.command = command; - torture_comment(tctx, "Testing SetPrinter Level %d\n", r.in.info_ctr->level); + 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"); @@ -1578,7 +1578,6 @@ static bool test_sd_set_level(struct torture_context *tctx, uint32_t level, struct security_descriptor *sd) { - struct spoolss_SetPrinter r; struct spoolss_SetPrinterInfoCtr info_ctr; struct spoolss_DevmodeContainer devmode_ctr; struct sec_desc_buf secdesc_ctr; @@ -1635,14 +1634,8 @@ static bool test_sd_set_level(struct torture_context *tctx, secdesc_ctr.sd = sd; - 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 = 0; - - torture_assert_ntstatus_ok(tctx, dcerpc_spoolss_SetPrinter(p, tctx, &r), "SetPrinter failed"); - torture_assert_werr_ok(tctx, r.out.result, "SetPrinter failed"); + torture_assert(tctx, + test_SetPrinter(tctx, p, handle, &info_ctr, &devmode_ctr, &secdesc_ctr, 0), ""); return true; } @@ -1709,7 +1702,6 @@ static bool test_PrinterInfo_SD(struct torture_context *tctx, struct policy_handle *handle) { union spoolss_PrinterInfo info; - struct spoolss_SetPrinter r; struct spoolss_SetPrinterInfo3 info3; struct spoolss_SetPrinterInfoCtr info_ctr; struct spoolss_DevmodeContainer devmode_ctr; @@ -1739,14 +1731,8 @@ static bool test_PrinterInfo_SD(struct torture_context *tctx, secdesc_ctr.sd = sd; - 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 = 0; - - torture_assert_ntstatus_ok(tctx, dcerpc_spoolss_SetPrinter(p, tctx, &r), "SetPrinter failed"); - torture_assert_werr_ok(tctx, r.out.result, "SetPrinter failed"); + torture_assert(tctx, + test_SetPrinter(tctx, p, handle, &info_ctr, &devmode_ctr, &secdesc_ctr, 0), ""); return ret; } |