r9685: Add tests for samba3sam mapping module
[sfrench/samba-autobuild/.git] / source4 / lib / ldb / common / ldb_modules.c
index ab743d1b49196e52ce71017d2da578a712626cd7..20e8ad061ead1065a605fbc0a6edc2df0ec30835 100644 (file)
@@ -226,6 +226,17 @@ int ldb_load_modules(struct ldb_context *ldb, const char *options[])
                        DLIST_ADD(ldb->modules, current);
                        continue;
                }
+
+               if (strcmp(modules[i], "samba3sam") == 0) {
+                       current = ldb_samba3sam_module_init(ldb, options);
+                       if (!current) {
+                               ldb_debug(ldb, LDB_DEBUG_FATAL, "function 'init_module' in %s fails\n", modules[i]);
+                               return -1;
+                       }
+                       DLIST_ADD(ldb->modules, current);
+                       continue;
+               }
+
 #endif
 
                ldb_debug(ldb, LDB_DEBUG_WARNING, "WARNING: Module [%s] not found\n", modules[i]);