diff --git a/SOURCES/slapi-nis-ignore-unmatched-searches.patch b/SOURCES/slapi-nis-ignore-unmatched-searches.patch new file mode 100644 index 0000000..fbe02a2 --- /dev/null +++ b/SOURCES/slapi-nis-ignore-unmatched-searches.patch @@ -0,0 +1,53 @@ +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 + diff --git a/SPECS/slapi-nis.spec b/SPECS/slapi-nis.spec index c2bad4b..6aabe19 100644 --- a/SPECS/slapi-nis.spec +++ b/SPECS/slapi-nis.spec @@ -11,7 +11,7 @@ Name: slapi-nis Version: 0.56.5 -Release: 3%{?dist} +Release: 4%{?dist} Summary: NIS Server and Schema Compatibility plugins for Directory Server Group: System Environment/Daemons License: GPLv2 @@ -20,6 +20,7 @@ Source0: https://releases.pagure.org/slapi-nis/slapi-nis-%{version}.tar.gz Source1: https://releases.pagure.org/slapi-nis/slapi-nis-%{version}.tar.gz.asc Patch1: slapi-nis-bz1832331.patch Patch2: slapi-nis-fix-valgrind-issues.patch +Patch3: slapi-nis-ignore-unmatched-searches.patch BuildRequires: autoconf BuildRequires: automake @@ -60,6 +61,7 @@ for attributes from multiple entries in the tree. %setup -q %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build autoconf --force @@ -88,6 +90,10 @@ make check %{_sbindir}/nisserver-plugin-defs %changelog +* Mon Sep 14 2020 Alexander Bokovoy - 0.56.5-4 +- Ignore unmatched searches +- Resolves: rhbz#1874015 + * Thu Sep 10 2020 Alexander Bokovoy - 0.56.5-3 - Fix memory leaks in ID views processing - Resolves: rhbz#1875348