summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-10-01 10:57:14 +1000
committerAndrew Tridgell <tridge@samba.org>2011-10-04 15:08:58 +1100
commit8905344bad2a22c6271340f04093c7bd0e10f348 (patch)
tree4144fd45e46fd1d2325538a73327f9e85fa11da6
parent28a6881d4f4aac814cb01ca87e113caf4b1c8026 (diff)
downloadsamba-8905344bad2a22c6271340f04093c7bd0e10f348.tar.gz
samba-8905344bad2a22c6271340f04093c7bd0e10f348.tar.bz2
samba-8905344bad2a22c6271340f04093c7bd0e10f348.zip
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
-rw-r--r--source4/dsdb/common/util.c7
1 files changed, 4 insertions, 3 deletions
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;
}