}
smbldap_set_mod(&mods, LDAP_MOD_DELETE, "objectClass", objectclass);
- talloc_autofree_ldapmod(mem_ctx, mods);
+ smbldap_talloc_autofree_ldapmod(mem_ctx, mods);
return smbldap_modify(priv->smbldap_state, dn, mods);
}
}
pdb_set_backend_private_data(user, result, NULL,
my_methods, PDB_CHANGED);
- talloc_autofree_ldapmsg(user, result);
+ smbldap_talloc_autofree_ldapmsg(user, result);
ret = NT_STATUS_OK;
} else {
ldap_msgfree(result);
pdb_set_backend_private_data(user, result, NULL,
my_methods, PDB_CHANGED);
- talloc_autofree_ldapmsg(user, result);
+ smbldap_talloc_autofree_ldapmsg(user, result);
return NT_STATUS_OK;
}
}
pdb_set_backend_private_data(newpwd, result, NULL,
my_methods, PDB_CHANGED);
- talloc_autofree_ldapmsg(newpwd, result);
+ smbldap_talloc_autofree_ldapmsg(newpwd, result);
}
if (ldap_count_entries(ldap_state->smbldap_state->ldap_struct, result) == 0) {
if (rc != LDAP_SUCCESS)
goto done;
- talloc_autofree_ldapmsg(mem_ctx, result);
+ smbldap_talloc_autofree_ldapmsg(mem_ctx, result);
count = ldap_count_entries(conn->ldap_struct, result);
count = ldap_count_entries(conn->ldap_struct, result);
DEBUG(10,("ldapsam_enum_group_members: found %d accounts\n", count));
- talloc_autofree_ldapmsg(mem_ctx, result);
+ smbldap_talloc_autofree_ldapmsg(mem_ctx, result);
for (entry = ldap_first_entry(conn->ldap_struct, result);
entry != NULL;
if (rc != LDAP_SUCCESS)
goto done;
- talloc_autofree_ldapmsg(mem_ctx, result);
+ smbldap_talloc_autofree_ldapmsg(mem_ctx, result);
for (entry = ldap_first_entry(conn->ldap_struct, result);
entry != NULL;
if (rc != LDAP_SUCCESS)
goto done;
- talloc_autofree_ldapmsg(mem_ctx, result);
+ smbldap_talloc_autofree_ldapmsg(mem_ctx, result);
count = ldap_count_entries(priv2ld(ldap_state), result);
if (rc != LDAP_SUCCESS)
goto done;
- talloc_autofree_ldapmsg(mem_ctx, result);
+ smbldap_talloc_autofree_ldapmsg(mem_ctx, result);
num_gids = 0;
*pp_gids = NULL;
rc = smbldap_search_suffix(ldap_state->smbldap_state, filter,
get_attr_list(mem_ctx, groupmap_attr_list),
&msg);
- talloc_autofree_ldapmsg(mem_ctx, msg);
+ smbldap_talloc_autofree_ldapmsg(mem_ctx, msg);
if ((rc != LDAP_SUCCESS) ||
(ldap_count_entries(ldap_state->smbldap_state->ldap_struct, msg) != 1) ||
map->nt_name);
smbldap_make_mod(ldap_state->smbldap_state->ldap_struct, entry, &mods, "description",
map->comment);
- talloc_autofree_ldapmod(mem_ctx, mods);
+ smbldap_talloc_autofree_ldapmod(mem_ctx, mods);
rc = smbldap_modify(ldap_state->smbldap_state, dn, mods);
if (rc != LDAP_SUCCESS) {
rc = smbldap_search(ldap_state->smbldap_state, lp_ldap_suffix(talloc_tos()),
LDAP_SCOPE_SUBTREE, filter, attrs, True, &msg);
- talloc_autofree_ldapmsg(mem_ctx, msg);
+ smbldap_talloc_autofree_ldapmsg(mem_ctx, msg);
if ((rc == LDAP_SUCCESS) &&
(ldap_count_entries(ldap_state->smbldap_state->ldap_struct, msg) > 0)) {
map->comment);
smbldap_make_mod(ldap_state->smbldap_state->ldap_struct, NULL, &mods, "gidNumber",
talloc_asprintf(mem_ctx, "%u", (unsigned int)map->gid));
- talloc_autofree_ldapmod(mem_ctx, mods);
+ smbldap_talloc_autofree_ldapmod(mem_ctx, mods);
rc = smbldap_add(ldap_state->smbldap_state, dn, mods);
rc = smbldap_search_suffix(ldap_state->smbldap_state, filter,
get_attr_list(mem_ctx, groupmap_attr_list),
&msg);
- talloc_autofree_ldapmsg(mem_ctx, msg);
+ smbldap_talloc_autofree_ldapmsg(mem_ctx, msg);
if ((rc != LDAP_SUCCESS) ||
(ldap_count_entries(ldap_state->smbldap_state->ldap_struct, msg) != 1) ||
map->nt_name);
smbldap_make_mod(ldap_state->smbldap_state->ldap_struct, entry, &mods, "description",
map->comment);
- talloc_autofree_ldapmod(mem_ctx, mods);
+ smbldap_talloc_autofree_ldapmod(mem_ctx, mods);
if (mods == NULL) {
DEBUG(4, ("ldapsam_update_group_mapping_entry: mods is empty: "
rc = smbldap_search_suffix(priv->smbldap_state, filter,
get_attr_list(mem_ctx, groupmap_attr_list),
&msg);
- talloc_autofree_ldapmsg(mem_ctx, msg);
+ smbldap_talloc_autofree_ldapmsg(mem_ctx, msg);
if ((rc != LDAP_SUCCESS) ||
(ldap_count_entries(priv2ld(priv), msg) != 1) ||
if (rc != LDAP_SUCCESS) {
return NT_STATUS_UNSUCCESSFUL;
}
- talloc_autofree_ldapmsg(filter, result);
+ smbldap_talloc_autofree_ldapmsg(filter, result);
}
ldap_struct = ldap_state->smbldap_state->ldap_struct;
TALLOC_FREE(ldap_state->search_cache.filter);
/*
* Note: result is a talloc child of filter because of the
- * talloc_autofree_ldapmsg() usage
+ * smbldap_talloc_autofree_ldapmsg() usage
*/
ldap_state->search_cache.filter = talloc_move(ldap_state, &filter);
ldap_state->search_cache.result = result;
lp_ldap_user_suffix(talloc_tos()),
LDAP_SCOPE_SUBTREE, filter, ldap_attrs, 0,
&msg);
- talloc_autofree_ldapmsg(mem_ctx, msg);
+ smbldap_talloc_autofree_ldapmsg(mem_ctx, msg);
}
if (rc != LDAP_SUCCESS)
lp_ldap_suffix(talloc_tos()),
LDAP_SCOPE_SUBTREE, filter, ldap_attrs, 0,
&msg);
- talloc_autofree_ldapmsg(mem_ctx, msg);
+ smbldap_talloc_autofree_ldapmsg(mem_ctx, msg);
}
if (rc != LDAP_SUCCESS)
goto done;
}
- talloc_autofree_ldapmsg(mem_ctx, result);
+ smbldap_talloc_autofree_ldapmsg(mem_ctx, result);
entry = ldap_first_entry(priv2ld(priv), result);
if (entry == NULL) {
smbldap_make_mod(priv2ld(priv), entry, &mods, "sambaNextRid",
talloc_asprintf(mem_ctx, "%d", nextRid));
- talloc_autofree_ldapmod(mem_ctx, mods);
+ smbldap_talloc_autofree_ldapmod(mem_ctx, mods);
if ((dn = smbldap_talloc_dn(mem_ctx, priv2ld(priv), entry)) == NULL) {
status = NT_STATUS_NO_MEMORY;
if (rc != LDAP_SUCCESS) {
goto done;
}
- talloc_autofree_ldapmsg(mem_ctx, result);
+ smbldap_talloc_autofree_ldapmsg(mem_ctx, result);
if (ldap_count_entries(priv2ld(priv), result) != 1) {
DEBUG(10, ("Got %d entries, expected one\n",
if (rc != LDAP_SUCCESS) {
goto done;
}
- talloc_autofree_ldapmsg(tmp_ctx, result);
+ smbldap_talloc_autofree_ldapmsg(tmp_ctx, result);
if (ldap_count_entries(priv2ld(priv), result) != 1) {
DEBUG(3, ("ERROR: Got %d entries for uid %u, expected one\n",
if (rc != LDAP_SUCCESS) {
goto done;
}
- talloc_autofree_ldapmsg(tmp_ctx, result);
+ smbldap_talloc_autofree_ldapmsg(tmp_ctx, result);
if (ldap_count_entries(priv2ld(priv), result) != 1) {
DEBUG(3, ("ERROR: Got %d entries for gid %u, expected one\n",
DEBUG(0,("ldapsam_create_user: ldap search failed!\n"));
return NT_STATUS_ACCESS_DENIED;
}
- talloc_autofree_ldapmsg(tmp_ctx, result);
+ smbldap_talloc_autofree_ldapmsg(tmp_ctx, result);
num_result = ldap_count_entries(priv2ld(ldap_state), result);
smbldap_set_mod(&mods, LDAP_MOD_ADD, "loginShell", shell);
}
- talloc_autofree_ldapmod(tmp_ctx, mods);
+ smbldap_talloc_autofree_ldapmod(tmp_ctx, mods);
if (add_posix) {
rc = smbldap_add(ldap_state->smbldap_state, dn, mods);
DEBUG(0,("ldapsam_delete_user: user search failed!\n"));
return NT_STATUS_UNSUCCESSFUL;
}
- talloc_autofree_ldapmsg(tmp_ctx, result);
+ smbldap_talloc_autofree_ldapmsg(tmp_ctx, result);
num_result = ldap_count_entries(priv2ld(ldap_state), result);
DEBUG(0,("ldapsam_create_group: ldap search failed!\n"));
return NT_STATUS_UNSUCCESSFUL;
}
- talloc_autofree_ldapmsg(tmp_ctx, result);
+ smbldap_talloc_autofree_ldapmsg(tmp_ctx, result);
num_result = ldap_count_entries(priv2ld(ldap_state), result);
smbldap_set_mod(&mods, LDAP_MOD_ADD, "gidNumber", gidstr);
}
- talloc_autofree_ldapmod(tmp_ctx, mods);
+ smbldap_talloc_autofree_ldapmod(tmp_ctx, mods);
if (is_new_entry) {
rc = smbldap_add(ldap_state->smbldap_state, dn, mods);
DEBUG(1,("ldapsam_delete_dom_group: group search failed!\n"));
return NT_STATUS_UNSUCCESSFUL;
}
- talloc_autofree_ldapmsg(tmp_ctx, result);
+ smbldap_talloc_autofree_ldapmsg(tmp_ctx, result);
num_result = ldap_count_entries(priv2ld(ldap_state), result);
DEBUG(1,("ldapsam_delete_dom_group: accounts search failed!\n"));
return NT_STATUS_UNSUCCESSFUL;
}
- talloc_autofree_ldapmsg(tmp_ctx, result);
+ smbldap_talloc_autofree_ldapmsg(tmp_ctx, result);
num_result = ldap_count_entries(priv2ld(ldap_state), result);
DEBUG(1,("ldapsam_change_groupmem: member search failed!\n"));
return NT_STATUS_UNSUCCESSFUL;
}
- talloc_autofree_ldapmsg(tmp_ctx, result);
+ smbldap_talloc_autofree_ldapmsg(tmp_ctx, result);
num_result = ldap_count_entries(priv2ld(ldap_state), result);
DEBUG(1,("ldapsam_change_groupmem: group search failed!\n"));
return NT_STATUS_UNSUCCESSFUL;
}
- talloc_autofree_ldapmsg(tmp_ctx, result);
+ smbldap_talloc_autofree_ldapmsg(tmp_ctx, result);
num_result = ldap_count_entries(priv2ld(ldap_state), result);
smbldap_set_mod(&mods, modop, "memberUid", uidstr);
- talloc_autofree_ldapmod(tmp_ctx, mods);
+ smbldap_talloc_autofree_ldapmod(tmp_ctx, mods);
rc = smbldap_modify(ldap_state->smbldap_state, dn, mods);
if (rc != LDAP_SUCCESS) {
DEBUG(0,("ldapsam_set_primary_group: user search failed!\n"));
return NT_STATUS_UNSUCCESSFUL;
}
- talloc_autofree_ldapmsg(mem_ctx, result);
+ smbldap_talloc_autofree_ldapmsg(mem_ctx, result);
num_result = ldap_count_entries(priv2ld(ldap_state), result);
filter, attrs, attrsonly, &result);
if (result != NULL) {
- talloc_autofree_ldapmsg(mem_ctx, result);
+ smbldap_talloc_autofree_ldapmsg(mem_ctx, result);
}
if (rc == LDAP_NO_SUCH_OBJECT) {
}
}
- talloc_autofree_ldapmod(talloc_tos(), mods);
+ smbldap_talloc_autofree_ldapmod(talloc_tos(), mods);
trusted_dn = trusteddom_dn(ldap_state, domain);
if (trusted_dn == NULL) {
&result);
if (result != NULL) {
- talloc_autofree_ldapmsg(mem_ctx, result);
+ smbldap_talloc_autofree_ldapmsg(mem_ctx, result);
}
if (rc != LDAP_SUCCESS) {