summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-04-13 09:12:52 +0200
committerStefan Metzmacher <metze@samba.org>2010-04-15 09:34:02 +0200
commit146ce6ead122f6f4ab18998c91d1bbdd1c63d336 (patch)
treec799f684ab33f948120ef29cd65e2e0d20a75467 /source4/libnet
parent7f6cdad706b7171d76eddae40b17a07acc15aef8 (diff)
downloadsamba-146ce6ead122f6f4ab18998c91d1bbdd1c63d336.tar.gz
samba-146ce6ead122f6f4ab18998c91d1bbdd1c63d336.tar.bz2
samba-146ce6ead122f6f4ab18998c91d1bbdd1c63d336.zip
s4:libnet/libnet_join: don't look at p->last_fault_code for debugging anymore
metze
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_join.c69
1 files changed, 20 insertions, 49 deletions
diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c
index f5cbda083e..748a791279 100644
--- a/source4/libnet/libnet_join.c
+++ b/source4/libnet/libnet_join.c
@@ -135,21 +135,12 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J
status = dcerpc_drsuapi_DsBind_r(drsuapi_pipe->binding_handle, tmp_ctx, &r_drsuapi_bind);
if (!NT_STATUS_IS_OK(status)) {
- if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
- r->out.error_string
- = talloc_asprintf(r,
- "dcerpc_drsuapi_DsBind failed - %s",
- dcerpc_errstr(tmp_ctx, drsuapi_pipe->last_fault_code));
- talloc_free(tmp_ctx);
- return status;
- } else {
- r->out.error_string
- = talloc_asprintf(r,
- "dcerpc_drsuapi_DsBind failed - %s",
- nt_errstr(status));
- talloc_free(tmp_ctx);
- return status;
- }
+ r->out.error_string
+ = talloc_asprintf(r,
+ "dcerpc_drsuapi_DsBind failed - %s",
+ nt_errstr(status));
+ talloc_free(tmp_ctx);
+ return status;
} else if (!W_ERROR_IS_OK(r_drsuapi_bind.out.result)) {
r->out.error_string
= talloc_asprintf(r,
@@ -193,23 +184,13 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J
status = dcerpc_drsuapi_DsCrackNames_r(drsuapi_pipe->binding_handle, tmp_ctx, &r_crack_names);
if (!NT_STATUS_IS_OK(status)) {
- if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
- r->out.error_string
- = talloc_asprintf(r,
- "dcerpc_drsuapi_DsCrackNames for [%s] failed - %s",
- names[0].str,
- dcerpc_errstr(tmp_ctx, drsuapi_pipe->last_fault_code));
- talloc_free(tmp_ctx);
- return status;
- } else {
- r->out.error_string
- = talloc_asprintf(r,
- "dcerpc_drsuapi_DsCrackNames for [%s] failed - %s",
- names[0].str,
- nt_errstr(status));
- talloc_free(tmp_ctx);
- return status;
- }
+ r->out.error_string
+ = talloc_asprintf(r,
+ "dcerpc_drsuapi_DsCrackNames for [%s] failed - %s",
+ names[0].str,
+ nt_errstr(status));
+ talloc_free(tmp_ctx);
+ return status;
} else if (!W_ERROR_IS_OK(r_crack_names.out.result)) {
r->out.error_string
= talloc_asprintf(r,
@@ -354,23 +335,13 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J
status = dcerpc_drsuapi_DsCrackNames_r(drsuapi_pipe->binding_handle, tmp_ctx, &r_crack_names);
if (!NT_STATUS_IS_OK(status)) {
- if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
- r->out.error_string
- = talloc_asprintf(r,
- "dcerpc_drsuapi_DsCrackNames for [%s] failed - %s",
- r->in.domain_name,
- dcerpc_errstr(tmp_ctx, drsuapi_pipe->last_fault_code));
- talloc_free(tmp_ctx);
- return status;
- } else {
- r->out.error_string
- = talloc_asprintf(r,
- "dcerpc_drsuapi_DsCrackNames for [%s] failed - %s",
- r->in.domain_name,
- nt_errstr(status));
- talloc_free(tmp_ctx);
- return status;
- }
+ r->out.error_string
+ = talloc_asprintf(r,
+ "dcerpc_drsuapi_DsCrackNames for [%s] failed - %s",
+ r->in.domain_name,
+ nt_errstr(status));
+ talloc_free(tmp_ctx);
+ return status;
} else if (!W_ERROR_IS_OK(r_crack_names.out.result)) {
r->out.error_string
= talloc_asprintf(r,