summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-04-12 14:11:50 +0200
committerStefan Metzmacher <metze@samba.org>2010-04-15 09:34:06 +0200
commite9d4f1578cdbd03ddc63d22822483add20e753d4 (patch)
tree6e845d558f52f0a0818aefed93144d468d41a4fb /source4/torture
parent51f7b1382b91053ae96b2cd14dae17ad6eea0df4 (diff)
downloadsamba-e9d4f1578cdbd03ddc63d22822483add20e753d4.tar.gz
samba-e9d4f1578cdbd03ddc63d22822483add20e753d4.tar.bz2
samba-e9d4f1578cdbd03ddc63d22822483add20e753d4.zip
s4:torture/rpc/autoidl.c: check for NT_STATUS_RPC_* instead of p->last_fault_code
metze
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/autoidl.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source4/torture/rpc/autoidl.c b/source4/torture/rpc/autoidl.c
index abb09d42c9..77bb761e0c 100644
--- a/source4/torture/rpc/autoidl.c
+++ b/source4/torture/rpc/autoidl.c
@@ -131,7 +131,7 @@ static void try_expand(struct torture_context *tctx, const struct ndr_interface_
status = dcerpc_request(p, NULL, opnum, tctx, &stub_in, &stub_out);
- if (!NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
+ if (NT_STATUS_IS_OK(status)) {
print_depth(depth);
printf("expand by %d gives %s\n", n, nt_errstr(status));
if (n >= 4) {
@@ -142,10 +142,10 @@ static void try_expand(struct torture_context *tctx, const struct ndr_interface_
} else {
#if 0
print_depth(depth);
- printf("expand by %d gives fault %s\n", n, dcerpc_errstr(tctx, p->last_fault_code));
+ printf("expand by %d gives fault %s\n", n, nt_errstr(status));
#endif
}
- if (p->last_fault_code == 5) {
+ if (NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) {
reopen(tctx, &p, iface);
}
}
@@ -172,11 +172,11 @@ static void test_ptr_scan(struct torture_context *tctx, const struct ndr_interfa
SIVAL(stub_in.data, ofs, 1);
status = dcerpc_request(p, NULL, opnum, tctx, &stub_in, &stub_out);
- if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
+ if (!NT_STATUS_IS_OK(status)) {
print_depth(depth);
printf("possible ptr at ofs %d - fault %s\n",
- ofs-min_ofs, dcerpc_errstr(tctx, p->last_fault_code));
- if (p->last_fault_code == 5) {
+ ofs-min_ofs, nt_errstr(status));
+ if (NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) {
reopen(tctx, &p, iface);
}
if (depth == 0) {
@@ -236,9 +236,9 @@ static void test_scan_call(struct torture_context *tctx, const struct ndr_interf
return;
}
- if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
- printf("opnum %d size %d fault %s\n", opnum, i, dcerpc_errstr(tctx, p->last_fault_code));
- if (p->last_fault_code == 5) {
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("opnum %d size %d fault %s\n", opnum, i, nt_errstr(status));
+ if (NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) {
reopen(tctx, &p, iface);
}
continue;