diff options
Diffstat (limited to 'source4/libnet/libnet_site.c')
-rw-r--r-- | source4/libnet/libnet_site.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/libnet/libnet_site.c b/source4/libnet/libnet_site.c index 9351aef634..9db9494865 100644 --- a/source4/libnet/libnet_site.c +++ b/source4/libnet/libnet_site.c @@ -51,7 +51,7 @@ NTSTATUS libnet_FindSite(TALLOC_CTX *ctx, struct libnet_JoinSite *r) /* Resolve the site name. */ ZERO_STRUCT(search); search.in.dest_address = r->in.dest_address; - search.in.dest_port = lp_cldap_port(global_loadparm); + search.in.dest_port = r->in.cldap_port; search.in.acct_control = -1; search.in.version = 6; @@ -116,7 +116,8 @@ NTSTATUS libnet_FindSite(TALLOC_CTX *ctx, struct libnet_JoinSite *r) * 2. Add entry CN=<netbios name>,CN=Servers,CN=<site name>,CN=Sites,CN=Configuration,<domain dn>. * TODO: 3.) use DsAddEntry() to create CN=NTDS Settings,CN=<netbios name>,CN=Servers,CN=<site name>,... */ -NTSTATUS libnet_JoinSite(struct ldb_context *remote_ldb, +NTSTATUS libnet_JoinSite(struct libnet_context *ctx, + struct ldb_context *remote_ldb, struct libnet_JoinDomain *libnet_r) { NTSTATUS status; @@ -147,7 +148,7 @@ NTSTATUS libnet_JoinSite(struct ldb_context *remote_ldb, } make_nbt_name_client(&name, libnet_r->out.samr_binding->host); - status = resolve_name(&name, r, &dest_addr, NULL, lp_name_resolve_order(global_loadparm)); + status = resolve_name(lp_resolve_context(ctx->lp_ctx), &name, r, &dest_addr, NULL); if (!NT_STATUS_IS_OK(status)) { libnet_r->out.error_string = NULL; talloc_free(tmp_ctx); @@ -158,6 +159,7 @@ NTSTATUS libnet_JoinSite(struct ldb_context *remote_ldb, r->in.dest_address = dest_addr; r->in.netbios_name = libnet_r->in.netbios_name; r->in.domain_dn_str = libnet_r->out.domain_dn_str; + r->in.cldap_port = lp_cldap_port(ctx->lp_ctx); status = libnet_FindSite(tmp_ctx, r); if (!NT_STATUS_IS_OK(status)) { |