summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/drsuapi.c6
-rw-r--r--source4/torture/rpc/testjoin.c6
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;
}