From 8f073d30049fb211bd65458900e4b281805afee6 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 6 Oct 2006 19:02:02 +0000 Subject: r19153: Simple consistency check for enumprinters level 2 as well (This used to be commit bd50a5929494949af865107551bb637ca9a3d96b) --- source4/torture/rpc/samba3rpc.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'source4/torture') diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c index 8bfbad22e5..ecc0378471 100644 --- a/source4/torture/rpc/samba3rpc.c +++ b/source4/torture/rpc/samba3rpc.c @@ -2238,7 +2238,7 @@ static BOOL enumprinters(TALLOC_CTX *mem_ctx, struct dcerpc_pipe *pipe, r.in.flags = PRINTER_ENUM_LOCAL; r.in.server = "\\\\localhost"; - r.in.level = 1; + r.in.level = level; r.in.buffer = NULL; r.in.offered = 0; @@ -2517,7 +2517,23 @@ BOOL torture_samba3_rpc_spoolss(struct torture_context *torture) } if (num_printers != num_enumerated) { d_printf("(%s) netshareenum gave %d printers, " - "enumprinters gave %d\n", __location__, + "enumprinters lvl 1 gave %d\n", __location__, + num_printers, num_enumerated); + talloc_free(mem_ctx); + return False; + } + } + + { + int num_enumerated; + if (!enumprinters(mem_ctx, p, 2, &num_enumerated)) { + d_printf("(%s) enumprinters failed\n", __location__); + talloc_free(mem_ctx); + return False; + } + if (num_printers != num_enumerated) { + d_printf("(%s) netshareenum gave %d printers, " + "enumprinters lvl 2 gave %d\n", __location__, num_printers, num_enumerated); talloc_free(mem_ctx); return False; -- cgit