|
|
b2d430 |
From 0f3b872aa881d5480fc98b0cfc7421ffc7f802a3 Mon Sep 17 00:00:00 2001
|
|
|
b2d430 |
From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fidencio@redhat.com>
|
|
|
b2d430 |
Date: Wed, 17 Aug 2016 13:12:21 +0200
|
|
|
b2d430 |
Subject: [PATCH 121/121] SECRETS: Return ENOENT when_deleting a non-existent
|
|
|
b2d430 |
secret
|
|
|
b2d430 |
MIME-Version: 1.0
|
|
|
b2d430 |
Content-Type: text/plain; charset=UTF-8
|
|
|
b2d430 |
Content-Transfer-Encoding: 8bit
|
|
|
b2d430 |
|
|
|
b2d430 |
For this, just make use of the sysdb_error_to_errno() function.
|
|
|
b2d430 |
|
|
|
b2d430 |
Resolves:
|
|
|
b2d430 |
https://fedorahosted.org/sssd/ticket/3125
|
|
|
b2d430 |
|
|
|
b2d430 |
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
|
|
|
b2d430 |
|
|
|
b2d430 |
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
|
|
|
b2d430 |
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
|
|
|
b2d430 |
---
|
|
|
b2d430 |
src/responder/secrets/local.c | 9 ++-------
|
|
|
b2d430 |
1 file changed, 2 insertions(+), 7 deletions(-)
|
|
|
b2d430 |
|
|
|
b2d430 |
diff --git a/src/responder/secrets/local.c b/src/responder/secrets/local.c
|
|
|
b2d430 |
index 17469249b357cbdc5e50ddff6b563fdf2f377577..ac3049b62fa77f69d44ec5792139fe3378afb3f4 100644
|
|
|
b2d430 |
--- a/src/responder/secrets/local.c
|
|
|
b2d430 |
+++ b/src/responder/secrets/local.c
|
|
|
b2d430 |
@@ -375,15 +375,10 @@ int local_db_delete(TALLOC_CTX *mem_ctx,
|
|
|
b2d430 |
int ret;
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = local_db_dn(mem_ctx, lctx->ldb, req_path, &dn;;
|
|
|
b2d430 |
- if (ret != EOK) goto done;
|
|
|
b2d430 |
+ if (ret != EOK) return ret;
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = ldb_delete(lctx->ldb, dn);
|
|
|
b2d430 |
- if (ret != EOK) {
|
|
|
b2d430 |
- ret = EIO;
|
|
|
b2d430 |
- }
|
|
|
b2d430 |
-
|
|
|
b2d430 |
-done:
|
|
|
b2d430 |
- return ret;
|
|
|
b2d430 |
+ return sysdb_error_to_errno(ret);
|
|
|
b2d430 |
}
|
|
|
b2d430 |
|
|
|
b2d430 |
int local_db_create(TALLOC_CTX *mem_ctx,
|
|
|
b2d430 |
--
|
|
|
b2d430 |
2.4.11
|
|
|
b2d430 |
|