summaryrefslogtreecommitdiff
path: root/source4/dsdb/repl/drepl_out_helpers.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-08-22 17:30:15 +1000
committerAndrew Tridgell <tridge@samba.org>2011-08-25 07:39:38 +1000
commit5a9dc1d216fe419570891099fa7dd922bf025671 (patch)
tree5d37f7fbfe70d53b8acf409eacd4318e2a8a02ff /source4/dsdb/repl/drepl_out_helpers.c
parent484fb303ff2b7e5becd2ad9502ae8645657a3ced (diff)
downloadsamba-5a9dc1d216fe419570891099fa7dd922bf025671.tar.gz
samba-5a9dc1d216fe419570891099fa7dd922bf025671.tar.bz2
samba-5a9dc1d216fe419570891099fa7dd922bf025671.zip
s4-repl: fixed _msdcs DNS name
another multi-domain fix
Diffstat (limited to 'source4/dsdb/repl/drepl_out_helpers.c')
-rw-r--r--source4/dsdb/repl/drepl_out_helpers.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/source4/dsdb/repl/drepl_out_helpers.c b/source4/dsdb/repl/drepl_out_helpers.c
index 7b513a8050..19d09572c4 100644
--- a/source4/dsdb/repl/drepl_out_helpers.c
+++ b/source4/dsdb/repl/drepl_out_helpers.c
@@ -691,7 +691,6 @@ static void dreplsrv_update_refs_trigger(struct tevent_req *req)
struct dreplsrv_partition *partition = state->op->source_dsa->partition;
struct dreplsrv_drsuapi_connection *drsuapi = state->op->source_dsa->conn->drsuapi;
struct drsuapi_DsReplicaUpdateRefs *r;
- char *ntds_guid_str;
char *ntds_dns_name;
struct tevent_req *subreq;
@@ -700,15 +699,9 @@ static void dreplsrv_update_refs_trigger(struct tevent_req *req)
return;
}
- ntds_guid_str = GUID_string(r, &service->ntds_guid);
- if (tevent_req_nomem(ntds_guid_str, req)) {
- return;
- }
-
- ntds_dns_name = talloc_asprintf(r, "%s._msdcs.%s",
- ntds_guid_str,
- lpcfg_dnsdomain(service->task->lp_ctx));
+ ntds_dns_name = samdb_ntds_msdcs_dns_name(service->samdb, r, &service->ntds_guid);
if (tevent_req_nomem(ntds_dns_name, req)) {
+ talloc_free(r);
return;
}
@@ -728,6 +721,7 @@ static void dreplsrv_update_refs_trigger(struct tevent_req *req)
drsuapi->drsuapi_handle,
r);
if (tevent_req_nomem(subreq, req)) {
+ talloc_free(r);
return;
}
tevent_req_set_callback(subreq, dreplsrv_update_refs_done, req);