summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-01-20 06:10:15 +0000
committerAndrew Tridgell <tridge@samba.org>2004-01-20 06:10:15 +0000
commit53382d54f4e98d49dd447da85d1978df632045ea (patch)
tree8607434a4619863a1087616b899d538223c6bebb /source4/torture/rpc
parent8ae5b50a6e787767bc00d42533ca29d8fb136e2e (diff)
downloadsamba-53382d54f4e98d49dd447da85d1978df632045ea.tar.gz
samba-53382d54f4e98d49dd447da85d1978df632045ea.tar.bz2
samba-53382d54f4e98d49dd447da85d1978df632045ea.zip
check for the correct fault code when the server fails a use of a
incorrect policy handle (This used to be commit 8cd6e90eb8716ba43f5940245d7be580aab4ba83)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/spoolss.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 5b118bec7b..08c486f45a 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -578,6 +578,7 @@ static BOOL test_SecondaryClosePrinter(struct dcerpc_pipe *p, TALLOC_CTX *mem_ct
{
NTSTATUS status;
struct dcerpc_pipe *p2;
+ BOOL ret = True;
/* only makes sense on SMB */
if (p->transport.transport != NCACN_NP) {
@@ -597,13 +598,18 @@ static BOOL test_SecondaryClosePrinter(struct dcerpc_pipe *p, TALLOC_CTX *mem_ct
if (test_ClosePrinter(p2, mem_ctx, handle)) {
printf("ERROR: Allowed close on secondary connection!\n");
- dcerpc_pipe_close(p2);
- return False;
+ ret = False;
+ }
+
+ if (p2->last_fault_code != DCERPC_FAULT_CONTEXT_MISMATCH) {
+ printf("Unexpected fault code 0x%x - expected 0x%x\n",
+ p2->last_fault_code, DCERPC_FAULT_CONTEXT_MISMATCH);
+ ret = False;
}
dcerpc_pipe_close(p2);
- return True;
+ return ret;
}
static BOOL test_OpenPrinter(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,