r23718: Make Samba4 work against the LDAP backend again.
authorAndrew Bartlett <abartlet@samba.org>
Thu, 5 Jul 2007 03:06:59 +0000 (03:06 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:59:07 +0000 (14:59 -0500)
When we set up the schema, we don't have a partitions container yet.
The LDAP error differs from that given by LDB, so I think we still
have some conformance work to do.

Andrew Bartlett

source/dsdb/samdb/ldb_modules/naming_fsmo.c

index ddd120caf2bc9c690104e454852aa246160eb131..d1c48f412585b0d54c849164453fc9f3025f258d 100644 (file)
@@ -69,10 +69,16 @@ static int naming_fsmo_init(struct ldb_module *module)
                         LDB_SCOPE_BASE,
                         NULL, naming_attrs,
                         &naming_res);
+       if (ret == LDB_ERR_NO_SUCH_OBJECT) {
+               ldb_debug(module->ldb, LDB_DEBUG_WARNING,
+                         "naming_fsmo_init: no partitions dn present: (skip loading of naming contexts details)\n");
+               talloc_free(mem_ctx);
+               return ldb_next_init(module);
+       }
        if (ret != LDB_SUCCESS) {
                ldb_debug_set(module->ldb, LDB_DEBUG_FATAL,
-                             "naming_fsmo_init: failed to search the cross-ref container: %d:%s\n",
-                             ret, ldb_strerror(ret));
+                             "naming_fsmo_init: failed to search the cross-ref container: %s: %s\n",
+                             ldb_strerror(ret), ldb_errstring(module->ldb));
                talloc_free(mem_ctx);
                return ret;
        }