[SSSD] [PATCH] IFP: Fix lookups with fully-qualified names

Jakub Hrozek jhrozek at redhat.com
Thu Aug 7 17:47:31 UTC 2014


Hi,

I found this embarassing bug when testing the space substitution changes
for the InfoPipe responder.

We seriously need more InfoPipe unit tests..
-------------- next part --------------
>From 525ff31ddd88882414574d1e782685d3859c4665 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Thu, 7 Aug 2014 16:14:51 +0200
Subject: [PATCH] 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 at mydomain, the backend would have searched for:
    (&(cn=joe at mydomain)(objectclass=user))

This patch fixes the lookup to use the parsed name.
---
 src/responder/ifp/ifpsrv_cmd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/responder/ifp/ifpsrv_cmd.c b/src/responder/ifp/ifpsrv_cmd.c
index 50483933188cfe9cf1a855bf3505f7e24a91b975..93fc9a8cfb11375e60ea388ede6a18503643950a 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");
-- 
1.9.3



More information about the sssd-devel mailing list