From 6a8ffd54cac6ede65e815b80c04ddd3996706a60 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Aug 11 2014 13:23:29 +0000 Subject: IFP: Fix lookups with fully-qualified names The Data Provider lookup code user the original input string as the lookup key instead of the parsed name component. For example, for an input joe@mydomain, the backend would have searched for: (&(cn=joe@mydomain)(objectclass=user)) This patch fixes the lookup to use the parsed name. https://fedorahosted.org/sssd/ticket/2402 Reviewed-by: Pavel Březina (cherry picked from commit d8b8995ef1c3f2a6c85dc141aaff7eef3faf05c1) --- diff --git a/src/responder/ifp/ifpsrv_cmd.c b/src/responder/ifp/ifpsrv_cmd.c index 84abfc1..6c34f04 100644 --- a/src/responder/ifp/ifpsrv_cmd.c +++ b/src/responder/ifp/ifpsrv_cmd.c @@ -643,7 +643,7 @@ int ifp_cache_check(struct ifp_user_get_attr_state *state, DEBUG(SSSDBG_TRACE_FUNC, "Performing midpoint cache update\n"); req = sss_dp_get_account_send(state, state->rctx, state->dom, true, - search_type, state->inp, 0, + search_type, state->name, 0, NULL); if (req == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, @@ -667,7 +667,7 @@ int ifp_cache_check(struct ifp_user_get_attr_state *state, state->check_provider = false; req = sss_dp_get_account_send(state, state->rctx, state->dom, true, - search_type, state->inp, 0, NULL); + search_type, state->name, 0, NULL); if (req == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, "Out of memory sending data provider request\n");