From 02813c46feb5484a2e171514c7ba9dd9b1b34006 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek@redhat.com>
Date: Mon, 4 May 2015 16:33:37 +0200
Subject: [PATCH 09/13] 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 <pbrezina@redhat.com>
---
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 73caa9b5bd662477cd29b5220f6b437991831578..e785307e60d0df5be96a5b2de2c07baabaf1e371 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 416bedda8491fae5385e6b6a074b4cf05ae86b65..216b49477bf21481265444c5c03df0aac7ee84e4 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);
--
2.4.3