2 Unix SMB/CIFS implementation.
3 test suite for spoolss rpc operations as performed by various win versions
5 Copyright (C) Kai Blin 2007
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #include "torture/rpc/rpc.h"
23 #include "librpc/gen_ndr/ndr_spoolss_c.h"
24 #include "librpc/gen_ndr/ndr_misc.h"
25 #include "ntvfs/ntvfs.h"
26 #include "param/param.h"
28 struct test_spoolss_win_context
{
30 uint32_t printer_count
;
31 union spoolss_PrinterInfo
*printer_info
;
32 union spoolss_PrinterInfo
*current_info
;
35 const char **printer_keys
;
37 bool printer_has_driver
;
40 /* This is a convenience function for all OpenPrinterEx calls */
41 static bool test_OpenPrinterEx(struct torture_context
*tctx
,
42 struct dcerpc_pipe
*p
,
43 struct policy_handle
*handle
,
44 const char *printer_name
,
48 struct spoolss_OpenPrinterEx op
;
49 struct spoolss_UserLevel1 ul_1
;
51 torture_comment(tctx
, "Opening printer '%s'\n", printer_name
);
53 op
.in
.printername
= talloc_strdup(tctx
, printer_name
);
54 op
.in
.datatype
= NULL
;
55 op
.in
.devmode_ctr
.devmode
= NULL
;
56 op
.in
.access_mask
= access_mask
;
58 op
.in
.userlevel
.level1
= &ul_1
;
59 op
.out
.handle
= handle
;
62 ul_1
.client
= "\\clientname";
63 ul_1
.user
= "username";
67 ul_1
.processor
= 4567;
69 status
= dcerpc_spoolss_OpenPrinterEx(p
, tctx
, &op
);
70 torture_assert_ntstatus_ok(tctx
, status
, "OpenPrinterEx failed");
71 torture_assert_werr_ok(tctx
, op
.out
.result
, "OpenPrinterEx failed");
76 static bool test_OpenPrinterAsAdmin(struct torture_context
*tctx
,
77 struct dcerpc_pipe
*p
,
78 const char *printername
)
81 struct spoolss_OpenPrinterEx op
;
82 struct spoolss_ClosePrinter cp
;
83 struct spoolss_UserLevel1 ul_1
;
84 struct policy_handle handle
;
87 ul_1
.client
= "\\clientname";
88 ul_1
.user
= "username";
92 ul_1
.processor
= 4567;
94 op
.in
.printername
= talloc_strdup(tctx
, printername
);
95 op
.in
.datatype
= NULL
;
96 op
.in
.devmode_ctr
.devmode
= NULL
;
97 op
.in
.access_mask
= SERVER_ALL_ACCESS
;
99 op
.in
.userlevel
.level1
= &ul_1
;
100 op
.out
.handle
= &handle
;
102 cp
.in
.handle
= &handle
;
103 cp
.out
.handle
= &handle
;
105 torture_comment(tctx
, "Testing OpenPrinterEx(%s) with admin rights\n",
108 status
= dcerpc_spoolss_OpenPrinterEx(p
, tctx
, &op
);
110 if (NT_STATUS_IS_OK(status
) && W_ERROR_IS_OK(op
.out
.result
)) {
111 status
= dcerpc_spoolss_ClosePrinter(p
, tctx
, &cp
);
112 torture_assert_ntstatus_ok(tctx
, status
, "ClosePrinter failed");
119 static bool test_ClosePrinter(struct torture_context
*tctx
,
120 struct dcerpc_pipe
*p
,
121 struct policy_handle
*handle
);
123 /* This replicates the opening sequence of OpenPrinterEx calls XP does */
124 static bool test_OpenPrinterSequence(struct torture_context
*tctx
,
125 struct dcerpc_pipe
*p
,
126 struct policy_handle
*handle
)
129 char *printername
= talloc_asprintf(tctx
, "\\\\%s",
130 dcerpc_server_name(p
));
132 /* First, see if we can open the printer read_only */
133 ret
= test_OpenPrinterEx(tctx
, p
, handle
, printername
, 0);
134 torture_assert(tctx
, ret
== true, "OpenPrinterEx failed.");
136 ret
= test_ClosePrinter(tctx
, p
, handle
);
137 torture_assert(tctx
, ret
, "ClosePrinter failed");
139 /* Now let's see if we have admin rights to it. */
140 ret
= test_OpenPrinterAsAdmin(tctx
, p
, printername
);
141 torture_assert(tctx
, ret
== true,
142 "OpenPrinterEx as admin failed unexpectedly.");
144 ret
= test_OpenPrinterEx(tctx
, p
, handle
, printername
, SERVER_EXECUTE
);
145 torture_assert(tctx
, ret
== true, "OpenPrinterEx failed.");
150 static bool test_GetPrinterData(struct torture_context
*tctx
,
151 struct dcerpc_pipe
*p
,
152 struct policy_handle
*handle
,
153 const char *value_name
,
154 WERROR expected_werr
,
155 uint32_t expected_value
)
158 struct spoolss_GetPrinterData gpd
;
160 enum winreg_Type type
;
161 uint8_t *data
= talloc_zero_array(tctx
, uint8_t, 4);
163 torture_comment(tctx
, "Testing GetPrinterData(%s).\n", value_name
);
164 gpd
.in
.handle
= handle
;
165 gpd
.in
.value_name
= value_name
;
167 gpd
.out
.needed
= &needed
;
168 gpd
.out
.type
= &type
;
171 status
= dcerpc_spoolss_GetPrinterData(p
, tctx
, &gpd
);
172 torture_assert_ntstatus_ok(tctx
, status
, "GetPrinterData failed.");
173 torture_assert_werr_equal(tctx
, gpd
.out
.result
, expected_werr
,
174 "GetPrinterData did not return expected error value.");
176 if (W_ERROR_IS_OK(expected_werr
)) {
177 uint32_t value
= IVAL(data
, 0);
178 torture_assert_int_equal(tctx
, value
,
180 talloc_asprintf(tctx
, "GetPrinterData for %s did not return expected value.", value_name
));
185 static bool test_EnumPrinters(struct torture_context
*tctx
,
186 struct dcerpc_pipe
*p
,
187 struct test_spoolss_win_context
*ctx
,
188 uint32_t initial_blob_size
)
191 struct spoolss_EnumPrinters ep
;
192 DATA_BLOB blob
= data_blob_talloc_zero(ctx
, initial_blob_size
);
195 union spoolss_PrinterInfo
*info
;
197 ep
.in
.flags
= PRINTER_ENUM_NAME
;
198 ep
.in
.server
= talloc_asprintf(tctx
, "\\\\%s", dcerpc_server_name(p
));
200 ep
.in
.buffer
= &blob
;
201 ep
.in
.offered
= initial_blob_size
;
202 ep
.out
.needed
= &needed
;
203 ep
.out
.count
= &count
;
206 status
= dcerpc_spoolss_EnumPrinters(p
, ctx
, &ep
);
207 torture_assert_ntstatus_ok(tctx
, status
, "EnumPrinters failed.");
209 if (W_ERROR_EQUAL(ep
.out
.result
, WERR_INSUFFICIENT_BUFFER
)) {
210 blob
= data_blob_talloc_zero(ctx
, needed
);
211 ep
.in
.buffer
= &blob
;
212 ep
.in
.offered
= needed
;
213 status
= dcerpc_spoolss_EnumPrinters(p
, ctx
, &ep
);
214 torture_assert_ntstatus_ok(tctx
, status
,"EnumPrinters failed.");
217 torture_assert_werr_ok(tctx
, ep
.out
.result
, "EnumPrinters failed.");
219 ctx
->printer_count
= count
;
220 ctx
->printer_info
= info
;
222 torture_comment(tctx
, "Found %d printer(s).\n", ctx
->printer_count
);
227 static bool test_GetPrinter(struct torture_context
*tctx
,
228 struct dcerpc_pipe
*p
,
229 struct policy_handle
*handle
,
230 struct test_spoolss_win_context
*ctx
,
232 uint32_t initial_blob_size
)
235 struct spoolss_GetPrinter gp
;
236 DATA_BLOB blob
= data_blob_talloc_zero(ctx
, initial_blob_size
);
239 torture_comment(tctx
, "Test GetPrinter level %d\n", level
);
241 gp
.in
.handle
= handle
;
243 gp
.in
.buffer
= (initial_blob_size
== 0)?NULL
:&blob
;
244 gp
.in
.offered
= initial_blob_size
;
245 gp
.out
.needed
= &needed
;
247 status
= dcerpc_spoolss_GetPrinter(p
, tctx
, &gp
);
248 torture_assert_ntstatus_ok(tctx
, status
, "GetPrinter failed");
250 if (W_ERROR_EQUAL(gp
.out
.result
, WERR_INSUFFICIENT_BUFFER
)) {
251 blob
= data_blob_talloc_zero(ctx
, needed
);
252 gp
.in
.buffer
= &blob
;
253 gp
.in
.offered
= needed
;
254 status
= dcerpc_spoolss_GetPrinter(p
, tctx
, &gp
);
255 torture_assert_ntstatus_ok(tctx
, status
, "GetPrinter failed");
258 torture_assert_werr_ok(tctx
, gp
.out
.result
, "GetPrinter failed");
260 ctx
->current_info
= gp
.out
.info
;
262 if (level
== 2 && gp
.out
.info
) {
263 ctx
->printer_has_driver
= gp
.out
.info
->info2
.drivername
&&
264 strlen(gp
.out
.info
->info2
.drivername
);
270 static bool test_EnumJobs(struct torture_context
*tctx
,
271 struct dcerpc_pipe
*p
,
272 struct policy_handle
*handle
)
275 struct spoolss_EnumJobs ej
;
276 DATA_BLOB blob
= data_blob_talloc_zero(tctx
, 1024);
279 union spoolss_JobInfo
*info
;
281 torture_comment(tctx
, "Test EnumJobs\n");
283 ej
.in
.handle
= handle
;
285 ej
.in
.buffer
= &blob
;
286 ej
.in
.offered
= 1024;
287 ej
.out
.needed
= &needed
;
288 ej
.out
.count
= &count
;
291 status
= dcerpc_spoolss_EnumJobs(p
, tctx
, &ej
);
292 torture_assert_ntstatus_ok(tctx
, status
, "EnumJobs failed");
293 if (W_ERROR_EQUAL(ej
.out
.result
, WERR_INSUFFICIENT_BUFFER
)) {
294 blob
= data_blob_talloc_zero(tctx
, needed
);
295 ej
.in
.offered
= needed
;
296 ej
.in
.buffer
= &blob
;
297 status
= dcerpc_spoolss_EnumJobs(p
, tctx
, &ej
);
298 torture_assert_ntstatus_ok(tctx
, status
, "EnumJobs failed");
300 torture_assert_werr_ok(tctx
, ej
.out
.result
, "EnumJobs failed");
305 static bool test_GetPrinterDriver2(struct torture_context
*tctx
,
306 struct dcerpc_pipe
*p
,
307 struct test_spoolss_win_context
*ctx
,
308 struct policy_handle
*handle
)
311 struct spoolss_GetPrinterDriver2 gpd2
;
312 DATA_BLOB blob
= data_blob_talloc_zero(tctx
, 87424);
314 uint32_t server_major_version
;
315 uint32_t server_minor_version
;
317 torture_comment(tctx
, "Testing GetPrinterDriver2\n");
319 gpd2
.in
.handle
= handle
;
320 gpd2
.in
.architecture
= "Windows NT x86";
322 gpd2
.in
.buffer
= &blob
;
323 gpd2
.in
.offered
= 87424;
324 gpd2
.in
.client_major_version
= 3;
325 gpd2
.in
.client_minor_version
= 0;
326 gpd2
.out
.needed
= &needed
;
327 gpd2
.out
.server_major_version
= &server_major_version
;
328 gpd2
.out
.server_minor_version
= &server_minor_version
;
330 status
= dcerpc_spoolss_GetPrinterDriver2(p
, tctx
, &gpd2
);
331 torture_assert_ntstatus_ok(tctx
, status
, "GetPrinterDriver2 failed");
333 if (ctx
->printer_has_driver
) {
334 torture_assert_werr_ok(tctx
, gpd2
.out
.result
,
335 "GetPrinterDriver2 failed.");
341 static bool test_EnumForms(struct torture_context
*tctx
,
342 struct dcerpc_pipe
*p
,
343 struct policy_handle
*handle
,
344 uint32_t initial_blob_size
)
347 struct spoolss_EnumForms ef
;
348 DATA_BLOB blob
= data_blob_talloc_zero(tctx
, initial_blob_size
);
351 union spoolss_FormInfo
*info
;
353 torture_comment(tctx
, "Testing EnumForms\n");
355 ef
.in
.handle
= handle
;
357 ef
.in
.buffer
= (initial_blob_size
== 0)?NULL
:&blob
;
358 ef
.in
.offered
= initial_blob_size
;
359 ef
.out
.needed
= &needed
;
360 ef
.out
.count
= &count
;
363 status
= dcerpc_spoolss_EnumForms(p
, tctx
, &ef
);
364 torture_assert_ntstatus_ok(tctx
, status
, "EnumForms failed");
366 if (W_ERROR_EQUAL(ef
.out
.result
, WERR_INSUFFICIENT_BUFFER
)) {
367 blob
= data_blob_talloc_zero(tctx
, needed
);
368 ef
.in
.buffer
= &blob
;
369 ef
.in
.offered
= needed
;
370 status
= dcerpc_spoolss_EnumForms(p
, tctx
, &ef
);
371 torture_assert_ntstatus_ok(tctx
, status
, "EnumForms failed");
374 torture_assert_werr_ok(tctx
, ef
.out
.result
, "EnumForms failed");
379 static bool test_EnumPrinterKey(struct torture_context
*tctx
,
380 struct dcerpc_pipe
*p
,
381 struct policy_handle
*handle
,
383 struct test_spoolss_win_context
*ctx
)
386 struct spoolss_EnumPrinterKey epk
;
388 union spoolss_KeyNames key_buffer
;
391 torture_comment(tctx
, "Testing EnumPrinterKey(%s)\n", key
);
393 epk
.in
.handle
= handle
;
394 epk
.in
.key_name
= talloc_strdup(tctx
, key
);
396 epk
.out
.needed
= &needed
;
397 epk
.out
.key_buffer
= &key_buffer
;
398 epk
.out
._ndr_size
= &_ndr_size
;
400 status
= dcerpc_spoolss_EnumPrinterKey(p
, tctx
, &epk
);
401 torture_assert_ntstatus_ok(tctx
, status
, "EnumPrinterKey failed");
403 if (W_ERROR_EQUAL(epk
.out
.result
, WERR_MORE_DATA
)) {
404 epk
.in
.offered
= needed
;
405 status
= dcerpc_spoolss_EnumPrinterKey(p
, tctx
, &epk
);
406 torture_assert_ntstatus_ok(tctx
, status
,
407 "EnumPrinterKey failed");
410 torture_assert_werr_ok(tctx
, epk
.out
.result
, "EnumPrinterKey failed");
412 ctx
->printer_keys
= key_buffer
.string_array
;
417 static bool test_EnumPrinterDataEx(struct torture_context
*tctx
,
418 struct dcerpc_pipe
*p
,
419 struct policy_handle
*handle
,
421 uint32_t initial_blob_size
,
422 WERROR expected_error
)
425 struct spoolss_EnumPrinterDataEx epde
;
426 struct spoolss_PrinterEnumValues
*info
;
430 torture_comment(tctx
, "Testing EnumPrinterDataEx(%s)\n", key
);
432 epde
.in
.handle
= handle
;
433 epde
.in
.key_name
= talloc_strdup(tctx
, key
);
435 epde
.out
.needed
= &needed
;
436 epde
.out
.count
= &count
;
437 epde
.out
.info
= &info
;
439 status
= dcerpc_spoolss_EnumPrinterDataEx(p
, tctx
, &epde
);
440 torture_assert_ntstatus_ok(tctx
, status
, "EnumPrinterDataEx failed.");
441 if (W_ERROR_EQUAL(epde
.out
.result
, WERR_MORE_DATA
)) {
442 epde
.in
.offered
= needed
;
443 status
= dcerpc_spoolss_EnumPrinterDataEx(p
, tctx
, &epde
);
444 torture_assert_ntstatus_ok(tctx
, status
,
445 "EnumPrinterDataEx failed.");
448 torture_assert_werr_equal(tctx
, epde
.out
.result
, expected_error
,
449 "EnumPrinterDataEx failed.");
454 static bool test_ClosePrinter(struct torture_context
*tctx
,
455 struct dcerpc_pipe
*p
,
456 struct policy_handle
*handle
)
459 struct spoolss_ClosePrinter cp
;
461 cp
.in
.handle
= handle
;
462 cp
.out
.handle
= handle
;
464 status
= dcerpc_spoolss_ClosePrinter(p
, tctx
, &cp
);
465 torture_assert_ntstatus_ok(tctx
, status
, "ClosePrinter failed");
470 static bool test_WinXP(struct torture_context
*tctx
, struct dcerpc_pipe
*p
)
473 struct test_spoolss_win_context
*ctx
, *tmp_ctx
;
474 struct policy_handle handle01
, handle02
, handle03
, handle04
;
475 /* Sometimes a handle stays unused. In order to make this clear in the
476 * code, the unused_handle structures are used for that. */
477 struct policy_handle unused_handle1
, unused_handle2
;
481 ntvfs_init(tctx
->lp_ctx
);
483 ctx
= talloc_zero(tctx
, struct test_spoolss_win_context
);
484 tmp_ctx
= talloc_zero(tctx
, struct test_spoolss_win_context
);
486 ret
&= test_OpenPrinterSequence(tctx
, p
, &handle01
);
487 ret
&= test_GetPrinterData(tctx
, p
, &handle01
,"UISingleJobStatusString",
488 WERR_INVALID_PARAM
, 0);
489 torture_comment(tctx
, "Skip RemoteFindNextPrinterChangeNotifyEx test\n");
491 server_name
= talloc_asprintf(ctx
, "\\\\%s", dcerpc_server_name(p
));
492 ret
&= test_OpenPrinterEx(tctx
, p
, &unused_handle1
, server_name
, 0);
494 ret
&= test_EnumPrinters(tctx
, p
, ctx
, 1024);
496 ret
&= test_OpenPrinterEx(tctx
, p
, &handle02
, server_name
, 0);
497 ret
&= test_GetPrinterData(tctx
, p
, &handle02
, "MajorVersion", WERR_OK
,
499 ret
&= test_ClosePrinter(tctx
, p
, &handle02
);
501 /* If no printers were found, skip all tests that need a printer */
502 if (ctx
->printer_count
== 0) {
506 ret
&= test_OpenPrinterEx(tctx
, p
, &handle02
,
507 ctx
->printer_info
[0].info2
.printername
,
509 ret
&= test_GetPrinter(tctx
, p
, &handle02
, ctx
, 2, 0);
511 torture_assert_str_equal(tctx
, ctx
->current_info
->info2
.printername
,
512 ctx
->printer_info
[0].info2
.printername
,
513 "GetPrinter returned unexpected printername");
514 /*FIXME: Test more components of the PrinterInfo2 struct */
516 ret
&= test_OpenPrinterEx(tctx
, p
, &handle03
,
517 ctx
->printer_info
[0].info2
.printername
, 0);
518 ret
&= test_GetPrinter(tctx
, p
, &handle03
, ctx
, 0, 1164);
519 ret
&= test_GetPrinter(tctx
, p
, &handle03
, ctx
, 2, 0);
521 ret
&= test_OpenPrinterEx(tctx
, p
, &handle04
,
522 ctx
->printer_info
[0].info2
.printername
, 0);
523 ret
&= test_GetPrinter(tctx
, p
, &handle04
, ctx
, 2, 0);
524 ret
&= test_ClosePrinter(tctx
, p
, &handle04
);
526 ret
&= test_OpenPrinterEx(tctx
, p
, &handle04
,
527 ctx
->printer_info
[0].info2
.printername
, 0);
528 ret
&= test_GetPrinter(tctx
, p
, &handle04
, ctx
, 2, 4096);
529 ret
&= test_ClosePrinter(tctx
, p
, &handle04
);
531 ret
&= test_OpenPrinterAsAdmin(tctx
, p
,
532 ctx
->printer_info
[0].info2
.printername
);
534 ret
&= test_OpenPrinterEx(tctx
, p
, &handle04
,
535 ctx
->printer_info
[0].info2
.printername
, PRINTER_READ
);
536 ret
&= test_GetPrinterData(tctx
, p
, &handle04
,"UISingleJobStatusString",
538 torture_comment(tctx
, "Skip RemoteFindNextPrinterChangeNotifyEx test\n");
540 ret
&= test_OpenPrinterEx(tctx
, p
, &unused_handle2
,
541 ctx
->printer_info
[0].info2
.printername
, 0);
543 ret
&= test_EnumJobs(tctx
, p
, &handle04
);
544 ret
&= test_GetPrinter(tctx
, p
, &handle04
, ctx
, 2, 4096);
546 ret
&= test_ClosePrinter(tctx
, p
, &unused_handle2
);
547 ret
&= test_ClosePrinter(tctx
, p
, &handle04
);
549 ret
&= test_EnumPrinters(tctx
, p
, ctx
, 1556);
550 ret
&= test_GetPrinterDriver2(tctx
, p
, ctx
, &handle03
);
551 ret
&= test_EnumForms(tctx
, p
, &handle03
, 0);
553 ret
&= test_EnumPrinterKey(tctx
, p
, &handle03
, "", ctx
);
555 for (i
=0; ctx
->printer_keys
&& ctx
->printer_keys
[i
] != NULL
; i
++) {
557 ret
&= test_EnumPrinterKey(tctx
, p
, &handle03
,
558 ctx
->printer_keys
[i
],
560 ret
&= test_EnumPrinterDataEx(tctx
, p
, &handle03
,
561 ctx
->printer_keys
[i
], 0,
565 ret
&= test_EnumPrinterDataEx(tctx
, p
, &handle03
, "", 0,
568 ret
&= test_GetPrinter(tctx
, p
, &handle03
, tmp_ctx
, 2, 0);
570 ret
&= test_OpenPrinterEx(tctx
, p
, &unused_handle2
,
571 ctx
->printer_info
[0].info2
.printername
, 0);
572 ret
&= test_ClosePrinter(tctx
, p
, &unused_handle2
);
574 ret
&= test_GetPrinter(tctx
, p
, &handle03
, tmp_ctx
, 2, 2556);
576 ret
&= test_OpenPrinterEx(tctx
, p
, &unused_handle2
,
577 ctx
->printer_info
[0].info2
.printername
, 0);
578 ret
&= test_ClosePrinter(tctx
, p
, &unused_handle2
);
580 ret
&= test_OpenPrinterEx(tctx
, p
, &unused_handle2
,
581 ctx
->printer_info
[0].info2
.printername
, 0);
582 ret
&= test_ClosePrinter(tctx
, p
, &unused_handle2
);
584 ret
&= test_GetPrinter(tctx
, p
, &handle03
, tmp_ctx
, 7, 0);
586 ret
&= test_OpenPrinterEx(tctx
, p
, &unused_handle2
,
587 ctx
->printer_info
[0].info2
.printername
, 0);
588 ret
&= test_ClosePrinter(tctx
, p
, &unused_handle2
);
590 ret
&= test_ClosePrinter(tctx
, p
, &handle03
);
592 ret
&= test_OpenPrinterEx(tctx
, p
, &unused_handle2
,
593 ctx
->printer_info
[0].info2
.printername
, 0);
594 ret
&= test_ClosePrinter(tctx
, p
, &unused_handle2
);
596 ret
&= test_OpenPrinterEx(tctx
, p
, &handle03
, server_name
, 0);
597 ret
&= test_GetPrinterData(tctx
, p
, &handle03
, "W3SvcInstalled",
599 ret
&= test_ClosePrinter(tctx
, p
, &handle03
);
601 ret
&= test_ClosePrinter(tctx
, p
, &unused_handle1
);
602 ret
&= test_ClosePrinter(tctx
, p
, &handle02
);
604 ret
&= test_OpenPrinterEx(tctx
, p
, &handle02
,
605 ctx
->printer_info
[0].info2
.sharename
, 0);
606 ret
&= test_GetPrinter(tctx
, p
, &handle02
, tmp_ctx
, 2, 0);
607 ret
&= test_ClosePrinter(tctx
, p
, &handle02
);
610 ret
&= test_ClosePrinter(tctx
, p
, &handle01
);
612 talloc_free(tmp_ctx
);
617 struct torture_suite
*torture_rpc_spoolss_win(TALLOC_CTX
*mem_ctx
)
619 struct torture_suite
*suite
= torture_suite_create(mem_ctx
, "SPOOLSS-WIN");
621 struct torture_rpc_tcase
*tcase
= torture_suite_add_rpc_iface_tcase(suite
,
622 "win", &ndr_table_spoolss
);
624 torture_rpc_tcase_add_test(tcase
, "testWinXP", test_WinXP
);