summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-12-08 00:19:23 +0100
committerMichael Adam <obnox@samba.org>2011-01-02 12:51:54 +0100
commit58508c97260269ec47746adf81da34d9d0d8a1bb (patch)
treeeb3d055baf13b05b0a8ebfcffeaddeedb2e91846
parent41179c2538b38eafc52ac5355d2c4becdd9c87d4 (diff)
downloadsamba-58508c97260269ec47746adf81da34d9d0d8a1bb.tar.gz
samba-58508c97260269ec47746adf81da34d9d0d8a1bb.tar.bz2
samba-58508c97260269ec47746adf81da34d9d0d8a1bb.zip
s3:idmap_ldap: remove use of the ldap_idmap_alloc_context from verify_idpool().
Allocation is now subsumed in the idmap ldap config. This is the beginning of the removal of the idmap ldap alloc parameters.
-rw-r--r--source3/winbindd/idmap_ldap.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c
index 7b1f247c47..0b19cf9272 100644
--- a/source3/winbindd/idmap_ldap.c
+++ b/source3/winbindd/idmap_ldap.c
@@ -168,11 +168,7 @@ static NTSTATUS verify_idpool(struct idmap_domain *dom)
ctx = talloc_get_type(dom->private_data, struct idmap_ldap_context);
- if (!ctx->alloc) {
- return NT_STATUS_UNSUCCESSFUL;
- }
-
- mem_ctx = talloc_new(ctx->alloc);
+ mem_ctx = talloc_new(ctx);
if (mem_ctx == NULL) {
DEBUG(0, ("Out of memory!\n"));
return NT_STATUS_NO_MEMORY;
@@ -184,8 +180,8 @@ static NTSTATUS verify_idpool(struct idmap_domain *dom)
attr_list = get_attr_list(mem_ctx, idpool_attr_list);
CHECK_ALLOC_DONE(attr_list);
- rc = smbldap_search(ctx->alloc->smbldap_state,
- ctx->alloc->suffix,
+ rc = smbldap_search(ctx->smbldap_state,
+ ctx->suffix,
LDAP_SCOPE_SUBTREE,
filter,
attr_list,
@@ -198,14 +194,13 @@ static NTSTATUS verify_idpool(struct idmap_domain *dom)
return NT_STATUS_UNSUCCESSFUL;
}
- count = ldap_count_entries(ctx->alloc->smbldap_state->ldap_struct,
- result);
+ count = ldap_count_entries(ctx->smbldap_state->ldap_struct, result);
ldap_msgfree(result);
if ( count > 1 ) {
DEBUG(0,("Multiple entries returned from %s (base == %s)\n",
- filter, ctx->alloc->suffix));
+ filter, ctx->suffix));
ret = NT_STATUS_UNSUCCESSFUL;
goto done;
}
@@ -228,8 +223,8 @@ static NTSTATUS verify_idpool(struct idmap_domain *dom)
LDAP_ATTR_GIDNUMBER),
gid_str);
if (mods) {
- rc = smbldap_modify(ctx->alloc->smbldap_state,
- ctx->alloc->suffix,
+ rc = smbldap_modify(ctx->smbldap_state,
+ ctx->suffix,
mods);
ldap_mods_free(mods, True);
} else {