summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/ldap_server/ldap_rootdse.c2
-rw-r--r--source4/ldap_server/ldap_simple_ldb.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/source4/ldap_server/ldap_rootdse.c b/source4/ldap_server/ldap_rootdse.c
index 75429b1843..93d39fa155 100644
--- a/source4/ldap_server/ldap_rootdse.c
+++ b/source4/ldap_server/ldap_rootdse.c
@@ -282,7 +282,7 @@ static NTSTATUS rootdse_Search(struct ldapsrv_partition *partition, struct ldaps
local_ctx = talloc_named(call, 0, "rootdse_Search local memory context");
NT_STATUS_HAVE_NO_MEMORY(local_ctx);
- ldb = partition->private;
+ ldb = talloc_get_type(partition->private, struct ldb_context);
if (r->num_attributes >= 1) {
attrs = talloc_array(ldb, const char *, r->num_attributes+1);
diff --git a/source4/ldap_server/ldap_simple_ldb.c b/source4/ldap_server/ldap_simple_ldb.c
index 8a68004599..5baa3f92f9 100644
--- a/source4/ldap_server/ldap_simple_ldb.c
+++ b/source4/ldap_server/ldap_simple_ldb.c
@@ -108,7 +108,7 @@ static NTSTATUS sldb_Search(struct ldapsrv_partition *partition, struct ldapsrv_
local_ctx = talloc_named(call, 0, "sldb_Search local memory context");
NT_STATUS_HAVE_NO_MEMORY(local_ctx);
- samdb = partition->private;
+ samdb = talloc_get_type(partition->private, struct ldb_context);
basedn = ldb_dn_explode(local_ctx, r->basedn);
VALID_DN_SYNTAX(basedn, 0);
@@ -235,7 +235,7 @@ static NTSTATUS sldb_Add(struct ldapsrv_partition *partition, struct ldapsrv_cal
local_ctx = talloc_named(call, 0, "sldb_Add local memory context");
NT_STATUS_HAVE_NO_MEMORY(local_ctx);
- samdb = partition->private;
+ samdb = talloc_get_type(partition->private, struct ldb_context);
dn = ldb_dn_explode(local_ctx, r->dn);
VALID_DN_SYNTAX(dn,1);
@@ -332,7 +332,7 @@ static NTSTATUS sldb_Del(struct ldapsrv_partition *partition, struct ldapsrv_cal
local_ctx = talloc_named(call, 0, "sldb_Del local memory context");
NT_STATUS_HAVE_NO_MEMORY(local_ctx);
- samdb = partition->private;
+ samdb = talloc_get_type(partition->private, struct ldb_context);
dn = ldb_dn_explode(local_ctx, r->dn);
VALID_DN_SYNTAX(dn,1);
@@ -386,7 +386,7 @@ static NTSTATUS sldb_Modify(struct ldapsrv_partition *partition, struct ldapsrv_
local_ctx = talloc_named(call, 0, "sldb_Modify local memory context");
NT_STATUS_HAVE_NO_MEMORY(local_ctx);
- samdb = partition->private;
+ samdb = talloc_get_type(partition->private, struct ldb_context);
dn = ldb_dn_explode(local_ctx, r->dn);
VALID_DN_SYNTAX(dn, 1);
@@ -497,7 +497,7 @@ static NTSTATUS sldb_Compare(struct ldapsrv_partition *partition, struct ldapsrv
local_ctx = talloc_named(call, 0, "sldb_Compare local_memory_context");
NT_STATUS_HAVE_NO_MEMORY(local_ctx);
- samdb = partition->private;
+ samdb = talloc_get_type(partition->private, struct ldb_context);
dn = ldb_dn_explode(local_ctx, r->dn);
VALID_DN_SYNTAX(dn, 1);
@@ -564,7 +564,7 @@ static NTSTATUS sldb_ModifyDN(struct ldapsrv_partition *partition, struct ldapsr
local_ctx = talloc_named(call, 0, "sldb_ModifyDN local memory context");
NT_STATUS_HAVE_NO_MEMORY(local_ctx);
- samdb = partition->private;
+ samdb = talloc_get_type(partition->private, struct ldb_context);
olddn = ldb_dn_explode(local_ctx, r->dn);
VALID_DN_SYNTAX(olddn, 2);