URL: https://github.com/SSSD/sssd/pull/925 Author: ikerexxe Title: #925: src/util/: Propagate error when multiple entries with same certificate have been found Action: synchronized
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/925/head:pr925 git checkout pr925
From 5a55fe92c7f6db40aa9b0224433c080fc0a35382 Mon Sep 17 00:00:00 2001 From: pedrosam <ikerpedro...@gmail.com> Date: Sat, 2 Nov 2019 10:32:07 +0100 Subject: [PATCH] cache_req: propagate multiple entries error to the caller Explanation: Propagate error when multiple entries with same certificate have been found when only one was expected Resolves: https://pagure.io/SSSD/sssd/issue/2710 --- src/responder/common/cache_req/cache_req_search.c | 2 +- src/util/util_errors.c | 1 + src/util/util_errors.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/responder/common/cache_req/cache_req_search.c b/src/responder/common/cache_req/cache_req_search.c index 873214503e..f3454ba435 100644 --- a/src/responder/common/cache_req/cache_req_search.c +++ b/src/responder/common/cache_req/cache_req_search.c @@ -226,7 +226,7 @@ static errno_t cache_req_search_cache(TALLOC_CTX *mem_ctx, CACHE_REQ_DEBUG(SSSDBG_CRIT_FAILURE, cr, "Multiple objects were found when " "only one was expected!\n"); - ret = ERR_INTERNAL; + ret = ERR_MULTIPLE_ENTRIES; goto done; } diff --git a/src/util/util_errors.c b/src/util/util_errors.c index 9f36967324..0148958d35 100644 --- a/src/util/util_errors.c +++ b/src/util/util_errors.c @@ -123,6 +123,7 @@ struct err_string error_to_str[] = { { "The last GetAccountDomain() result is still valid" }, /* ERR_GET_ACCT_DOM_CACHED */ { "ID is outside the allowed range" }, /* ERR_ID_OUTSIDE_RANGE */ { "Group ID is duplicated" }, /* ERR_GID_DUPLICATED */ + { "Multiple objects were found when only one was expected" }, /* ERR_MULTIPLE_ENTRIES */ /* DBUS Errors */ { "Connection was killed on demand" }, /* ERR_SBUS_KILL_CONNECTION */ diff --git a/src/util/util_errors.h b/src/util/util_errors.h index ae21991caa..ec31a9ee93 100644 --- a/src/util/util_errors.h +++ b/src/util/util_errors.h @@ -144,6 +144,7 @@ enum sssd_errors { ERR_GET_ACCT_DOM_CACHED, ERR_ID_OUTSIDE_RANGE, ERR_GID_DUPLICATED, + ERR_MULTIPLE_ENTRIES, /* DBUS Errors */ ERR_SBUS_KILL_CONNECTION,
_______________________________________________ sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org