diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-10-06 19:02:02 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:20:44 -0500 |
commit | 8f073d30049fb211bd65458900e4b281805afee6 (patch) | |
tree | eeb6967f0165af42a735f2d4b83150357be881c9 /source4 | |
parent | 84a5b728472b9cc7b942d521bc41afff66aa9141 (diff) | |
download | samba-8f073d30049fb211bd65458900e4b281805afee6.tar.gz samba-8f073d30049fb211bd65458900e4b281805afee6.tar.bz2 samba-8f073d30049fb211bd65458900e4b281805afee6.zip |
r19153: Simple consistency check for enumprinters level 2 as well
(This used to be commit bd50a5929494949af865107551bb637ca9a3d96b)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/rpc/samba3rpc.c | 20 |
1 files changed, 18 insertions, 2 deletions
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; |