summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/libnet/libnet_join.c4
-rw-r--r--source4/libnet/libnet_rpc.c13
2 files changed, 15 insertions, 2 deletions
diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c
index fb28eaed2f..1d64257ca3 100644
--- a/source4/libnet/libnet_join.c
+++ b/source4/libnet/libnet_join.c
@@ -642,7 +642,7 @@ NTSTATUS libnet_JoinDomain(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, stru
if (!NT_STATUS_IS_OK(status)) {
r->out.error_string = talloc_asprintf(mem_ctx,
"samr_CreateUser2 (recreate) for [%s] failed: %s\n",
- r->in.domain_name, nt_errstr(status));
+ r->in.account_name, nt_errstr(status));
talloc_free(tmp_ctx);
return status;
}
@@ -650,7 +650,7 @@ NTSTATUS libnet_JoinDomain(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, stru
} else if (!NT_STATUS_IS_OK(status)) {
r->out.error_string = talloc_asprintf(mem_ctx,
"samr_CreateUser2 for [%s] failed: %s\n",
- r->in.domain_name, nt_errstr(status));
+ r->in.account_name, nt_errstr(status));
talloc_free(tmp_ctx);
return status;
}
diff --git a/source4/libnet/libnet_rpc.c b/source4/libnet/libnet_rpc.c
index d4d187368b..3574559d4f 100644
--- a/source4/libnet/libnet_rpc.c
+++ b/source4/libnet/libnet_rpc.c
@@ -474,6 +474,11 @@ static void continue_lsa_policy(struct rpc_request *req)
return;
}
+ if (!NT_STATUS_IS_OK(s->lsa_query_info2.out.result)) {
+ composite_error(c, s->lsa_query_info2.out.result);
+ return;
+ }
+
/* query lsa info for dns domain name and guid */
s->lsa_query_info2.in.handle = &s->lsa_handle;
s->lsa_query_info2.in.level = LSA_POLICY_INFO_DNS;
@@ -517,6 +522,14 @@ static void continue_lsa_query_info2(struct rpc_request *req)
return;
}
+ if (!NT_STATUS_IS_OK(s->lsa_query_info2.out.result)) {
+ s->r.out.error_string = talloc_asprintf(c,
+ "lsa_QueryInfoPolicy2 failed: %s",
+ nt_errstr(s->lsa_query_info2.out.result));
+ composite_error(c, s->lsa_query_info2.out.result);
+ return;
+ }
+
/* Copy the dns domain name and guid from the query result */
/* this should actually be a conversion from lsa_StringLarge */