|
|
ecf709 |
From cf75c30a42059480eca4c352598ceb3760c27e46 Mon Sep 17 00:00:00 2001
|
|
|
ecf709 |
From: Lukas Slebodnik <lslebodn@redhat.com>
|
|
|
ecf709 |
Date: Mon, 21 Aug 2017 11:42:43 +0200
|
|
|
ecf709 |
Subject: [PATCH 195/195] cache_req: Look for name attribute also in
|
|
|
ecf709 |
nss_cmd_getsidbyid
|
|
|
ecf709 |
MIME-Version: 1.0
|
|
|
ecf709 |
Content-Type: text/plain; charset=UTF-8
|
|
|
ecf709 |
Content-Transfer-Encoding: 8bit
|
|
|
ecf709 |
|
|
|
ecf709 |
We always check negcache after getting data from backend since commit
|
|
|
ecf709 |
4c09cd008967c5c0ec358dc658ffc6fc1cef2697 because we usually do have a name
|
|
|
ecf709 |
in begging of requests "* by ID".
|
|
|
ecf709 |
|
|
|
ecf709 |
We were not interested in name in request sid by id before. However, function
|
|
|
ecf709 |
cache_req_search_ncache_filter always expect name otherwise it returns
|
|
|
ecf709 |
ERR_INTERNAL.
|
|
|
ecf709 |
|
|
|
ecf709 |
[sssd[nss]] [cache_req_set_plugin] (0x2000): CR #8: Setting "Object by ID" plugin
|
|
|
ecf709 |
[sssd[nss]] [cache_req_send] (0x0400): CR #8: New request 'Object by ID'
|
|
|
ecf709 |
[sssd[nss]] [cache_req_select_domains] (0x0400): CR #8: Performing a multi-domain search
|
|
|
ecf709 |
[sssd[nss]] [cache_req_search_domains] (0x0400): CR #8: Search will check the cache and check the data provider
|
|
|
ecf709 |
[sssd[nss]] [cache_req_validate_domain_type] (0x2000): Request type POSIX-only for domain sssdad2012r2.com type POSIX is valid
|
|
|
ecf709 |
[sssd[nss]] [cache_req_set_domain] (0x0400): CR #8: Using domain [sssdad2012r2.com]
|
|
|
ecf709 |
[sssd[nss]] [cache_req_search_send] (0x0400): CR #8: Looking up ID:233600513@sssdad2012r2.com
|
|
|
ecf709 |
[sssd[nss]] [cache_req_search_ncache] (0x0400): CR #8: Checking negative cache for [ID:233600513@sssdad2012r2.com]
|
|
|
ecf709 |
[sssd[nss]] [sss_ncache_check_str] (0x2000): Checking negative cache for [NCE/UID/sssdad2012r2.com/233600513]
|
|
|
ecf709 |
[sssd[nss]] [cache_req_search_ncache] (0x0400): CR #8: [ID:233600513@sssdad2012r2.com] is not present in negative cache
|
|
|
ecf709 |
[sssd[nss]] [cache_req_search_cache] (0x0400): CR #8: Looking up [ID:233600513@sssdad2012r2.com] in cache
|
|
|
ecf709 |
[sssd[nss]] [cache_req_search_send] (0x0400): CR #8: Returning [ID:233600513@sssdad2012r2.com] from cache
|
|
|
ecf709 |
[sssd[nss]] [cache_req_search_ncache_filter] (0x0400): CR #8: Filtering out results by negative cache
|
|
|
ecf709 |
[sssd[nss]] [cache_req_search_ncache_filter] (0x0020): CR #8: sss_get_name_from_msg() returned NULL, which should never happen in this scenario!
|
|
|
ecf709 |
[sssd[nss]] [cache_req_process_result] (0x0400): CR #8: Finished: Error 1432158209: Internal Error
|
|
|
ecf709 |
[sssd[nss]] [nss_protocol_done] (0x4000): Sending reply: error [1432158209]: Internal Error
|
|
|
ecf709 |
[sssd[nss]] [client_recv] (0x0200): Client disconnected!
|
|
|
ecf709 |
|
|
|
ecf709 |
Resolves:
|
|
|
ecf709 |
https://pagure.io/SSSD/sssd/issue/3485
|
|
|
ecf709 |
|
|
|
ecf709 |
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
|
|
|
ecf709 |
(cherry picked from commit 2e72ababbbadda4c4036f99528460c1d595e0941)
|
|
|
ecf709 |
---
|
|
|
ecf709 |
src/responder/common/cache_req/cache_req_data.c | 4 +++-
|
|
|
ecf709 |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
ecf709 |
|
|
|
ecf709 |
diff --git a/src/responder/common/cache_req/cache_req_data.c b/src/responder/common/cache_req/cache_req_data.c
|
|
|
ecf709 |
index 5ab1493b81dbcd1529f1124a2bb1f99d3ae82281..3c365e2fe5826fd58c75f07b08193e5566db2563 100644
|
|
|
ecf709 |
--- a/src/responder/common/cache_req/cache_req_data.c
|
|
|
ecf709 |
+++ b/src/responder/common/cache_req/cache_req_data.c
|
|
|
ecf709 |
@@ -26,7 +26,9 @@ static const char **
|
|
|
ecf709 |
cache_req_data_create_attrs(TALLOC_CTX *mem_ctx,
|
|
|
ecf709 |
const char **requested)
|
|
|
ecf709 |
{
|
|
|
ecf709 |
- static const char *defattrs[] = { SYSDB_DEFAULT_ATTRS };
|
|
|
ecf709 |
+ static const char *defattrs[] = { SYSDB_DEFAULT_ATTRS, SYSDB_NAME,
|
|
|
ecf709 |
+ OVERRIDE_PREFIX SYSDB_NAME,
|
|
|
ecf709 |
+ SYSDB_DEFAULT_OVERRIDE_NAME };
|
|
|
ecf709 |
static size_t defnum = sizeof(defattrs) / sizeof(defattrs[0]);
|
|
|
ecf709 |
const char **attrs;
|
|
|
ecf709 |
size_t reqnum;
|
|
|
ecf709 |
--
|
|
|
ecf709 |
2.13.5
|
|
|
ecf709 |
|