summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-17 02:58:10 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-17 02:58:10 +0000
commit90916de4a5303601a59938237a551d976cde0589 (patch)
treebff267e385e910b9ad69505da6964669d9318073 /source4/torture
parentff9558bdf99901793dad9182254164e1472e9cfe (diff)
downloadsamba-90916de4a5303601a59938237a551d976cde0589.tar.gz
samba-90916de4a5303601a59938237a551d976cde0589.tar.bz2
samba-90916de4a5303601a59938237a551d976cde0589.zip
* more info levels for EnumPrinter
* use WERROR return type in spoolss EnumPrinter (This used to be commit 8301a6b6ad45f76a42d0fcab6347c187eee615a9)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/spoolss.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index d203be2d47..13e2b2642f 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -25,7 +25,7 @@ static BOOL test_EnumPrinters(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
{
struct spoolss_EnumPrinters r;
NTSTATUS status;
- uint16 levels[] = {1, 2};
+ uint16 levels[] = {1, 2, 3, 4, 5, 6, 7};
int i;
BOOL ret = True;
@@ -50,20 +50,24 @@ static BOOL test_EnumPrinters(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
continue;
}
- if (NT_STATUS_V(status) == ERRinsufficientbuffer) {
+ if (W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) {
DATA_BLOB blob = data_blob_talloc(mem_ctx, NULL, buf_size);
data_blob_clear(&blob);
r.in.buffer = &blob;
status = dcerpc_spoolss_EnumPrinters(p, mem_ctx, &r);
}
- if (!NT_STATUS_IS_OK(status)) {
- printf("EnumPrinters failed - %s\n", nt_errstr(status));
+ if (!NT_STATUS_IS_OK(status) ||
+ !W_ERROR_IS_OK(r.out.result)) {
+ printf("EnumPrinters failed - %s/%s\n",
+ nt_errstr(status), win_errstr(r.out.result));
+ continue;
}
status = pull_spoolss_PrinterEnumArray(r.out.buffer, mem_ctx, r.in.level, r.out.count, &info);
if (!NT_STATUS_IS_OK(status)) {
printf("EnumPrintersArray parse failed - %s\n", nt_errstr(status));
+ continue;
}
for (j=0;j<r.out.count;j++) {