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 83011fdaba66b167516ae2c847ad74fec9eb6430 Mon Sep 17 00:00:00 2001
From: pedrosam <ikerpedro...@gmail.com>
Date: Sat, 2 Nov 2019 10:32:07 +0100
Subject: [PATCH] COMPONENT: src/util/

Explanation: Propagate error when multiple entries with same certificate have been found

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..9754bfd418 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 */
+    { "Certificate matches multiple user entries" }, /* 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

Reply via email to