diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-09-21 08:56:32 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-09-22 10:00:48 +1000 |
commit | 2b929b0b515ae6c3f000d1f522dbac542fff9546 (patch) | |
tree | ecd90212a20a640eac732e7636e775ed0aba2177 /source4/dsdb/repl/drepl_service.c | |
parent | 86f5ecdc0c97b21be6d9d2f7be4e15b8d95af219 (diff) | |
download | samba-2b929b0b515ae6c3f000d1f522dbac542fff9546.tar.gz samba-2b929b0b515ae6c3f000d1f522dbac542fff9546.tar.xz samba-2b929b0b515ae6c3f000d1f522dbac542fff9546.zip |
s4-dsdb: enable initial replication of partitions via DsReplicaSync
we need to create a temporary dsa object to allow the replication task
to replicate a NC that is not listed in a repsFrom attribute
Diffstat (limited to 'source4/dsdb/repl/drepl_service.c')
-rw-r--r-- | source4/dsdb/repl/drepl_service.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/dsdb/repl/drepl_service.c b/source4/dsdb/repl/drepl_service.c index ec803f6fdb..e12ff1e819 100644 --- a/source4/dsdb/repl/drepl_service.c +++ b/source4/dsdb/repl/drepl_service.c @@ -306,6 +306,16 @@ static NTSTATUS drepl_replica_sync(struct irpc_message *msg, werr = dreplsrv_partition_source_dsa_by_guid(p, &req1->source_dsa_guid, &dsa); + if (W_ERROR_EQUAL(werr, WERR_DS_DRA_NO_REPLICA)) { + /* we don't have this source setup as + a replication partner. Create a + temporary dsa structure for this + replication */ + werr = dreplsrv_partition_source_dsa_temporary(p, + msg, + &req1->source_dsa_guid, + &dsa); + } } if (!W_ERROR_IS_OK(werr)) { REPLICA_SYNC_FAIL("Failed to locate source DSA for given NC", |