diff options
Diffstat (limited to 'source4/libnet/libnet_join.c')
-rw-r--r-- | source4/libnet/libnet_join.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c index 40debc63dc..4abd2954f8 100644 --- a/source4/libnet/libnet_join.c +++ b/source4/libnet/libnet_join.c @@ -31,6 +31,7 @@ #include "auth/credentials/credentials.h" #include "auth/credentials/credentials_krb5.h" #include "librpc/gen_ndr/ndr_samr_c.h" +#include "param/param.h" /* * complete a domain join, when joining to a AD domain: @@ -227,7 +228,8 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J return NT_STATUS_NO_MEMORY; } - remote_ldb = ldb_wrap_connect(tmp_ctx, remote_ldb_url, + remote_ldb = ldb_wrap_connect(tmp_ctx, global_loadparm, + remote_ldb_url, NULL, ctx->cred, 0, NULL); if (!remote_ldb) { r->out.error_string = NULL; @@ -534,8 +536,8 @@ NTSTATUS libnet_JoinDomain(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, stru connect_with_info->out.domain_name = talloc_strdup(tmp_ctx, r->in.domain_name); } else { /* Bugger, we just lost our way to automaticly find the domain name */ - connect_with_info->out.domain_name = talloc_strdup(tmp_ctx, lp_workgroup()); - connect_with_info->out.realm = talloc_strdup(tmp_ctx, lp_realm()); + connect_with_info->out.domain_name = talloc_strdup(tmp_ctx, lp_workgroup(global_loadparm)); + connect_with_info->out.realm = talloc_strdup(tmp_ctx, lp_realm(global_loadparm)); } } @@ -887,7 +889,7 @@ static NTSTATUS libnet_Join_primary_domain(struct libnet_context *ctx, if (r->in.netbios_name != NULL) { netbios_name = r->in.netbios_name; } else { - netbios_name = talloc_reference(tmp_mem, lp_netbios_name()); + netbios_name = talloc_reference(tmp_mem, lp_netbios_name(global_loadparm)); if (!netbios_name) { r->out.error_string = NULL; talloc_free(tmp_mem); @@ -924,7 +926,7 @@ static NTSTATUS libnet_Join_primary_domain(struct libnet_context *ctx, r2->in.netbios_name = netbios_name; r2->in.level = LIBNET_JOINDOMAIN_AUTOMATIC; r2->in.acct_type = acct_type; - r2->in.recreate_account = False; + r2->in.recreate_account = false; status = libnet_JoinDomain(ctx, r2, r2); if (!NT_STATUS_IS_OK(status)) { r->out.error_string = talloc_steal(mem_ctx, r2->out.error_string); |