summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2016-07-12 18:03:03 +0200
committerSumit Bose <sbose@redhat.com>2016-07-13 15:45:07 +0200
commited1efbfb95a9ee6577e47f26d250f70410290aea (patch)
treef2c47ec2b2cd1eb5863b07cfe877ee1327bb1dd9
parent75f5b8ca4b4371da752bcdcb990b3eb0abb2ef82 (diff)
downloadsssd-ed1efbfb95a9ee6577e47f26d250f70410290aea.zip
sssd-ed1efbfb95a9ee6577e47f26d250f70410290aea.tar.gz
sssd-ed1efbfb95a9ee6577e47f26d250f70410290aea.tar.xz
ipa_resolve_user_list_get_user_step fix
-rw-r--r--src/providers/ipa/ipa_id.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/providers/ipa/ipa_id.c b/src/providers/ipa/ipa_id.c
index 262d3af..7cc79f9 100644
--- a/src/providers/ipa/ipa_id.c
+++ b/src/providers/ipa/ipa_id.c
@@ -132,7 +132,14 @@ static errno_t ipa_resolve_user_list_get_user_step(struct tevent_req *req)
DEBUG(SSSDBG_TRACE_ALL, "Trying to resolve user [%s].\n", ar->filter_value);
- subreq = ipa_id_get_account_info_send(state, state->ev, state->ipa_ctx, ar);
+ if (strcasecmp(state->domain_name,
+ state->ipa_ctx->sdap_id_ctx->be->domain->name) != 0) {
+ subreq = ipa_subdomain_account_send(state, state->ev, state->ipa_ctx,
+ ar);
+ } else {
+ subreq = ipa_id_get_account_info_send(state, state->ev, state->ipa_ctx,
+ ar);
+ }
if (subreq == NULL) {
DEBUG(SSSDBG_OP_FAILURE, "sdap_handle_acct_req_send failed.\n");
return ENOMEM;
@@ -151,7 +158,12 @@ static void ipa_resolve_user_list_get_user_done(struct tevent_req *subreq)
struct ipa_resolve_user_list_state);
int ret;
- ret = ipa_id_get_account_info_recv(subreq, &state->dp_error);
+ if (strcasecmp(state->domain_name,
+ state->ipa_ctx->sdap_id_ctx->be->domain->name) != 0) {
+ ret = ipa_subdomain_account_recv(subreq, &state->dp_error);
+ } else {
+ ret = ipa_id_get_account_info_recv(subreq, &state->dp_error);
+ }
talloc_zfree(subreq);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE, "sdap_handle_acct request failed: %d\n", ret);