From 63f1e25208e3381e1e5e564c6bc48c3b53fcef3c Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Mon, 12 Oct 2015 13:00:28 +0200 Subject: [PATCH] cache_req: check all domains for lookups by certificate Like lookup by ID or by UPN the match for lookups by certificate can be found in any domain and all sub-domains must be included in the search. --- src/responder/common/responder_cache_req.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/responder/common/responder_cache_req.c b/src/responder/common/responder_cache_req.c index 68206e42af6fdab29567588db307dca3f9f2f877..4ab52b8188859f1143ba1ffa3de03d14ecc028c2 100644 --- a/src/responder/common/responder_cache_req.c +++ b/src/responder/common/responder_cache_req.c @@ -982,6 +982,7 @@ static errno_t cache_req_next_domain(struct tevent_req *req) * qualified names instead. */ while (state->domain != NULL && state->check_next && state->domain->fqnames + && state->input->type != CACHE_REQ_USER_BY_CERT && !cache_req_input_is_upn(state->input)) { state->domain = get_next_domain(state->domain, 0); } @@ -1010,9 +1011,9 @@ static errno_t cache_req_next_domain(struct tevent_req *req) /* we will continue with the following domain the next time */ if (state->check_next) { - if (cache_req_input_is_upn(state->input)) { - state->domain = get_next_domain(state->domain, - SSS_GND_DESCEND); + if (cache_req_input_is_upn(state->input) + || state->input->type == CACHE_REQ_USER_BY_CERT ) { + state->domain = get_next_domain(state->domain, SSS_GND_DESCEND); } else { state->domain = get_next_domain(state->domain, 0); } -- 2.1.0