import libtirpc-1.1.4-4.el8
This commit is contained in:
parent
f6a43ba00d
commit
76cde80469
68
SOURCES/libtirpc-1.1.4-fix-EOF-non-block.patch
Normal file
68
SOURCES/libtirpc-1.1.4-fix-EOF-non-block.patch
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
diff -up libtirpc-1.1.4/src/svc_vc.c.orig libtirpc-1.1.4/src/svc_vc.c
|
||||||
|
--- libtirpc-1.1.4/src/svc_vc.c.orig 2018-08-27 10:06:49.000000000 -0400
|
||||||
|
+++ libtirpc-1.1.4/src/svc_vc.c 2019-07-24 11:51:32.191485387 -0400
|
||||||
|
@@ -502,9 +502,14 @@ read_vc(xprtp, buf, len)
|
||||||
|
cfp = (struct cf_conn *)xprt->xp_p1;
|
||||||
|
|
||||||
|
if (cfp->nonblock) {
|
||||||
|
+ /* Since len == 0 is returned on zero length
|
||||||
|
+ * read or EOF errno needs to be reset before
|
||||||
|
+ * the read
|
||||||
|
+ */
|
||||||
|
+ errno = 0;
|
||||||
|
len = read(sock, buf, (size_t)len);
|
||||||
|
if (len < 0) {
|
||||||
|
- if (errno == EAGAIN)
|
||||||
|
+ if (errno == EAGAIN || errno == EWOULDBLOCK)
|
||||||
|
len = 0;
|
||||||
|
else
|
||||||
|
goto fatal_err;
|
||||||
|
diff -up libtirpc-1.1.4/src/xdr_rec.c.orig libtirpc-1.1.4/src/xdr_rec.c
|
||||||
|
--- libtirpc-1.1.4/src/xdr_rec.c.orig 2018-08-27 10:06:49.000000000 -0400
|
||||||
|
+++ libtirpc-1.1.4/src/xdr_rec.c 2019-07-24 11:51:32.191485387 -0400
|
||||||
|
@@ -61,6 +61,7 @@
|
||||||
|
#include <rpc/svc.h>
|
||||||
|
#include <rpc/clnt.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
+#include <errno.h>
|
||||||
|
#include "rpc_com.h"
|
||||||
|
static bool_t xdrrec_getlong(XDR *, long *);
|
||||||
|
static bool_t xdrrec_putlong(XDR *, const long *);
|
||||||
|
@@ -537,7 +538,13 @@ __xdrrec_getrec(xdrs, statp, expectdata)
|
||||||
|
n = rstrm->readit(rstrm->tcp_handle, rstrm->in_hdrp,
|
||||||
|
(int)sizeof (rstrm->in_header) - rstrm->in_hdrlen);
|
||||||
|
if (n == 0) {
|
||||||
|
- *statp = expectdata ? XPRT_DIED : XPRT_IDLE;
|
||||||
|
+ /* EAGAIN or EWOULDBLOCK means a zero length
|
||||||
|
+ * read not an EOF.
|
||||||
|
+ */
|
||||||
|
+ if (errno == EAGAIN || errno == EWOULDBLOCK)
|
||||||
|
+ *statp = XPRT_IDLE;
|
||||||
|
+ else
|
||||||
|
+ *statp = expectdata ? XPRT_DIED : XPRT_IDLE;
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
if (n < 0) {
|
||||||
|
@@ -564,6 +571,7 @@ __xdrrec_getrec(xdrs, statp, expectdata)
|
||||||
|
rstrm->in_header &= ~LAST_FRAG;
|
||||||
|
rstrm->last_frag = TRUE;
|
||||||
|
}
|
||||||
|
+ rstrm->in_haveheader = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
n = rstrm->readit(rstrm->tcp_handle,
|
||||||
|
@@ -576,7 +584,13 @@ __xdrrec_getrec(xdrs, statp, expectdata)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (n == 0) {
|
||||||
|
- *statp = expectdata ? XPRT_DIED : XPRT_IDLE;
|
||||||
|
+ /* EAGAIN or EWOULDBLOCK means a zero length
|
||||||
|
+ * read not an EOF.
|
||||||
|
+ */
|
||||||
|
+ if (errno == EAGAIN || errno == EWOULDBLOCK)
|
||||||
|
+ *statp = XPRT_IDLE;
|
||||||
|
+ else
|
||||||
|
+ *statp = expectdata ? XPRT_DIED : XPRT_IDLE;
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
Name: libtirpc
|
Name: libtirpc
|
||||||
Version: 1.1.4
|
Version: 1.1.4
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Summary: Transport Independent RPC Library
|
Summary: Transport Independent RPC Library
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
License: SISSL and BSD
|
License: SISSL and BSD
|
||||||
URL: http://nfsv4.bullopensource.org/
|
URL: http://git.linux-nfs.org/?p=steved/libtirpc.git;a=summary
|
||||||
Source0: http://downloads.sourceforge.net/libtirpc/libtirpc-%{version}.tar.bz2
|
Source0: http://downloads.sourceforge.net/libtirpc/libtirpc-%{version}.tar.bz2
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -17,6 +17,12 @@ Patch001: libtirpc-1.1.4-covscan.patch
|
|||||||
# bz 1631614
|
# bz 1631614
|
||||||
Patch002: libtirpc-1.1.4-dup_ncp-bad-free.patch
|
Patch002: libtirpc-1.1.4-dup_ncp-bad-free.patch
|
||||||
|
|
||||||
|
#
|
||||||
|
# RHEL 8.1
|
||||||
|
#
|
||||||
|
# bz 1641875
|
||||||
|
Patch003: libtirpc-1.1.4-fix-EOF-non-block.patch
|
||||||
|
|
||||||
BuildRequires: automake, autoconf, libtool, pkgconfig
|
BuildRequires: automake, autoconf, libtool, pkgconfig
|
||||||
BuildRequires: krb5-devel
|
BuildRequires: krb5-devel
|
||||||
|
|
||||||
@ -136,6 +142,11 @@ mv %{buildroot}%{_mandir}/man3 %{buildroot}%{_mandir}/man3t
|
|||||||
%{_mandir}/*/*
|
%{_mandir}/*/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 24 2019 Steve Dickson <steved@redhat.com> 1.1.4-4
|
||||||
|
- Enable gating using reverse dependency testing of nfs-utils (bz 1681965)
|
||||||
|
- Updated the URL (bz 1638671)
|
||||||
|
- Fix EOF detection on non-blocking socket (bz 1641875)
|
||||||
|
|
||||||
* Sat Oct 6 2018 Steve Dickson <steved@redhat.com> 1.1.4-3
|
* Sat Oct 6 2018 Steve Dickson <steved@redhat.com> 1.1.4-3
|
||||||
- Fixed bad free in dup_ncp() (bz 1631614)
|
- Fixed bad free in dup_ncp() (bz 1631614)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user