s4-drs: make links to foreign partitions non-fatal
authorAndrew Tridgell <tridge@samba.org>
Mon, 26 Apr 2010 04:39:15 +0000 (14:39 +1000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 26 Apr 2010 09:06:06 +0000 (19:06 +1000)
DN links outside the set of partitions we are replication should be
allowed.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source4/dsdb/samdb/ldb_modules/repl_meta_data.c

index efb44bfd4c0ca9f488018983677ac29dfe5233f7..9dcf24a6cba49c16e8f2557ef1bb2440bac11bd1 100644 (file)
@@ -213,10 +213,9 @@ static int replmd_process_backlink(struct ldb_module *module, struct la_backlink
         */
        ret = dsdb_module_dn_by_guid(module, tmp_ctx, &bl->target_guid, &target_dn);
        if (ret != LDB_SUCCESS) {
-               ldb_asprintf_errstring(ldb, "Failed to find target DN for linked attribute with GUID %s\n",
-                                      GUID_string(bl, &bl->target_guid));
-               talloc_free(tmp_ctx);
-               return ret;
+               DEBUG(2,(__location__ ": WARNING: Failed to find target DN for linked attribute with GUID %s\n",
+                        GUID_string(bl, &bl->target_guid)));
+               return LDB_SUCCESS;
        }
 
        ret = dsdb_module_dn_by_guid(module, tmp_ctx, &bl->forward_guid, &source_dn);
@@ -3720,10 +3719,9 @@ linked_attributes[0]:
           old DN value */
        ret = dsdb_module_dn_by_guid(module, dsdb_dn, &guid, &dsdb_dn->dn);
        if (ret != LDB_SUCCESS) {
-               ldb_asprintf_errstring(ldb, __location__ ": Failed to re-resolve GUID %s",
-                                      GUID_string(tmp_ctx, &guid));
-               talloc_free(tmp_ctx);
-               return ret;
+               DEBUG(2,(__location__ ": WARNING: Failed to re-resolve GUID %s - using %s",
+                        GUID_string(tmp_ctx, &guid),
+                        ldb_dn_get_linearized(dsdb_dn->dn)));
        }
 
        /* see if this link already exists */