Upstream release 0.70.0: make NIS server optional
Disable NIS server support Resolves: RHEL-34186 Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
parent
3f78b5c8bd
commit
12573d7af3
2
.gitignore
vendored
2
.gitignore
vendored
@ -87,3 +87,5 @@ slapi-nis-0.17.tar.gz
|
||||
/slapi-nis-0.56.7.tar.gz.asc
|
||||
/slapi-nis-0.60.0.tar.gz
|
||||
/slapi-nis-0.60.0.tar.gz.asc
|
||||
/slapi-nis-0.70.0.tar.gz
|
||||
/slapi-nis-0.70.0.tar.gz.asc
|
||||
|
@ -1,102 +0,0 @@
|
||||
From ee94788e63d9f35daca7c0d1e80a488f738a9c52 Mon Sep 17 00:00:00 2001
|
||||
From: Thierry Bordaz <tbordaz@redhat.com>
|
||||
Date: Fri, 1 Sep 2023 11:02:08 +0200
|
||||
Subject: [PATCH 1/2] BZ 2124214 - schema compat plugin deadlock on delete post
|
||||
op
|
||||
|
||||
Bug description:
|
||||
backends locks (SC map and retroCL) are acquired in
|
||||
the opposite order
|
||||
(https://bugzilla.redhat.com/show_bug.cgi?id=2124214#c17)
|
||||
|
||||
Fix description:
|
||||
Credits of the fix are to Pierre Rogier who found
|
||||
a reproducible testcase, did the fix and verified it.
|
||||
|
||||
In specific condition of retroCL trimming the DEL
|
||||
callback of the SC should check if the backend should
|
||||
be ignored
|
||||
|
||||
relates: 2124214
|
||||
---
|
||||
src/back-shr.c | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/src/back-shr.c b/src/back-shr.c
|
||||
index ce2b1f3..1792bef 100644
|
||||
--- a/src/back-shr.c
|
||||
+++ b/src/back-shr.c
|
||||
@@ -2811,6 +2811,18 @@ backend_shr_delete_cb(Slapi_PBlock *pb)
|
||||
if (wrap_get_call_level() > 0) {
|
||||
return 0;
|
||||
}
|
||||
+ /* especially important to test if we want to prevent frequent
|
||||
+ * deadlocks when backends are accesses in opposite order.
|
||||
+ * i.e. "regular" update on domain map+retroCL and retroCL trimming
|
||||
+ * retroCL+domain map
|
||||
+ */
|
||||
+ if (backend_shr_write_ignore(pb)) {
|
||||
+#if DEBUG_MAP_LOCK
|
||||
+ slapi_log_error(SLAPI_LOG_FATAL, "schema-compat",
|
||||
+ "backend_shr_delete_cb: (%p) operation is not impacting schema compat\n", PR_MyThreadId(), 1);
|
||||
+#endif
|
||||
+ return 0;
|
||||
+ }
|
||||
|
||||
/* Read parameters from the pblock. */
|
||||
slapi_pblock_get(pb, SLAPI_PLUGIN_PRIVATE, &cbdata.state);
|
||||
--
|
||||
2.41.0
|
||||
|
||||
|
||||
From 61fcf534c3da767788e27641f3ebfe4d6a6c0b25 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Bokovoy <abokovoy@redhat.com>
|
||||
Date: Mon, 9 Oct 2023 13:53:28 +0300
|
||||
Subject: [PATCH 2/2] Add more ignores to modrdn and modify cases
|
||||
|
||||
BZ 2124214 - schema compat plugin deadlock on delete post op
|
||||
|
||||
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
|
||||
---
|
||||
src/back-shr.c | 18 ++++++++++++++++++
|
||||
1 file changed, 18 insertions(+)
|
||||
|
||||
diff --git a/src/back-shr.c b/src/back-shr.c
|
||||
index 1792bef..4cbc39b 100644
|
||||
--- a/src/back-shr.c
|
||||
+++ b/src/back-shr.c
|
||||
@@ -2463,6 +2463,15 @@ backend_shr_modify_cb(Slapi_PBlock *pb)
|
||||
/* No data yet, ignore */
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
+ if (backend_shr_write_ignore(pb)) {
|
||||
+#if DEBUG_MAP_LOCK
|
||||
+ slapi_log_error(SLAPI_LOG_FATAL, "schema-compat",
|
||||
+ "backend_shr_modify_cb: (%p) operation is not impacting schema compat\n", PR_MyThreadId(), 1);
|
||||
+#endif
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
slapi_pblock_get(pb, SLAPI_MODIFY_TARGET, &dn);
|
||||
slapi_pblock_get(pb, SLAPI_MODIFY_MODS, &cbdata.mods);
|
||||
slapi_pblock_get(pb, SLAPI_ENTRY_PRE_OP, &cbdata.e_pre);
|
||||
@@ -2669,6 +2678,15 @@ backend_shr_modrdn_cb(Slapi_PBlock *pb)
|
||||
/* No data yet, ignore */
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
+ if (backend_shr_write_ignore(pb)) {
|
||||
+#if DEBUG_MAP_LOCK
|
||||
+ slapi_log_error(SLAPI_LOG_FATAL, "schema-compat",
|
||||
+ "backend_shr_modrdn_cb: (%p) operation is not impacting schema compat\n", PR_MyThreadId(), 1);
|
||||
+#endif
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
slapi_pblock_get(pb, SLAPI_ENTRY_PRE_OP, &cbdata.e_pre);
|
||||
slapi_pblock_get(pb, SLAPI_ENTRY_POST_OP, &cbdata.e_post);
|
||||
|
||||
--
|
||||
2.41.0
|
||||
|
@ -1,3 +1,5 @@
|
||||
%bcond_with nis
|
||||
|
||||
%if 0%{?fedora} >= 14 || 0%{?rhel} >= 6
|
||||
%define ldap_impl openldap
|
||||
%else
|
||||
@ -10,14 +12,13 @@
|
||||
%endif
|
||||
|
||||
Name: slapi-nis
|
||||
Version: 0.60.0
|
||||
Release: 6%{?dist}
|
||||
Summary: NIS Server and Schema Compatibility plugins for Directory Server
|
||||
Version: 0.70.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Schema Compatibility plugin for Directory Server
|
||||
License: GPL-3.0-or-later
|
||||
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-deadlocks.patch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: autoconf
|
||||
@ -32,11 +33,13 @@ BuildRequires: libsss_nss_idmap-devel > 1.16.0-5
|
||||
%define sss_nss_opts %{nil}
|
||||
%endif
|
||||
BuildRequires: pam-devel
|
||||
%if %{with nis}
|
||||
%if (0%{?fedora} > 14 && 0%{?fedora} < 28) || (0%{?rhel} > 6 && 0%{?rhel} < 8)
|
||||
BuildRequires: libtirpc-devel
|
||||
%else
|
||||
BuildRequires: libnsl2-devel
|
||||
%endif
|
||||
%endif
|
||||
%if 0%{?fedora} > 27 || 0%{?rhel} >= 9
|
||||
ExcludeArch: %{ix86}
|
||||
%endif
|
||||
@ -57,12 +60,17 @@ for attributes from multiple entries in the tree.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
autoconf --force
|
||||
%if %{with nis}
|
||||
WITH_NIS=--enable-nis=yes
|
||||
%else
|
||||
WITH_NIS=--disable-nis
|
||||
%endif
|
||||
%configure --disable-static --with-ldap=%{ldap_impl} \
|
||||
--with-nsswitch --with-pam --with-pam-service=system-auth \
|
||||
$WITH_NIS \
|
||||
%{sss_nss_opts} %{betxn_opts}
|
||||
sed -i -e 's,%{_libdir}/dirsrv/plugins/,,g' -e 's,.so$,,g' doc/examples/*.ldif
|
||||
make %{?_smp_mflags}
|
||||
@ -79,12 +87,37 @@ make check
|
||||
%endif
|
||||
|
||||
%files
|
||||
%doc COPYING NEWS README STATUS doc/*.txt doc/examples/*.ldif doc/ipa
|
||||
%doc COPYING NEWS README STATUS doc/sch-*.txt doc/examples/sch-*.ldif doc/ipa
|
||||
%if %{with nis}
|
||||
%doc doc/nis-*.txt doc/examples/nis-*.ldif
|
||||
%{_mandir}/man1/*
|
||||
%{_libdir}/dirsrv/plugins/*.so
|
||||
%{_sbindir}/nisserver-plugin-defs
|
||||
%endif
|
||||
%{_libdir}/dirsrv/plugins/*.so
|
||||
|
||||
%triggerin -- 389-ds-base
|
||||
instances=$(/usr/sbin/dsctl -l)
|
||||
for inst in $instances ; do
|
||||
grep -q "cn=NIS server,cn=plugins" /etc/dirsrv/${inst}/dse.ldif
|
||||
if test $? -eq 0 ; then
|
||||
/usr/bin/ldapdelete -Y EXTERNAL -H ldapi://%2fvar%2frun%2f${inst}.socket -r "cn=NIS Server,cn=plugins,cn=config" 2>/dev/null
|
||||
result=$?
|
||||
if test $result -eq 255 ; then
|
||||
echo "Cannot remove NIS server plugin from LDAP server ${inst} instance. Server will fail to start until it is removed."
|
||||
echo "Remove 'cn=NIS Server,cn=plugins,cn=config' entry from /etc/dirsrv/${inst}/dse.ldif"
|
||||
fi
|
||||
if test $result -eq 0 ; then
|
||||
/usr/sbin/dsctl "$inst" restart
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
%changelog
|
||||
* Wed Aug 21 2024 Alexander Bokovoy <abokovoy@redhat.com> - 0.70.0-1
|
||||
- Upstream release 0.70.0: make NIS server optional
|
||||
- Disable NIS server support
|
||||
- Resolves: RHEL-34186
|
||||
|
||||
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 0.60.0-6
|
||||
- Bump release for June 2024 mass rebuild
|
||||
|
||||
|
4
sources
4
sources
@ -1,2 +1,2 @@
|
||||
SHA512 (slapi-nis-0.60.0.tar.gz) = 15fe7f821c6b7eea5f93edb46adcc8ba8ac8369e47b607bd56db23bbaf3e0a3e35da412bcc3665aa35bfd01d3863222d926d661adb70491f3ecce1204bc4b6e7
|
||||
SHA512 (slapi-nis-0.60.0.tar.gz.asc) = 117c1da76320ec065970752cfb5de379dbe7899e08dbcb7f2699daa26cb8cb429e1436092e4d5b39c162fc3b3f58b3c48a24c6884c2bd909767bccdd27cf7786
|
||||
SHA512 (slapi-nis-0.70.0.tar.gz) = c287eaecb407f9de8d231809126e585c578306f78732f93ac51ac90ae47ebe2e2d3a4e36c0de99dd4dc8fdd1675a9cc2ad83918a082a61fdf564b75c164b391d
|
||||
SHA512 (slapi-nis-0.70.0.tar.gz.asc) = 9c896418b25ff33dc490e47e2dacfdd8421198823c2b9ceb49ad0bebf233ed842e510c953b5de013f64df2aeeaef49de7c0b8e6a32fb14dd9ed1eb7e07fad27b
|
||||
|
Loading…
Reference in New Issue
Block a user