r10820: Use talloc_get_type as suggested by tridge.
authorAndrew Bartlett <abartlet@samba.org>
Fri, 7 Oct 2005 12:30:46 +0000 (12:30 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 7 Oct 2005 12:30:46 +0000 (12:30 +0000)
Andrew Bartlett

source/ldap_server/ldap_rootdse.c
source/ldap_server/ldap_simple_ldb.c

index 75429b1843eb1baf1649307912fcbded0615e9bb..93d39fa155d78395df3f24ab5fcb0f63bfc6a3bb 100644 (file)
@@ -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);
index 8a68004599a8e55b2676e44dd2d48e056ff4712d..5baa3f92f9ab46d857340249ba22f474a7bcc243 100644 (file)
@@ -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);