diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-08-20 15:00:22 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:58:13 -0500 |
commit | 6766809ba8190f6b65921a42eaa3dc67fab67ce2 (patch) | |
tree | d4b7efe9d98cbe74d50550d8f09f38e57aae86b9 /source4 | |
parent | 8115bf6e2ceba588b3d503380a530297b0f03f2c (diff) | |
download | samba-6766809ba8190f6b65921a42eaa3dc67fab67ce2.tar.gz samba-6766809ba8190f6b65921a42eaa3dc67fab67ce2.tar.bz2 samba-6766809ba8190f6b65921a42eaa3dc67fab67ce2.zip |
r1961: print out the dcerpc fault code, when we got NT_STATUS_NET_WRITE_FAULT
(this need to be done more generic for all dcerpc calls,
but for now I just need it in this 2 places)
metze
(This used to be commit d965f84f69ada2a10e9159aa1743c0bee7790488)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/rpc/drsuapi.c | 6 | ||||
-rw-r--r-- | source4/torture/rpc/testjoin.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c index 2938a1a744..5a12ef37f4 100644 --- a/source4/torture/rpc/drsuapi.c +++ b/source4/torture/rpc/drsuapi.c @@ -195,7 +195,11 @@ static BOOL test_DRSBind(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) status = dcerpc_DRSUAPI_BIND(p, mem_ctx, &r); if (!NT_STATUS_IS_OK(status)) { - printf("DRSUAPI_BIND level failed - %s\n", nt_errstr(status)); + const char *errstr = nt_errstr(status); + if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) { + errstr = dcerpc_errstr(p->last_fault_code); + } + printf("DRSUAPI_BIND level failed - %s\n", errstr); ret = False; } diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c index aab08c3a56..9c9fd749fb 100644 --- a/source4/torture/rpc/testjoin.c +++ b/source4/torture/rpc/testjoin.c @@ -139,7 +139,11 @@ void *torture_join_domain(const char *machine_name, status = dcerpc_samr_Connect(join->p, mem_ctx, &c); if (!NT_STATUS_IS_OK(status)) { - printf("samr_Connect failed - %s\n", nt_errstr(status)); + const char *errstr = nt_errstr(status); + if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) { + errstr = dcerpc_errstr(join->p->last_fault_code); + } + printf("samr_Connect failed - %s\n", errstr); goto failed; } |