From 61ea8f6a104da25329e301a8f56944f860de8177 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Sat, 12 Sep 2020 12:00:22 +0300 Subject: [PATCH] Ignore searches that do not match any of configured tree Resolves: rhbz#1874015 Signed-off-by: Alexander Bokovoy --- slapi-nis.spec | 5 ++++- src/back-sch.c | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/slapi-nis.spec b/slapi-nis.spec index 3eb3e37..8bde325 100644 --- a/slapi-nis.spec +++ b/slapi-nis.spec @@ -11,7 +11,7 @@ Name: slapi-nis Version: 0.56.5 -Release: 1%{?dist} +Release: 3%{?dist} Summary: NIS Server and Schema Compatibility plugins for Directory Server License: GPLv2 URL: http://pagure.io/slapi-nis/ @@ -81,6 +81,9 @@ make check %{_sbindir}/nisserver-plugin-defs %changelog +* Sat Sep 12 2020 Alexander Bokovoy - 0.56.5-3 +- Ignore searches which don't match any configured map + * Mon May 04 2020 Alexander Bokovoy - 0.56.5-1 - New upstream release - Resolves: rhbz#1751295: (2) When sync-repl is enabled, slapi-nis can deadlock during retrochanglog trimming diff --git a/src/back-sch.c b/src/back-sch.c index f8b04a3..a5e4c04 100644 --- a/src/back-sch.c +++ b/src/back-sch.c @@ -1790,6 +1790,10 @@ backend_search_cb(Slapi_PBlock *pb) } } slapi_ch_free_string(&target); + if (cbdata.answer == FALSE) { + /* None of the configured trees in the sets matched the target at all, ignore search */ + return 0; + } } cbdata.answer = FALSE; #endif -- 2.26.2