summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-02-22 08:04:52 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:10:51 -0500
commit4926b8f5c0a180caf4f965cf927cb270f263401f (patch)
treee602add33518c5831832a34735281eaa0e6f3d64 /source4/torture/rpc
parent2787b5af416787ba0fcda02c1dbe7610b1f1623b (diff)
downloadsamba-4926b8f5c0a180caf4f965cf927cb270f263401f.tar.gz
samba-4926b8f5c0a180caf4f965cf927cb270f263401f.tar.bz2
samba-4926b8f5c0a180caf4f965cf927cb270f263401f.zip
r5498: fix OpenPrinter() idl and torture test
metze (This used to be commit fd7950abe62e91108157619ace8e96e99110b668)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/spoolss.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 8e4ea15677..de8da366b7 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -646,18 +646,16 @@ static BOOL test_OpenPrinter(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
NTSTATUS status;
struct spoolss_OpenPrinter r;
struct policy_handle handle;
- DATA_BLOB blob;
BOOL ret = True;
- blob = data_blob(NULL, 0);
+ r.in.printername = talloc_asprintf(mem_ctx, "\\\\%s\\%s", dcerpc_server_name(p), name);
+ r.in.datatype = NULL;
+ r.in.devmode_ctr.size = 0;
+ r.in.devmode_ctr.devmode= NULL;
+ r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
+ r.out.handle = &handle;
- r.in.server = talloc_asprintf(mem_ctx, "\\\\%s\\%s", dcerpc_server_name(p), name);
- r.in.printer = NULL;
- r.in.buffer = &blob;
- r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
- r.out.handle = &handle;
-
- printf("\nTesting OpenPrinter(%s)\n", r.in.server);
+ printf("\nTesting OpenPrinter(%s)\n", r.in.printername);
status = dcerpc_spoolss_OpenPrinter(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(r.out.result)) {
@@ -667,7 +665,6 @@ static BOOL test_OpenPrinter(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return True;
}
-
if (!test_GetPrinter(p, mem_ctx, &handle)) {
ret = False;
}
@@ -679,7 +676,7 @@ static BOOL test_OpenPrinter(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
if (!test_ClosePrinter(p, mem_ctx, &handle)) {
ret = False;
}
-
+
return ret;
}