Blame SOURCES/0160-IPA-ipa_resolve_user_list_send-take-care-of-override.patch

905b4d
From a74c81b88afe4fe592527cc137504cb3d78d4660 Mon Sep 17 00:00:00 2001
905b4d
From: Sumit Bose <sbose@redhat.com>
905b4d
Date: Tue, 13 Jan 2015 11:03:37 +0100
905b4d
Subject: [PATCH 160/160] IPA: ipa_resolve_user_list_send() take care of
905b4d
 overrides
905b4d
905b4d
Currently ipa_resolve_user_list_send() only looks up the related user
905b4d
objects but do not check for overrides. This patch tries to fix this.
905b4d
905b4d
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
905b4d
(cherry picked from commit eab17959df71341073f946c533f59fc5e593b35c)
905b4d
---
905b4d
 src/providers/ipa/ipa_id.c | 18 ++++++++----------
905b4d
 1 file changed, 8 insertions(+), 10 deletions(-)
905b4d
905b4d
diff --git a/src/providers/ipa/ipa_id.c b/src/providers/ipa/ipa_id.c
905b4d
index 4df6ed0e8ee1e9886151703f424b4580db8799a4..3d6861eeb562683518d425616b0e5c413cddba0b 100644
905b4d
--- a/src/providers/ipa/ipa_id.c
905b4d
+++ b/src/providers/ipa/ipa_id.c
905b4d
@@ -146,7 +146,7 @@ static void ipa_account_info_done(struct tevent_req *req)
905b4d
 
905b4d
 struct ipa_resolve_user_list_state {
905b4d
     struct tevent_context *ev;
905b4d
-    struct sdap_id_ctx *sdap_id_ctx;
905b4d
+    struct ipa_id_ctx *ipa_ctx;
905b4d
     struct be_req *be_req;
905b4d
     struct ldb_message_element *users;
905b4d
     const char *domain_name;
905b4d
@@ -161,7 +161,7 @@ static void ipa_resolve_user_list_get_user_done(struct tevent_req *subreq);
905b4d
 static struct tevent_req *
905b4d
 ipa_resolve_user_list_send(TALLOC_CTX *memctx, struct tevent_context *ev,
905b4d
                            struct be_req *be_req,
905b4d
-                           struct sdap_id_ctx *sdap_id_ctx,
905b4d
+                           struct ipa_id_ctx *ipa_ctx,
905b4d
                            const char *domain_name,
905b4d
                            struct ldb_message_element *users)
905b4d
 {
905b4d
@@ -177,7 +177,7 @@ ipa_resolve_user_list_send(TALLOC_CTX *memctx, struct tevent_context *ev,
905b4d
     }
905b4d
 
905b4d
     state->ev = ev;
905b4d
-    state->sdap_id_ctx = sdap_id_ctx;
905b4d
+    state->ipa_ctx = ipa_ctx;
905b4d
     state->be_req = be_req;
905b4d
     state->domain_name = domain_name;
905b4d
     state->users = users;
905b4d
@@ -221,10 +221,8 @@ static errno_t ipa_resolve_user_list_get_user_step(struct tevent_req *req)
905b4d
 
905b4d
     DEBUG(SSSDBG_TRACE_ALL, "Trying to resolve user [%s].\n", ar->filter_value);
905b4d
 
905b4d
-    subreq = sdap_handle_acct_req_send(state, state->be_req, ar,
905b4d
-                                       state->sdap_id_ctx,
905b4d
-                                       state->sdap_id_ctx->opts->sdom,
905b4d
-                                       state->sdap_id_ctx->conn, true);
905b4d
+    subreq = ipa_id_get_account_info_send(state, state->ev, state->ipa_ctx,
905b4d
+                                          state->be_req, ar);
905b4d
     if (subreq == NULL) {
905b4d
         DEBUG(SSSDBG_OP_FAILURE, "sdap_handle_acct_req_send failed.\n");
905b4d
         return ENOMEM;
905b4d
@@ -243,7 +241,7 @@ static void ipa_resolve_user_list_get_user_done(struct tevent_req *subreq)
905b4d
                                             struct ipa_resolve_user_list_state);
905b4d
     int ret;
905b4d
 
905b4d
-    ret = sdap_handle_acct_req_recv(subreq, &state->dp_error, NULL, NULL);
905b4d
+    ret = ipa_id_get_account_info_recv(subreq, &state->dp_error);
905b4d
     talloc_zfree(subreq);
905b4d
     if (ret != EOK) {
905b4d
         DEBUG(SSSDBG_OP_FAILURE, "sdap_handle_acct request failed: %d\n", ret);
905b4d
@@ -616,7 +614,7 @@ static void ipa_id_get_account_info_orig_done(struct tevent_req *subreq)
905b4d
     if (state->ghosts != NULL) {
905b4d
         /* Resolve ghost members */
905b4d
         subreq = ipa_resolve_user_list_send(state, state->ev, state->be_req,
905b4d
-                                            state->ipa_ctx->sdap_id_ctx,
905b4d
+                                            state->ipa_ctx,
905b4d
                                             state->domain->name,
905b4d
                                             state->ghosts);
905b4d
         if (subreq == NULL) {
905b4d
@@ -682,7 +680,7 @@ static void ipa_id_get_account_info_done(struct tevent_req *subreq)
905b4d
     if (state->ghosts != NULL) {
905b4d
         /* Resolve ghost members */
905b4d
         subreq = ipa_resolve_user_list_send(state, state->ev, state->be_req,
905b4d
-                                            state->ipa_ctx->sdap_id_ctx,
905b4d
+                                            state->ipa_ctx,
905b4d
                                             state->domain->name,
905b4d
                                             state->ghosts);
905b4d
         if (subreq == NULL) {
905b4d
-- 
905b4d
2.1.0
905b4d