r25398: Parse loadparm context to all lp_*() functions.
[gd/samba-autobuild/.git] / source4 / lib / db_wrap.c
index 92e4758f44e46133205bd12a6073e69fbae457bd..82521f2e7eada29f3aae8010277546a353a228e7 100644 (file)
@@ -121,7 +121,7 @@ struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx,
        }
 
        ldb_set_modules_dir(ldb, 
-                           talloc_asprintf(ldb, "%s/ldb", lp_modulesdir()));
+                           talloc_asprintf(ldb, "%s/ldb", lp_modulesdir(global_loadparm)));
 
        /* we want to use the existing event context if possible. This
           relies on the fact that in smbd, everything is a child of
@@ -143,7 +143,7 @@ struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx,
                return NULL;
        }
        
-       if (strcmp(lp_sam_url(), url) == 0) {
+       if (strcmp(lp_sam_url(global_loadparm), url) == 0) {
                dsdb_set_global_schema(ldb);
        }