summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2010-09-30 13:16:19 -0700
committerKai Blin <kai@samba.org>2010-10-23 10:17:05 +0000
commite7358e75821b036b19327dc4117226def5787db7 (patch)
tree9d345e0136521f9f4fcb98f5323352e917e6a852 /source4
parentf26c9b3966d27c4c53b8334d3eb272a7bf3226b0 (diff)
downloadsamba-e7358e75821b036b19327dc4117226def5787db7.tar.gz
samba-e7358e75821b036b19327dc4117226def5787db7.tar.bz2
samba-e7358e75821b036b19327dc4117226def5787db7.zip
s4 dsdb kcc: Prefer msDS-hasMasterNCs over hasMasterNCs when replicating
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/kcc/kcc_periodic.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source4/dsdb/kcc/kcc_periodic.c b/source4/dsdb/kcc/kcc_periodic.c
index d9ca618992..b1e976b18e 100644
--- a/source4/dsdb/kcc/kcc_periodic.c
+++ b/source4/dsdb/kcc/kcc_periodic.c
@@ -84,9 +84,12 @@ static bool check_MasterNC(struct kccsrv_partition *p, struct repsFromToBlob *r,
continue;
}
- el = ldb_msg_find_element(msg, "hasMasterNCs");
+ el = ldb_msg_find_element(msg, "msDS-hasMasterNCs");
if (!el || el->num_values == 0) {
- continue;
+ el = ldb_msg_find_element(msg, "hasMasterNCs");
+ if (!el || el->num_values == 0) {
+ continue;
+ }
}
for (j=0; j<el->num_values; j++) {
dn = ldb_dn_from_ldb_val(p, p->service->samdb, &el->values[j]);
@@ -96,8 +99,10 @@ static bool check_MasterNC(struct kccsrv_partition *p, struct repsFromToBlob *r,
}
if (ldb_dn_compare(dn, p->dn) == 0) {
talloc_free(dn);
- DEBUG(5,("%s hasMasterNCs match on %s in %s\n",
- r1->other_info->dns_name, ldb_dn_get_linearized(dn),
+ DEBUG(5,("%s %s match on %s in %s\n",
+ r1->other_info->dns_name,
+ el->name,
+ ldb_dn_get_linearized(dn),
ldb_dn_get_linearized(msg->dn)));
return true;
}
@@ -313,7 +318,7 @@ NTSTATUS kccsrv_simple_update(struct kccsrv_service *s, TALLOC_CTX *mem_ctx)
struct ldb_result *res;
unsigned int i;
int ret;
- const char *attrs[] = { "objectGUID", "invocationID", "hasMasterNCs", NULL };
+ const char *attrs[] = { "objectGUID", "invocationID", "msDS-hasMasterNCs", "hasMasterNCs", NULL };
struct repsFromToBlob *reps = NULL;
uint32_t count = 0;
struct kcc_connection_list *ntds_conn, *dsa_conn;