diff --git a/slapi-nis-eq_once_rel.patch b/slapi-nis-eq_once_rel.patch new file mode 100644 index 0000000..82c1a56 --- /dev/null +++ b/slapi-nis-eq_once_rel.patch @@ -0,0 +1,38 @@ +From 6f325b0370d64335dbe58c0f23fa12d0ee91a6cc Mon Sep 17 00:00:00 2001 +From: Alexander Bokovoy +Date: Tue, 27 Aug 2024 10:55:25 +0300 +Subject: [PATCH] Do not use PR_SecondsToInterval in slapi_eq_once_rel + +Relative time can be specified directly in seconds + +Fixes: https://pagure.io/slapi-nis/issue/54 +Signed-off-by: Alexander Bokovoy +--- + src/back-shr.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/back-shr.c b/src/back-shr.c +index a29f4f9..95c5c8a 100644 +--- a/src/back-shr.c ++++ b/src/back-shr.c +@@ -916,7 +916,7 @@ backend_shr_refresh_thread(void *arg) + + /* Schedule the initialization of the maps */ + slapi_eq_once_rel(backend_shr_data_initialize_thread, cbdata, +- slapi_current_rel_time_t() + PR_SecondsToInterval(1)); ++ slapi_current_rel_time_t() + 1); + PR_Sleep(PR_SecondsToInterval(1)); + + /* Then wait for its completion */ +@@ -975,7 +975,7 @@ backend_shr_startup(struct plugin_state *state, + * but make sure it is called a first thing when event loop is created */ + slapi_eq_once_rel(backend_shr_data_initialize_thread, cbdata, + slapi_current_rel_time_t() + +- PR_SecondsToInterval(PLUGIN_SCAN_DELAY)); ++ PLUGIN_SCAN_DELAY); + + slapi_log_error(SLAPI_LOG_FATAL, + cbdata->state->plugin_desc->spd_id, +-- +2.45.2 + diff --git a/slapi-nis.spec b/slapi-nis.spec index c185654..a8cd36f 100644 --- a/slapi-nis.spec +++ b/slapi-nis.spec @@ -13,12 +13,13 @@ Name: slapi-nis Version: 0.70.0 -Release: 1%{?dist} +Release: 2%{?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-eq_once_rel.patch BuildRequires: make BuildRequires: autoconf @@ -60,6 +61,7 @@ for attributes from multiple entries in the tree. %prep %setup -q +%patch -p1 -P0 %build autoconf --force @@ -113,6 +115,10 @@ for inst in $instances ; do done %changelog +* Tue Aug 27 2024 Alexander Bokovoy - 0.70.0-2 +- Fix regression in data initialization +- Resolves: RHEL-56042 + * Wed Aug 21 2024 Alexander Bokovoy - 0.70.0-1 - Upstream release 0.70.0: make NIS server optional - Disable NIS server support