URL: https://github.com/SSSD/sssd/pull/477
Author: fidencio
 Title: #477: SYSDB: Return EOK in case a non-fatal issue happened
Action: opened

PR body:
"""
There may be the case where we aren't able to merge the timestamps from
the fast ts db, which are treated as non-fatal issues. In case it
happens, let's return EOK instead of propagating the non-fatal error.

NOTE: I'm not sure whether it's an issue or not, but I've realized that while 
taking a look at a covscan issue found downstream.
"""

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/477/head:pr477
git checkout pr477
From 89ac900e535f8469f2dea37fcd77f590efa049d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fiden...@redhat.com>
Date: Thu, 14 Dec 2017 15:39:02 +0100
Subject: [PATCH] SYSDB: Return EOK in case a non-fatal issue happened
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

There may be the case where we aren't able to merge the timestamps from
the fast ts db, which are treated as non-fatal issues. In case it
happens, let's return EOK instead of propagating the non-fatal error.

Signed-off-by: Fabiano FidĂȘncio <fiden...@redhat.com>
---
 src/db/sysdb_search.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/db/sysdb_search.c b/src/db/sysdb_search.c
index a6a81e23d..dd14084d3 100644
--- a/src/db/sysdb_search.c
+++ b/src/db/sysdb_search.c
@@ -242,6 +242,7 @@ int sysdb_getpwnam(TALLOC_CTX *mem_ctx,
     }
 
     *_res = talloc_steal(mem_ctx, res);
+    ret = EOK;
 
 done:
     talloc_zfree(tmp_ctx);
@@ -354,6 +355,7 @@ int sysdb_getpwuid(TALLOC_CTX *mem_ctx,
     }
 
     *_res = talloc_steal(mem_ctx, res);
+    ret = EOK;
 
 done:
     talloc_zfree(tmp_ctx);
@@ -681,6 +683,7 @@ int sysdb_enumpwent_filter(TALLOC_CTX *mem_ctx,
     }
 
     *_res = talloc_steal(mem_ctx, res);
+    ret = EOK;
 
 done:
     talloc_zfree(tmp_ctx);
@@ -1197,6 +1200,7 @@ int sysdb_enumgrent_filter(TALLOC_CTX *mem_ctx,
     }
 
     *_res = talloc_steal(mem_ctx, res);
+    ret = EOK;
 
 done:
     talloc_zfree(tmp_ctx);
@@ -1594,6 +1598,7 @@ int sysdb_get_user_attr(TALLOC_CTX *mem_ctx,
     }
 
     *_res = talloc_steal(mem_ctx, res);
+    ret = EOK;
 
 done:
     talloc_zfree(tmp_ctx);
_______________________________________________
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org

Reply via email to