From d34bf3e0be79a4525352caa7e9cd91cbd7122cd8 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Dec 03 2022 04:11:27 +0000 Subject: import libqb-1.0.3-13.el8 --- diff --git a/SOURCES/bz2111711-connretry-recv.patch b/SOURCES/bz2111711-connretry-recv.patch new file mode 100644 index 0000000..6ca6c95 --- /dev/null +++ b/SOURCES/bz2111711-connretry-recv.patch @@ -0,0 +1,25 @@ +diff --git a/lib/ipc_setup.c b/lib/ipc_setup.c +index 23eeabb..0a720c8 100644 +--- a/lib/ipc_setup.c ++++ b/lib/ipc_setup.c +@@ -447,6 +447,7 @@ qb_ipcc_us_setup_connect(struct qb_ipcc_connection *c, + int32_t res; + struct qb_ipc_connection_request request; + struct ipc_auth_data *data; ++ int retry_count = 0; + #ifdef QB_LINUX + int off = 0; + int on = 1; +@@ -478,7 +479,12 @@ qb_ipcc_us_setup_connect(struct qb_ipcc_connection *c, + } + + qb_ipc_us_ready(&c->setup, NULL, -1, POLLIN); ++retry: + res = qb_ipc_us_recv_msghdr(data); ++ if (res == -EAGAIN && ++retry_count < 10) { ++ usleep(100000); ++ goto retry; ++ } + + #ifdef QB_LINUX + setsockopt(c->setup.u.us.sock, SOL_SOCKET, SO_PASSCRED, &off, diff --git a/SPECS/libqb.spec b/SPECS/libqb.spec index 646aadb..7f26810 100644 --- a/SPECS/libqb.spec +++ b/SPECS/libqb.spec @@ -3,7 +3,7 @@ Name: libqb Version: 1.0.3 -Release: 12%{?dist} +Release: 13%{?dist} Summary: An IPC library for high performance servers Group: System Environment/Libraries @@ -17,6 +17,7 @@ Patch2: bz1714854-improve-shm-security.patch Patch3: bz1718773-avoid-ipc-deadlock.patch Patch4: bz1836146-ipc_set_ownership.patch Patch5: bz1836146-covscan-fixes.patch +Patch6: bz2111711-connretry-recv.patch BuildRequires: autoconf automake libtool doxygen procps check-devel # https://fedoraproject.org/wiki/Packaging:C_and_C%2B%2B#BuildRequires_and_Requires @@ -38,6 +39,7 @@ and polling. %patch3 -p1 -b .bz1718773-avoid-ipc-deadlock.patch %patch4 -p1 -b .bz1836146-ipc_set_ownership.patch %patch5 -p1 -b .bz1836146-covscan-fixes.patch +%patch6 -p1 -b .bz2111711-connretry-recv.patch %build ./autogen.sh @@ -103,6 +105,10 @@ The %{name}-tests package contains the %{name} test suite. %changelog +* Mon Nov 28 2022 Christine Caulfield - 1.0.3-13 + Add retry when receiving credentials from server + Resolves: rhbz#2111711 + * Wed May 20 2020 Christine Caulfield - 1.0.3-11 Correctly set socket directory permissions when qb_ipcs_connection_auth_set() is called