diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-12-20 11:06:23 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-12-21 23:41:09 +1100 |
commit | 60acce584bf75c54c71813c93b6c607ef32c867d (patch) | |
tree | 6ffaafa0b0ceda8d0224794a22c9bddf1ac11b9c | |
parent | 87f28cc2671cf0211b0f1b286b719c5baf9e8111 (diff) | |
download | samba-60acce584bf75c54c71813c93b6c607ef32c867d.tar.gz samba-60acce584bf75c54c71813c93b6c607ef32c867d.tar.bz2 samba-60acce584bf75c54c71813c93b6c607ef32c867d.zip |
s4-repl: only try to replicate for NCs that we are a master for
-rw-r--r-- | source4/dsdb/repl/drepl_partitions.c | 7 |
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; } |