From 8905344bad2a22c6271340f04093c7bd0e10f348 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 1 Oct 2011 10:57:14 +1000 Subject: s4-dsdb: fixed re-join of subdomain if we repeat the join of a subdomain then we try to re-create the NC for the subdomain during a DsAddEntry(). This allows that re-creation to succeed if the NC already exists --- source4/dsdb/common/util.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source4/dsdb/common') diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index 106e261db9..cae6bd45b3 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -4495,9 +4495,10 @@ int dsdb_create_partial_replica_NC(struct ldb_context *ldb, struct ldb_dn *dn) } ret = dsdb_add(ldb, msg, DSDB_MODIFY_PARTIAL_REPLICA); - if (ret != LDB_SUCCESS) { - DEBUG(0,("Failed to create new NC for %s - %s\n", - ldb_dn_get_linearized(dn), ldb_errstring(ldb))); + if (ret != LDB_SUCCESS && ret != LDB_ERR_ENTRY_ALREADY_EXISTS) { + DEBUG(0,("Failed to create new NC for %s - %s (%s)\n", + ldb_dn_get_linearized(dn), + ldb_errstring(ldb), ldb_strerror(ret))); talloc_free(tmp_ctx); return ret; } -- cgit