don't load @ATTRIBUTES if we have an override handler in place
authorAndrew Tridgell <tridge@samba.org>
Tue, 7 Apr 2009 06:34:18 +0000 (16:34 +1000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 7 Apr 2009 06:34:18 +0000 (16:34 +1000)
source4/lib/ldb/ldb_tdb/ldb_cache.c

index 43b965f239a0c419b8d5475267d12a41ae4c40bc..042c1c928292efd9647b54197f086a0edf27fce0 100644 (file)
@@ -32,6 +32,7 @@
  */
 
 #include "ldb_tdb.h"
+#include "ldb_private.h"
 
 #define LTDB_FLAG_CASE_INSENSITIVE (1<<0)
 #define LTDB_FLAG_INTEGER          (1<<1)
@@ -115,6 +116,12 @@ static int ltdb_attributes_load(struct ldb_module *module)
 
        ldb = ldb_module_get_ctx(module);
 
+       if (ldb->schema.attribute_handler_override) {
+               /* we skip loading the @ATTRIBUTES record when a module is supplying
+                  its own attribute handling */
+               return LDB_SUCCESS;
+       }
+
        dn = ldb_dn_new(module, ldb, LTDB_ATTRIBUTES);
        if (dn == NULL) goto failed;