From 5b2ca5cc0e22dd184e3eba84af2c00d7065c59c7 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Mon, 4 May 2015 16:33:37 +0200 Subject: LDAP: Use sdap_get_and_parse_generic_/_recv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Related: https://fedorahosted.org/sssd/ticket/2553 Using the new request sdap_get_and_parse_generic_send is a separate commit so that we can audit where the function is used during a code review. Reviewed-by: Pavel Březina --- src/providers/ldap/sdap_async_groups.c | 8 ++++---- src/providers/ldap/sdap_async_users.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c index 73caa9b5b..e785307e6 100644 --- a/src/providers/ldap/sdap_async_groups.c +++ b/src/providers/ldap/sdap_async_groups.c @@ -1870,14 +1870,14 @@ static errno_t sdap_get_groups_next_base(struct tevent_req *req) "Searching for groups with base [%s]\n", state->search_bases[state->base_iter]->basedn); - subreq = sdap_get_generic_send( + subreq = sdap_get_and_parse_generic_send( state, state->ev, state->opts, state->ldap_sh != NULL ? state->ldap_sh : state->sh, state->search_bases[state->base_iter]->basedn, state->search_bases[state->base_iter]->scope, state->filter, state->attrs, state->opts->group_map, SDAP_OPTS_GROUP, - state->timeout, + 0, NULL, NULL, 0, state->timeout, state->enumeration); /* If we're enumerating, we need paging */ if (!subreq) { return ENOMEM; @@ -1903,8 +1903,8 @@ static void sdap_get_groups_process(struct tevent_req *subreq) struct sysdb_attrs **groups; char **groupnamelist; - ret = sdap_get_generic_recv(subreq, state, - &count, &groups); + ret = sdap_get_and_parse_generic_recv(subreq, state, + &count, &groups); talloc_zfree(subreq); if (ret) { tevent_req_error(req, ret); diff --git a/src/providers/ldap/sdap_async_users.c b/src/providers/ldap/sdap_async_users.c index 416bedda8..216b49477 100644 --- a/src/providers/ldap/sdap_async_users.c +++ b/src/providers/ldap/sdap_async_users.c @@ -688,13 +688,13 @@ static errno_t sdap_search_user_next_base(struct tevent_req *req) "Searching for users with base [%s]\n", state->search_bases[state->base_iter]->basedn); - subreq = sdap_get_generic_send( + subreq = sdap_get_and_parse_generic_send( state, state->ev, state->opts, state->sh, state->search_bases[state->base_iter]->basedn, state->search_bases[state->base_iter]->scope, state->filter, state->attrs, state->opts->user_map, state->opts->user_map_cnt, - state->timeout, + 0, NULL, NULL, 0, state->timeout, state->enumeration); /* If we're enumerating, we need paging */ if (subreq == NULL) { return ENOMEM; @@ -715,8 +715,8 @@ static void sdap_search_user_process(struct tevent_req *subreq) struct sysdb_attrs **users; bool next_base = false; - ret = sdap_get_generic_recv(subreq, state, - &count, &users); + ret = sdap_get_and_parse_generic_recv(subreq, state, + &count, &users); talloc_zfree(subreq); if (ret) { tevent_req_error(req, ret); -- cgit