summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-20 11:06:23 +1100
committerAndrew Tridgell <tridge@samba.org>2009-12-21 23:41:09 +1100
commit60acce584bf75c54c71813c93b6c607ef32c867d (patch)
tree6ffaafa0b0ceda8d0224794a22c9bddf1ac11b9c /source4/dsdb
parent87f28cc2671cf0211b0f1b286b719c5baf9e8111 (diff)
downloadsamba-60acce584bf75c54c71813c93b6c607ef32c867d.tar.gz
samba-60acce584bf75c54c71813c93b6c607ef32c867d.tar.bz2
samba-60acce584bf75c54c71813c93b6c607ef32c867d.zip
s4-repl: only try to replicate for NCs that we are a master for
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/repl/drepl_partitions.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source4/dsdb/repl/drepl_partitions.c b/source4/dsdb/repl/drepl_partitions.c
index 85412a793c..5b8227e7de 100644
--- a/source4/dsdb/repl/drepl_partitions.c
+++ b/source4/dsdb/repl/drepl_partitions.c
@@ -39,16 +39,15 @@ WERROR dreplsrv_load_partitions(struct dreplsrv_service *s)
struct ldb_dn *basedn;
struct ldb_result *r;
struct ldb_message_element *el;
- static const char *attrs[] = { "namingContexts", NULL };
+ static const char *attrs[] = { "hasMasterNCs", NULL };
uint32_t i;
int ret;
- basedn = ldb_dn_new(s, s->samdb, NULL);
+ basedn = samdb_ntds_settings_dn(s->samdb);
W_ERROR_HAVE_NO_MEMORY(basedn);
ret = ldb_search(s->samdb, s, &r, basedn, LDB_SCOPE_BASE, attrs,
"(objectClass=*)");
- talloc_free(basedn);
if (ret != LDB_SUCCESS) {
return WERR_FOOBAR;
} else if (r->count != 1) {
@@ -56,7 +55,7 @@ WERROR dreplsrv_load_partitions(struct dreplsrv_service *s)
return WERR_FOOBAR;
}
- el = ldb_msg_find_element(r->msgs[0], "namingContexts");
+ el = ldb_msg_find_element(r->msgs[0], "hasMasterNCs");
if (!el) {
return WERR_FOOBAR;
}