r26229: Set loadparm context as opaque pointer in ldb, remove more uses of global_loa...
[kai/samba.git] / source / lib / ldb_wrap.c
index 21ca04997e7767ea1c976cda003c1455b5d69ade..d0abb5808a5914226eb08608255497cc0910d746 100644 (file)
@@ -134,6 +134,11 @@ struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx,
                talloc_free(ldb);
                return NULL;
        }
+
+       if (ldb_set_opaque(ldb, "loadparm", lp_ctx)) {
+               talloc_free(ldb);
+               return NULL;
+       }
        
        if (strcmp(lp_sam_url(lp_ctx), url) == 0) {
                dsdb_set_global_schema(ldb);