Don't load LDB_MODULESDIR as a module file
authorTimur I. Bakeyev <timur@iXsystems.com>
Wed, 14 Feb 2018 01:31:58 +0000 (02:31 +0100)
committerUri Simchoni <uri@samba.org>
Mon, 19 Feb 2018 06:36:23 +0000 (07:36 +0100)
We are setting modules directory here(LDB_MODULESDIR) so treat it this
way, no need to attempt to load it as a module file.

Signed-off-by: Timur I. Bakeyev <timur@iXsystems.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
lib/ldb/common/ldb_modules.c

index 25551e1a2edf29ce7ffda36d8e9f093f40adc836..cc067abdfe046240efcff240e692bad0e9e5fb09 100644 (file)
@@ -1103,7 +1103,7 @@ static int ldb_modules_load_dir(const char *modules_dir, const char *version)
 */
 void ldb_set_modules_dir(struct ldb_context *ldb, const char *path)
 {
-       int ret = ldb_modules_load_path(path, LDB_VERSION);
+       int ret = ldb_modules_load_dir(path, LDB_VERSION);
        if (ret != LDB_SUCCESS) {
                ldb_asprintf_errstring(ldb, "Failed to load modules from: %s\n", path);
        }