Compare commits

...

No commits in common. "imports/c8s-stream-client/slapi-nis-0.56.6-1.module+el8.4.0+9006+fb2f405d" and "c8-stream-DL1" have entirely different histories.

6 changed files with 132 additions and 21 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/slapi-nis-0.56.6.tar.gz
SOURCES/slapi-nis-0.60.0.tar.gz

View File

@ -1 +1 @@
c32d869856123cbecd7b3786bc2bd880d01c47ed SOURCES/slapi-nis-0.56.6.tar.gz
e5a84cf93b13b174c6d865de2f735cbfbc950917 SOURCES/slapi-nis-0.60.0.tar.gz

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEhAodHH8+xLL+UwQ1RxniuKu/YhoFAl/KPI0ACgkQRxniuKu/
Yhp7KA//aI0HHAGWn56NjsbLCdk98tpt3YekptGwKpaDiFan7An2JtnJe3CvC71q
pAWtj1VduHLx+cAxRaRPKSheMkqv9qKrIvhtDHKEgTs9zkxZ02AYa8Emof9x8v6h
KsnRYMpy5TmKlvT8urnNbrkQXcxGvfjkaBYdaLegT87tSuLsB5vmZpfDbcdMuZ6V
mfU7JOoKpq0aXg/cYfSc3Br8njZujQXjdUipwKQMBQivNdFzkUk/ly6v8eWXP0O5
TlD0Rg8QMcSVgqG8hcLVzka078AHzAlOK1B2hGRuFXfRrnd88mDxPps7UEbEfSy3
oULXpXdQGVet7kujo8JfUyS5D4yiJOS2q/KmES8IGpIUeiwrV+383/pU2UY+lCUU
Cjv62t4YAwsFOOo+2z0thmzvpEc6FtP9mMx88JRX01OkSCapThgPaGKMfr8wM5Ez
/3YK4RC14FybOF6jruoTkvlW0b4d6wsZwPHOKs+IeflO8UzncwfxY8L7GiSwTmC/
40QYCNrXmo79dyg9MGvXtBhUOnfZ41zSVdpzN3EZ5ulMZvdnsBeRK2ixImgQKLSf
80uZV0k/+koInWYnUQYMbTpKP1843KxZWnLmfd82w1ju5fAsSoDvu9MnomswiRhp
PzQdcWBSjcQxWjVxwN4RKXqcLCxm99xywTHYIP1xSCuN22KNOLk=
=EOmw
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEhAodHH8+xLL+UwQ1RxniuKu/YhoFAmMAimgACgkQRxniuKu/
YhorRw/8D0typYdDLGlalL7nMo57rjSApgy6gA4FKxMsNg/KiN1/7rMoCbu13iG0
sP6wpeZLjBNI/nWGYLRuQOyi7DSxgXYlNp+8xzJDMKjnNjRSaK+/EjqIcWhdWoEq
Q1JDjTdJ3hDCWCMQFrA/EBqb/WgQAhdmPdVzMoy6L2GBvX7W+UlCWaSMfpq5hnqg
9SZe4NpC7i6BVhHrnWUMsQRcApnjdHlC8tQmzqdD0+iNer0asXmJcQGCI9W7EwAs
MT4be/C2hfLfWgBdaMCZGgefGFYGI1ec+hfM9jyGsJcBsRXQ8Rq+VOLEI7lkD+wc
nQwq1VVVcAwFkbziQ5JBZqOKdem8lo9Mucn/sQ297EIfIi8NVhlDDZFtkgsYAglT
gaEeK4+d0QNz2+ViwJxGp2l0mG2inV8GjiyINpntbw8dh+qwI8xLI6/6B7R6wP30
Kj/90EehX0vFXX2ylrkrvg3d7UGp6PBgsiqeaJT5bL2ItVKJl8FyD0N9JsEL766/
SKqNHGZjEJv1rzPf2MMqutLHe1aSyTBjq4JBYPJKHAXPdvZluyALLM94erZqA/tJ
17PCLAf3P+OvixcnyzsUTP9U7SNlLPiMqwyvUB26ul0+CqEqKzZxiTOfpbKQ8p/j
3QpkrKLn0JbofZN1K7H6x/Mdwe5scdeTP0T8YPJm+ofZq+fBdnI=
=ZUV6
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,78 @@
From 24eeccd408d9627299231d7843ca9e65e71af3de Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <abokovoy@redhat.com>
Date: Tue, 21 Mar 2023 17:32:47 +0200
Subject: [PATCH 1/2] Test the case when container is a child of the target DN
We can have target DN both inside or outside of a container.
Previously, the code did not look into the latter one. When container is
a child of the target DN (like using IPA's base DN instead of
cn=compat,$BASE_DN) and a search was done with a subtree scope, the
check failed.
With this change a subtree scope search which starts with a base DN
that includes a compat tree's container would be considered for the
search.
Fixes: rhbz#2168893
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
---
src/back-sch.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/back-sch.c b/src/back-sch.c
index 93746b1..e447bda 100644
--- a/src/back-sch.c
+++ b/src/back-sch.c
@@ -1340,11 +1340,12 @@ backend_search_find_set_dn_in_group_cb(const char *group, const char *set, bool_
if (slapi_sdn_scope_test(cbdata->target_dn,
set_data->container_sdn,
- cbdata->scope) == 1) {
+ cbdata->scope) != 0) {
cbdata->answer = TRUE;
- }
-
- if (slapi_sdn_issuffix(cbdata->target_dn, set_data->container_sdn) == 1) {
+ } else if ((cbdata->scope == LDAP_SCOPE_SUBTREE) &&
+ slapi_sdn_scope_test(set_data->container_sdn,
+ cbdata->target_dn,
+ cbdata->scope) != 0) {
cbdata->answer = TRUE;
}
--
2.40.0
From 73058645eac86b40913deec01807854e0a8bda0d Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <abokovoy@redhat.com>
Date: Mon, 24 Apr 2023 12:19:10 +0300
Subject: [PATCH 2/2] Identify the container without search base check
Ignore the actual search base when identifying whether a target DN is
within a known data container. The reason is that we need to know
whether a search would have to descent into a particular container. The
scope validation will happen later.
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
---
src/back-sch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/back-sch.c b/src/back-sch.c
index e447bda..a79f61b 100644
--- a/src/back-sch.c
+++ b/src/back-sch.c
@@ -1340,7 +1340,7 @@ backend_search_find_set_dn_in_group_cb(const char *group, const char *set, bool_
if (slapi_sdn_scope_test(cbdata->target_dn,
set_data->container_sdn,
- cbdata->scope) != 0) {
+ LDAP_SCOPE_SUBTREE) != 0) {
cbdata->answer = TRUE;
} else if ((cbdata->scope == LDAP_SCOPE_SUBTREE) &&
slapi_sdn_scope_test(set_data->container_sdn,
--
2.40.0

View File

@ -10,15 +10,17 @@
%endif
Name: slapi-nis
Version: 0.56.6
Release: 1%{?dist}
Version: 0.60.0
Release: 3%{?dist}
Summary: NIS Server and Schema Compatibility plugins for Directory Server
Group: System Environment/Daemons
License: GPLv2
License: GPLv3
URL: http://pagure.io/slapi-nis/
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
Patch0: slapi-nis-bz2183469.patch
BuildRequires: make
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
@ -56,6 +58,7 @@ for attributes from multiple entries in the tree.
%prep
%setup -q
%patch0 -p1
%build
autoconf --force
@ -84,6 +87,36 @@ make check
%{_sbindir}/nisserver-plugin-defs
%changelog
* Mon Apr 24 2023 Alexander Bokovoy <abokovoy@redhat.com> - 0.60.0-3
- Also handle base searches within the compat tree
- Related: rhbz#2183469
* Wed Apr 12 2023 Alexander Bokovoy <abokovoy@redhat.com> - 0.60.0-2
- Fix base DN searches outside the compat tree
- Resolves: rhbz#2183469
* Sat Aug 20 2022 Alexander Bokovoy <abokovoy@redhat.com> - 0.60.0-1
- upstream release 0.60.0
- Change license from GPLv2 to GPLv3+ to follow 389-ds licensing
- Resolves: rhbz#1984010
Fix ID views integration
- Fix base scope lookups
- Resolves: rhbz#1784172
Bump NIS max dgram size to 8KB by default instead of 1KB
- Resolves: rhbz#2070575
Allow to rebuild the compat tree
* Mon Sep 13 2021 Alexander Bokovoy <abokovoy@redhat.com> - 0.56.6-4
- Resolves: rhbz#2000919 - memory leak in backend_search_cb
* Thu Jul 01 2021 Alexander Bokovoy <abokovoy@redhat.com> - 0.56.6-3
- Resolves: rhbz#1958909 - fix regression for scoped searches in compat tree
- Resolves: rhbz#1978189 - better handle error response from libsss_nss_idmap
* Wed Apr 07 2021 Alexander Bokovoy <abokovoy@redhat.com> - 0.56.6-2
- CVE 2021-3480: idm:DL1/slapi-nis: NULL dereference (DoS) with specially crafted Binding DN
- Resolves: rhbz#1944713
* Fri Dec 04 2020 Alexander Bokovoy <abokovoy@redhat.com> - 0.56.6-1
- Upstream release 0.56.6
- Resolves rhbz#1891741