import slapi-nis-0.60.0-2.el9

This commit is contained in:
CentOS Sources 2022-09-27 09:00:37 -04:00 committed by Stepan Oksanichenko
parent 6a8d798b31
commit aad3fbbe14
7 changed files with 34 additions and 118 deletions

2
.gitignore vendored
View File

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

View File

@ -1 +1 @@
53226040ee1c83e08a89cddf30f3943f88371ea9 SOURCES/slapi-nis-0.56.7.tar.gz
e5a84cf93b13b174c6d865de2f735cbfbc950917 SOURCES/slapi-nis-0.60.0.tar.gz

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEhAodHH8+xLL+UwQ1RxniuKu/YhoFAmCjZIsACgkQRxniuKu/
YhpwrQ//X4EKLzW7zSGX0YrNEK7v4dMI8nsY6oAip1k1zQh9PnbUjbedWq7ArkDU
VZIJ3l95qQZGSpFipNdy5ylAJEitQEVYG77KZtee/5Y7dyJp5dxMP58U0n7dxxsI
V3JurNAGZgTkrdY860ByiFqHu6hqWtnx+IBXiIzOnnCkgMoHc5YTDAUSR3nQI6yL
cZcoFHtaiwdiXTL5jJokbDYVc8ruJsTo8FouRQTWjzs+lNrmI1dlEfW4b7v01GQy
GzMXn8NnoEOCJimnSDoEkl2IyOxEhU/J8jo43PtiFiVK22jwWcEtWYP7DuiJP4eN
qFXicBDWnoYdlET5/3Lagbt9ogXT+cCZrZHoRyAQ6yrCGDUdu9O2iG6oAr3m/tFb
IJfZuC2vgWjXYASdVLNEakD05ggOoS4T/UYh1qHQCPV7Qp884J5m9k9qPDIyKRx2
BDugRAiLMOADEbntDyy6jOFit15RwmPklz3KI45LvIuWy8z++SiFAXoG04ysXigL
tJJoPZpIZ/pn/9cSA+rga0Jfp8M8hwKgxxPuOlEuonIrFTaaGGNwq6JbUbV2QNZU
utH3nrlkxX6mjp7xj6GMlX/oZAo+lcKIJmoIFo6sT6XQQQjnieame08CqyTB6yKH
9MZqibIPTipzvLe3kDn/o3q0fXKP7mvlvBdFyBeitXWJ/fq0A6c=
=FVlm
-----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

@ -1,52 +0,0 @@
From 0f700cf71f5531fb6c863990216aa1eb88970dc8 Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <abokovoy@redhat.com>
Date: Wed, 16 Jun 2021 11:08:21 +0300
Subject: [PATCH] back-sch-nss: only loop if asked to try again
slapi-nis uses sss-idmap library to discover user group membership. Its
sss_nss_getgrouplist_timeout() function can return timeout errors as
well which might cause a busy looping. sss_nss_getgrouplist_timeout()
will return ERANGE which is translated by slapi-nis to NSS_STATUS_TRYAGAIN.
Fixes: rhbz#1967179
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
---
src/back-sch-nss.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/back-sch-nss.c b/src/back-sch-nss.c
index df04a96..b595f3b 100644
--- a/src/back-sch-nss.c
+++ b/src/back-sch-nss.c
@@ -589,19 +589,22 @@ repeat:
return NULL;
}
- do {
+ for(rc = NSS_STATUS_TRYAGAIN; rc == NSS_STATUS_TRYAGAIN;) {
rc = backend_nss_getgrouplist(ctx, user_name, pwd.pw_gid,
grouplist, &ngroups,
&lerrno);
- if ((rc != NSS_STATUS_SUCCESS)) {
- tmp_list = realloc(grouplist, ngroups * sizeof(gid_t));
- if (tmp_list == NULL) {
+ if (rc == NSS_STATUS_TRYAGAIN) {
+ tmp_list = NULL;
+ if (lerrno == ERANGE) {
+ tmp_list = realloc(grouplist, ngroups * sizeof(gid_t));
+ }
+ if ((tmp_list == NULL) || (lerrno == ENOMEM)) {
free(grouplist);
return NULL;
}
grouplist = tmp_list;
}
- } while (rc != NSS_STATUS_SUCCESS);
+ }
entries = calloc(ngroups + 1, sizeof(entries[0]));
if (entries == NULL) {
--
2.31.1

View File

@ -1,41 +0,0 @@
From d18b1d105c928363eddec87af37fda0757cfb440 Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <abokovoy@redhat.com>
Date: Thu, 1 Jul 2021 11:37:38 +0300
Subject: [PATCH] back-sch: reuse backend_should_descend
When backend_search_find_set_dn_cb() is called, use the same logic as in
other callbacks -- identify whether we should descend into the group by
using backend_should_descend().
The issue was introduced in 2015 with ID Views support but was masked
until 61ea8f6a104da25329e301a8f56944f860de8177 as we always felt through
to the full scan of the groups anyway. with the latter change the
fell-through part was removed.
Resolves: rhbz#1958909
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Signed-off-by: Thierry Bordaz <tbordaz@redhat.com>
---
src/back-sch.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/back-sch.c b/src/back-sch.c
index d806627..0ed06fb 100644
--- a/src/back-sch.c
+++ b/src/back-sch.c
@@ -1369,8 +1369,9 @@ backend_search_find_set_dn_cb(const char *group, void *cb_data)
/* Check the group itself. */
group_dn = slapi_sdn_new_dn_byval(group);
- if (slapi_sdn_scope_test(group_dn, cbdata->target_dn,
- cbdata->scope) == 1) {
+ if (backend_should_descend(group_dn,
+ cbdata->target_dn,
+ cbdata->scope)) {
cbdata->answer = TRUE;
slapi_sdn_free(&group_dn);
return TRUE;
--
2.31.1

View File

@ -10,15 +10,13 @@
%endif
Name: slapi-nis
Version: 0.56.7
Release: 4%{?dist}
Version: 0.60.0
Release: 2%{?dist}
Summary: NIS Server and Schema Compatibility plugins for Directory Server
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
Patch1: slapi-nis-bz1979623.patch
Patch2: slapi-nis-bz1979619.patch
BuildRequires: make
BuildRequires: autoconf
@ -58,8 +56,6 @@ for attributes from multiple entries in the tree.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%build
autoconf --force
@ -87,6 +83,19 @@ make check
%{_sbindir}/nisserver-plugin-defs
%changelog
* Sun Aug 21 2022 Alexander Bokovoy <abokovoy@redhat.com> - 0.60.0-2
- Rebuild to fix changelog
- Related: rhbz#2117299
* 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
- Fix ID views integration
- Fix base scope lookups
- Bump NIS max dgram size to 8KB by default instead of 1KB
- Resolves: rhbz#2117299
Allow to rebuild the compat tree
* Fri Jan 21 2022 Alexander Bokovoy <abokovoy@redhat.com> - 0.56.7-4
- Rebuild against libnsl 2.0.0
- Related: rhbz#2039220