sssd/0067-CACHE_REQ-Don-t-error-out-when-searching-by-id-0.patch
Lukas Slebodnik 4c80037896 Backport few upstream patches/fixes
(cherry picked from commit fa4807ec45)
(cherry picked from commit 323dbdee02)
(cherry picked from commit 7e532024f0)
2017-09-01 21:46:00 +02:00

44 lines
1.5 KiB
Diff

From 8888d7a46371ddd2c2514c3e81b58bb1090902a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fidencio@redhat.com>
Date: Mon, 14 Aug 2017 13:35:20 +0200
Subject: [PATCH 67/93] CACHE_REQ: Don't error out when searching by id = 0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This code path can be easily triggered by calling `id 0` and SSSD should
not error out in this case.
Previous patches in this series already add uid and gid 0 to the
negative cache and we can properly handle this situation.
Related: https://pagure.io/SSSD/sssd/issue/3460
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
---
src/responder/common/cache_req/cache_req_data.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/src/responder/common/cache_req/cache_req_data.c b/src/responder/common/cache_req/cache_req_data.c
index 5ab1493b81dbcd1529f1124a2bb1f99d3ae82281..8726e139ffeaaf876f162f6048c86c2145db8662 100644
--- a/src/responder/common/cache_req/cache_req_data.c
+++ b/src/responder/common/cache_req/cache_req_data.c
@@ -119,12 +119,6 @@ cache_req_data_create(TALLOC_CTX *mem_ctx,
case CACHE_REQ_USER_BY_ID:
case CACHE_REQ_GROUP_BY_ID:
case CACHE_REQ_OBJECT_BY_ID:
- if (input->id == 0) {
- DEBUG(SSSDBG_CRIT_FAILURE, "Bug: id cannot be 0!\n");
- ret = ERR_INTERNAL;
- goto done;
- }
-
data->id = input->id;
break;
case CACHE_REQ_OBJECT_BY_SID:
--
2.14.1