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