s4-kcc: fixed _msdcs DNS name
authorAndrew Tridgell <tridge@samba.org>
Mon, 22 Aug 2011 07:29:54 +0000 (17:29 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 24 Aug 2011 21:39:38 +0000 (07:39 +1000)
we need to base this DNS name on the forest DNS name for multi-domain
support

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

source4/dsdb/kcc/kcc_periodic.c

index 8b74bab80a57ce460d942527a50aa4b99692ffb5..2654f9f2d9adfbe93d9fe1ddb9302b36fb64a767 100644 (file)
@@ -356,9 +356,7 @@ NTSTATUS kccsrv_simple_update(struct kccsrv_service *s, TALLOC_CTX *mem_ctx)
                r1 = &reps[count].ctr.ctr1;
 
                r1->other_info               = talloc_zero(reps, struct repsFromTo1OtherInfo);
-               r1->other_info->dns_name     = talloc_asprintf(r1->other_info, "%s._msdcs.%s",
-                                                              GUID_string(mem_ctx, &ntds_guid),
-                                                              lpcfg_dnsdomain(s->task->lp_ctx));
+               r1->other_info->dns_name     = samdb_ntds_msdcs_dns_name(s->samdb, reps, &ntds_guid);
                r1->source_dsa_obj_guid      = ntds_guid;
                r1->source_dsa_invocation_id = invocation_id;
                r1->replica_flags = kccsrv_replica_flags(s);