summaryrefslogtreecommitdiffstats
path: root/src/responder/common/cache_req/plugins
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2016-10-05 14:05:45 +0200
committerLukas Slebodnik <lslebodn@redhat.com>2016-12-19 23:28:55 +0100
commit4049b63f8c67ada17b453463b0451ca6be3d5de4 (patch)
tree1c0d014c7b63ec9d17eca6bd2891f76072abe92b /src/responder/common/cache_req/plugins
parenta5a3bbb0bbaeb8946c228c2fb7f0cf450595dd3e (diff)
downloadsssd-4049b63f8c67ada17b453463b0451ca6be3d5de4.tar.gz
sssd-4049b63f8c67ada17b453463b0451ca6be3d5de4.tar.xz
sssd-4049b63f8c67ada17b453463b0451ca6be3d5de4.zip
nss: rewrite nss responder so it uses cache_req
Given the size of the current nss responder it was quite impossible to simply switch into using the cache_req interface, especially because most of the code was duplication of cache lookups. This patch completely rewrites the responder from scratch. The amount of code was reduced to less than a half lines of code with no code duplication, better documentation and better maintainability and readability. All functionality should be intact. *Code organization* All protocol (parsing input message and send a reply) is placed in nss_protocol.c. Functions that deals with creating a reply packet are placed into their specific nss_protocol_$object.c files. All supported commands are placed into nss_cmd.c. Functions that deals with cache req are in nss_get_object.c and nss_enum.c. *Code flow for non-enumeration* An nss_getby_$input-type is called for each non-enumeration command. This function parses the input message, creates a cache_req_data structure and issues nss_get_object that calls cache_req. When this request is done nss_getby_done make sure a reply is sent to the client. *Comments on enumeration* I made some effort to make sure enumeration shares the same code for users, groups, services and netgroups. Netgroups now uses nss negative cache instead of implementing its own. Resolves: https://fedorahosted.org/sssd/ticket/3151 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Diffstat (limited to 'src/responder/common/cache_req/plugins')
-rw-r--r--src/responder/common/cache_req/plugins/cache_req_object_by_name.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/responder/common/cache_req/plugins/cache_req_object_by_name.c b/src/responder/common/cache_req/plugins/cache_req_object_by_name.c
index 313d90bc0..1ec906c7a 100644
--- a/src/responder/common/cache_req/plugins/cache_req_object_by_name.c
+++ b/src/responder/common/cache_req/plugins/cache_req_object_by_name.c
@@ -55,7 +55,7 @@ cache_req_object_by_name_well_known(TALLOC_CTX *mem_ctx,
ret = name_to_well_known_sid(domname, name, &sid);
if (ret != EOK) {
- return EOK;
+ return ret;
}
result = cache_req_well_known_sid_result(mem_ctx, cr, domname, sid, name);