Hello community,

here is the log from the commit of package libtirpc for openSUSE:Factory 
checked in at 2020-01-18 12:13:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libtirpc (Old)
 and      /work/SRC/openSUSE:Factory/.libtirpc.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libtirpc"

Sat Jan 18 12:13:28 2020 rev:52 rq:762081 version:1.2.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/libtirpc/libtirpc.changes        2019-12-02 
11:26:45.738684806 +0100
+++ /work/SRC/openSUSE:Factory/.libtirpc.new.26092/libtirpc.changes     
2020-01-18 12:13:31.390990638 +0100
@@ -1,0 +2,20 @@
+Fri Jan  3 15:45:16 UTC 2020 - Petr Vorel <[email protected]>
+
+- Update to libtirpc 1.2.5
+  - A number resource leaks and other issues were fix which were identified
+  by a Coverity Scan.
+  - The AUTH_DES authentication has been deprecated. If any of those routines
+    are called, they will fail immediately.
+  - numerous bug fixes
+
+- Package changes:
+  - Build without AUTH_DES authentication
+  - Add patch from next release 0001-Add-authdes_seccreate-stub.patch
+    (a86b4ff Add authdes_seccreate() stub)
+  - Drop rc patches (libtirpc-1-1-5-rc1.patch, libtirpc-1-1-5-rc2.patch)
+  - Drop patches all patches backported from this release
+       (0001-Makefile.am-Use-LIBADD-instead-of-LDFLAGS-to-link-ag.patch,
+       0002-man-rpc_secure.3t-Fix-typo-in-manpage.patch,
+       0003-xdr-add-a-defensive-mask-in-xdr_int64_t-and-xdr_u_in.patch)
+
+-------------------------------------------------------------------

Old:
----
  0001-Makefile.am-Use-LIBADD-instead-of-LDFLAGS-to-link-ag.patch
  0002-man-rpc_secure.3t-Fix-typo-in-manpage.patch
  0003-xdr-add-a-defensive-mask-in-xdr_int64_t-and-xdr_u_in.patch
  libtirpc-1-1-5-rc1.patch
  libtirpc-1-1-5-rc2.patch
  libtirpc-1.1.4.tar.bz2

New:
----
  0001-Add-authdes_seccreate-stub.patch
  libtirpc-1.2.5.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libtirpc.spec ++++++
--- /var/tmp/diff_new_pack.7TeEwB/_old  2020-01-18 12:13:32.026990979 +0100
+++ /var/tmp/diff_new_pack.7TeEwB/_new  2020-01-18 12:13:32.026990979 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package libtirpc
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 Name:           libtirpc
 # src/crypt_client.c and tirpc/rpcsvc/crypt.x have the BSD advertising clause
-Version:        1.1.4
+Version:        1.2.5
 Release:        0
 Summary:        Transport Independent RPC Library
 License:        BSD-3-Clause
@@ -31,14 +31,10 @@
 BuildRequires:  autoconf
 BuildRequires:  libtool
 BuildRequires:  pkg-config
-Url:            https://sourceforge.net/projects/libtirpc/
+URL:            https://sourceforge.net/projects/libtirpc/
 Source:         %{name}-%{version}.tar.bz2
 Source1:        baselibs.conf
-Patch0:         libtirpc-1-1-5-rc1.patch
-Patch1:         libtirpc-1-1-5-rc2.patch
-Patch2:         0001-Makefile.am-Use-LIBADD-instead-of-LDFLAGS-to-link-ag.patch
-Patch3:         0002-man-rpc_secure.3t-Fix-typo-in-manpage.patch
-Patch4:         0003-xdr-add-a-defensive-mask-in-xdr_int64_t-and-xdr_u_in.patch
+Patch0:         0001-Add-authdes_seccreate-stub.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %define debug_package_requires libtirpc3 = %{version}-%{release}
 
@@ -84,10 +80,6 @@
 %prep
 %setup -q -n %name-%version
 %patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
 
 %build
 sed -i -e 's|@includedir@/tirpc|@includedir@|g' libtirpc.pc.in

++++++ 0001-Add-authdes_seccreate-stub.patch ++++++
>From a86b4ff0c4b4e53df436f83c21a5fbf01568a301 Mon Sep 17 00:00:00 2001
From: Petr Vorel <[email protected]>
Date: Fri, 3 Jan 2020 09:55:28 -0500
Subject: [PATCH 1/2] Add authdes_seccreate() stub

bf8f0b82d added back authdes_create() and authdes_pk_create() interfaces
also when authdes compiled out. Add also authdes_seccreate().

Found by LTP rpc-tirpc test, which fails to link:

/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: 
/tmp/ccFanCMm.o: in function `main':
    
testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/tirpc/tirpc_auth_authdes_seccreate/tirpc_authdes_seccreate.c:55:
 undefined reference to `authdes_seccreate'

Fixes: bf8f0b82d ("Add back the authdes interfaces")

Signed-off-by: Petr Vorel <[email protected]>
Signed-off-by: Steve Dickson <[email protected]>
---
 src/rpc_soc.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/rpc_soc.c b/src/rpc_soc.c
index ac7d312..fde121d 100644
--- a/src/rpc_soc.c
+++ b/src/rpc_soc.c
@@ -613,6 +613,13 @@ authdes_pk_create(servername, pkey, window, syncaddr, ckey)
        des_block *ckey;                /* optional conversation key to use */
 { return (NULL); }
 
+AUTH *
+authdes_seccreate(const char *servername, const u_int win,
+       const char *timehost, const des_block *ckey)
+{
+       return (NULL);
+}
+
 #endif
 
 
-- 
2.24.0

++++++ libtirpc-1.1.4.tar.bz2 -> libtirpc-1.2.5.tar.bz2 ++++++
++++ 6830 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/compile new/libtirpc-1.2.5/compile
--- old/libtirpc-1.1.4/compile  2018-08-27 16:10:10.000000000 +0200
+++ new/libtirpc-1.2.5/compile  2019-12-19 19:57:31.000000000 +0100
@@ -1,9 +1,9 @@
-#!/bin/sh
+#! /bin/sh
 # Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1999-2017 Free Software Foundation, Inc.
+# Copyright (C) 1999-2018 Free Software Foundation, Inc.
 # Written by Tom Tromey <[email protected]>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -340,7 +340,7 @@
 # Local Variables:
 # mode: shell-script
 # sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
 # time-stamp-time-zone: "UTC0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/config.h.in new/libtirpc-1.2.5/config.h.in
--- old/libtirpc-1.1.4/config.h.in      2018-08-27 16:10:10.000000000 +0200
+++ new/libtirpc-1.2.5/config.h.in      2019-12-19 19:57:30.000000000 +0100
@@ -1,5 +1,8 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
+/* Define if AUTH_DES is support */
+#undef AUTHDES_SUPPORT
+
 /* Define to 1 if you have the <arpa/inet.h> header file. */
 #undef HAVE_ARPA_INET_H
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/configure.ac new/libtirpc-1.2.5/configure.ac
--- old/libtirpc-1.1.4/configure.ac     2018-08-27 16:06:49.000000000 +0200
+++ new/libtirpc-1.2.5/configure.ac     2019-12-19 19:55:48.000000000 +0100
@@ -1,4 +1,4 @@
-AC_INIT(libtirpc, 1.1.4)
+AC_INIT(libtirpc, 1.2.5)
 AM_INIT_AUTOMAKE([silent-rules])
 AM_SILENT_RULES([yes])
 AC_CONFIG_SRCDIR([src/auth_des.c])
@@ -53,6 +53,14 @@
        AC_SUBST([GSSAPI_LIBS])
 fi
 
+AC_ARG_ENABLE(authdes,
+       [AC_HELP_STRING([--enable-authdes], [Enable AUTH_DES support 
@<:@default=no@:>@])],
+      [],[enable_authdes=no])
+AM_CONDITIONAL(AUTHDES, test "x$enable_authdes" = xyes)
+if test "x$enable_authdes" != xno; then
+       AC_DEFINE(AUTHDES_SUPPORT, 1, [Define if AUTH_DES is support])
+fi
+
 AC_ARG_ENABLE(ipv6,
        [AC_HELP_STRING([--disable-ipv6], [Disable IPv6 support 
@<:@default=no@:>@])],
        [],[enable_ipv6=yes])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/man/rpc_secure.3t new/libtirpc-1.2.5/man/rpc_secure.3t
--- old/libtirpc-1.1.4/man/rpc_secure.3t        2018-08-27 16:06:49.000000000 
+0200
+++ new/libtirpc-1.2.5/man/rpc_secure.3t        2019-12-19 19:55:48.000000000 
+0100
@@ -19,7 +19,7 @@
 .Ft AUTH *
 .Fo authdes_pk_create
 .Fa "char *name"
-.FA "netobj *publickey"
+.Fa "netobj *publickey"
 .Fa "unsigned window"
 .Fa "struct sockaddr *addr"
 .Fa "des_block *ckey"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/missing new/libtirpc-1.2.5/missing
--- old/libtirpc-1.1.4/missing  2018-08-27 16:10:10.000000000 +0200
+++ new/libtirpc-1.2.5/missing  2019-12-19 19:57:31.000000000 +0100
@@ -1,9 +1,9 @@
-#!/bin/sh
+#! /bin/sh
 # Common wrapper for a few potentially missing GNU programs.
 
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1996-2017 Free Software Foundation, Inc.
+# Copyright (C) 1996-2018 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <[email protected]>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@
 # GNU General Public License for more details.
 
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -101,9 +101,9 @@
   exit $st
 fi
 
-perl_URL=http://www.perl.org/
-flex_URL=http://flex.sourceforge.net/
-gnu_software_URL=http://www.gnu.org/software
+perl_URL=https://www.perl.org/
+flex_URL=https://github.com/westes/flex
+gnu_software_URL=https://www.gnu.org/software
 
 program_details ()
 {
@@ -207,7 +207,7 @@
 exit $st
 
 # Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
 # time-stamp-time-zone: "UTC0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/src/Makefile.am new/libtirpc-1.2.5/src/Makefile.am
--- old/libtirpc-1.1.4/src/Makefile.am  2018-08-27 16:06:49.000000000 +0200
+++ new/libtirpc-1.2.5/src/Makefile.am  2019-12-19 19:55:48.000000000 +0100
@@ -23,9 +23,12 @@
         pmap_prot.c pmap_prot2.c pmap_rmt.c rpc_prot.c rpc_commondata.c \
         rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \
         rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c 
svc_auth_none.c \
-       svc_auth_des.c \
         svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \
-        auth_time.c auth_des.c authdes_prot.c debug.c des_crypt.c des_impl.c
+        auth_time.c debug.c 
+
+if AUTHDES
+libtirpc_la_SOURCES += auth_des.c  authdes_prot.c  des_crypt.c  des_impl.c  
des_soft.c  svc_auth_des.c
+endif
 
 ## XDR
 libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c 
xdr_reference.c xdr_stdio.c xdr_sizeof.c
@@ -38,7 +41,7 @@
 if GSS
     libtirpc_la_SOURCES += auth_gss.c authgss_prot.c svc_auth_gss.c \
                           rpc_gss_utils.c
-    libtirpc_la_LDFLAGS += $(GSSAPI_LIBS)
+    libtirpc_la_LIBADD = $(GSSAPI_LIBS)
     libtirpc_la_CFLAGS = -DHAVE_RPCSEC_GSS $(GSSAPI_CFLAGS)
 endif
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/src/auth_des.c new/libtirpc-1.2.5/src/auth_des.c
--- old/libtirpc-1.1.4/src/auth_des.c   2018-08-27 16:06:49.000000000 +0200
+++ new/libtirpc-1.2.5/src/auth_des.c   2019-12-19 19:55:48.000000000 +0100
@@ -396,7 +396,7 @@
        /*
         * validate
         */
-       if (bcmp((char *)&ad->ad_timestamp, (char *)&verf.adv_timestamp,
+       if (memcmp((char *)&ad->ad_timestamp, (char *)&verf.adv_timestamp,
                 sizeof(struct timeval)) != 0) {
                LIBTIRPC_DEBUG(1, ("authdes_validate: verifier mismatch"));
                return (FALSE);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/src/auth_gss.c new/libtirpc-1.2.5/src/auth_gss.c
--- old/libtirpc-1.1.4/src/auth_gss.c   2018-08-27 16:06:49.000000000 +0200
+++ new/libtirpc-1.2.5/src/auth_gss.c   2019-12-19 19:55:48.000000000 +0100
@@ -207,6 +207,7 @@
                        rpc_createerr.cf_stat = RPC_SYSTEMERROR;
                        rpc_createerr.cf_error.re_errno = ENOMEM;
                        free(auth);
+                       free(gd);
                        return (NULL);
                }
        }
@@ -476,7 +477,7 @@
        for (;;) {
                /* print the token we just received */
                if (recv_tokenp != GSS_C_NO_BUFFER) {
-                       gss_log_debug("The token we just received (length %d):",
+                       gss_log_debug("The token we just received (length 
%lu):",
                                  recv_tokenp->length);
                        gss_log_hexdump(recv_tokenp->value, 
recv_tokenp->length, 0);
                }
@@ -509,7 +510,7 @@
                        memset(&gr, 0, sizeof(gr));
 
                        /* print the token we are about to send */
-                       gss_log_debug("The token being sent (length %d):",
+                       gss_log_debug("The token being sent (length %lu):",
                                  send_token.length);
                        gss_log_hexdump(send_token.value, send_token.length, 0);
 
@@ -592,7 +593,7 @@
                        if (rpc_gss_oid_to_mech(actual_mech_type, &mechanism)) {
                                strncpy(options_ret->actual_mechanism,
                                        mechanism,
-                                       sizeof(options_ret->actual_mechanism));
+                                       
(sizeof(options_ret->actual_mechanism)-1));
                        }
 
                        gd->established = TRUE;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/src/auth_time.c new/libtirpc-1.2.5/src/auth_time.c
--- old/libtirpc-1.1.4/src/auth_time.c  2018-08-27 16:06:49.000000000 +0200
+++ new/libtirpc-1.2.5/src/auth_time.c  2019-12-19 19:55:48.000000000 +0100
@@ -104,7 +104,7 @@
        p_bytes[1] = (unsigned char)a[5] & 0x000000FF;
 
        sin->sin_family = AF_INET; /* always */
-       bcopy((char *)&p_bytes, (char *)&sin->sin_port, 2);
+       memcpy((char *)&sin->sin_port, (char *)&p_bytes, 2);
 
        return (0);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/src/authgss_prot.c new/libtirpc-1.2.5/src/authgss_prot.c
--- old/libtirpc-1.1.4/src/authgss_prot.c       2018-08-27 16:06:49.000000000 
+0200
+++ new/libtirpc-1.2.5/src/authgss_prot.c       2019-12-19 19:55:48.000000000 
+0100
@@ -68,7 +68,7 @@
        if (xdr_stat && xdrs->x_op == XDR_DECODE)
                buf->length = tmplen;
 
-       gss_log_debug("xdr_rpc_gss_buf: %s %s (%p:%d)",
+       gss_log_debug("xdr_rpc_gss_buf: %s %s (%p:%lu)",
                      (xdrs->x_op == XDR_ENCODE) ? "encode" : "decode",
                      (xdr_stat == TRUE) ? "success" : "failure",
                      buf->value, buf->length);
@@ -88,7 +88,7 @@
                    xdr_rpc_gss_buf(xdrs, &p->gc_ctx, MAX_AUTH_BYTES));
 
        gss_log_debug("xdr_rpc_gss_cred: %s %s "
-                     "(v %d, proc %d, seq %d, svc %d, ctx %p:%d)",
+                     "(v %d, proc %d, seq %d, svc %d, ctx %p:%lu)",
                      (xdrs->x_op == XDR_ENCODE) ? "encode" : "decode",
                      (xdr_stat == TRUE) ? "success" : "failure",
                      p->gc_v, p->gc_proc, p->gc_seq, p->gc_svc,
@@ -105,7 +105,7 @@
 
        xdr_stat = xdr_rpc_gss_buf(xdrs, p, maxlen);
 
-       gss_log_debug("xdr_rpc_gss_init_args: %s %s (token %p:%d)",
+       gss_log_debug("xdr_rpc_gss_init_args: %s %s (token %p:%lu)",
                      (xdrs->x_op == XDR_ENCODE) ? "encode" : "decode",
                      (xdr_stat == TRUE) ? "success" : "failure",
                      p->value, p->length);
@@ -128,7 +128,7 @@
                    xdr_rpc_gss_buf(xdrs, &p->gr_token, tok_maxlen));
 
        gss_log_debug("xdr_rpc_gss_init_res %s %s "
-                     "(ctx %p:%d, maj %d, min %d, win %d, token %p:%d)",
+                     "(ctx %p:%lu, maj %d, min %d, win %d, token %p:%lu)",
                      (xdrs->x_op == XDR_ENCODE) ? "encode" : "decode",
                      (xdr_stat == TRUE) ? "success" : "failure",
                      p->gr_ctx.value, p->gr_ctx.length,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/src/clnt_bcast.c new/libtirpc-1.2.5/src/clnt_bcast.c
--- old/libtirpc-1.1.4/src/clnt_bcast.c 2018-08-27 16:06:49.000000000 +0200
+++ new/libtirpc-1.2.5/src/clnt_bcast.c 2019-12-19 19:55:48.000000000 +0100
@@ -330,6 +330,7 @@
        if (nettype == NULL)
                nettype = "datagram_n";
        if ((handle = __rpc_setconf(nettype)) == NULL) {
+               AUTH_DESTROY(sys_auth);
                return (RPC_UNKNOWNPROTO);
        }
        while ((nconf = __rpc_getconf(handle)) != NULL) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/src/clnt_vc.c new/libtirpc-1.2.5/src/clnt_vc.c
--- old/libtirpc-1.1.4/src/clnt_vc.c    2018-08-27 16:06:49.000000000 +0200
+++ new/libtirpc-1.2.5/src/clnt_vc.c    2019-12-19 19:55:48.000000000 +0100
@@ -334,8 +334,11 @@
                                mem_free(ct->ct_addr.buf, ct->ct_addr.len);
                        mem_free(ct, sizeof (struct ct_data));
                }
-               if (cl)
-                       mem_free(cl, sizeof (CLIENT));
+               mem_free(cl, sizeof (CLIENT));
+       } else if (ct) {
+               if (ct->ct_addr.len)
+                       mem_free(ct->ct_addr.buf, ct->ct_addr.len);
+               mem_free(ct, sizeof (struct ct_data));
        }
        return ((CLIENT *)NULL);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/src/crypt_client.c new/libtirpc-1.2.5/src/crypt_client.c
--- old/libtirpc-1.1.4/src/crypt_client.c       2018-08-27 16:06:49.000000000 
+0200
+++ new/libtirpc-1.2.5/src/crypt_client.c       2019-12-19 19:55:48.000000000 
+0100
@@ -75,8 +75,8 @@
        des_crypt_1_arg.desbuf.desbuf_val = buf;
        des_crypt_1_arg.des_dir = dparms->des_dir;
        des_crypt_1_arg.des_mode = dparms->des_mode;
-       bcopy(dparms->des_ivec, des_crypt_1_arg.des_ivec, 8);
-       bcopy(dparms->des_key, des_crypt_1_arg.des_key, 8);
+       memcpy(des_crypt_1_arg.des_ivec, dparms->des_ivec, 8);
+       memcpy(des_crypt_1_arg.des_key, dparms->des_key, 8);
 
        result_1 = des_crypt_1(&des_crypt_1_arg, clnt);
        if (result_1 == (desresp *) NULL) {
@@ -88,8 +88,8 @@
 
        if (result_1->stat == DESERR_NONE ||
            result_1->stat == DESERR_NOHWDEVICE) {
-               bcopy(result_1->desbuf.desbuf_val, buf, len);
-               bcopy(result_1->des_ivec, dparms->des_ivec, 8);
+               memcpy(buf, result_1->desbuf.desbuf_val, len);
+               memcpy(dparms->des_ivec, result_1->des_ivec, 8);
        }
 
        clnt_freeres(clnt, (xdrproc_t)xdr_desresp, result_1);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/src/getnetconfig.c new/libtirpc-1.2.5/src/getnetconfig.c
--- old/libtirpc-1.1.4/src/getnetconfig.c       2018-08-27 16:06:49.000000000 
+0200
+++ new/libtirpc-1.2.5/src/getnetconfig.c       2019-12-19 19:55:48.000000000 
+0100
@@ -681,6 +681,7 @@
 {
     struct netconfig   *p;
     char       *tmp;
+    char       *t;
     u_int      i;
 
     if ((tmp=malloc(MAXNETCONFIGLINE)) == NULL)
@@ -700,20 +701,21 @@
      */
     *p = *ncp;
     p->nc_netid = (char *)strcpy(tmp,ncp->nc_netid);
-    tmp = strchr(tmp, 0) + 1;
-    p->nc_protofmly = (char *)strcpy(tmp,ncp->nc_protofmly);
-    tmp = strchr(tmp, 0) + 1;
-    p->nc_proto = (char *)strcpy(tmp,ncp->nc_proto);
-    tmp = strchr(tmp, 0) + 1;
-    p->nc_device = (char *)strcpy(tmp,ncp->nc_device);
+    t = strchr(tmp, 0) + 1;
+    p->nc_protofmly = (char *)strcpy(t,ncp->nc_protofmly);
+    t = strchr(t, 0) + 1;
+    p->nc_proto = (char *)strcpy(t,ncp->nc_proto);
+    t = strchr(t, 0) + 1;
+    p->nc_device = (char *)strcpy(t,ncp->nc_device);
     p->nc_lookups = (char **)malloc((size_t)(p->nc_nlookups+1) * sizeof(char 
*));
     if (p->nc_lookups == NULL) {
-       free(p->nc_netid);
+       free(p);
+       free(tmp);
        return(NULL);
     }
     for (i=0; i < p->nc_nlookups; i++) {
-       tmp = strchr(tmp, 0) + 1;
-       p->nc_lookups[i] = (char *)strcpy(tmp,ncp->nc_lookups[i]);
+       t = strchr(t, 0) + 1;
+       p->nc_lookups[i] = (char *)strcpy(t,ncp->nc_lookups[i]);
     }
     return(p);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/src/getnetpath.c new/libtirpc-1.2.5/src/getnetpath.c
--- old/libtirpc-1.1.4/src/getnetpath.c 2018-08-27 16:06:49.000000000 +0200
+++ new/libtirpc-1.2.5/src/getnetpath.c 2019-12-19 19:55:48.000000000 +0100
@@ -88,6 +88,7 @@
     }
     if ((np_sessionp->nc_handlep = setnetconfig()) == NULL) {
        syslog (LOG_ERR, "rpc: failed to open " NETCONFIG);
+       free(np_sessionp);
        return (NULL);
     }
     np_sessionp->valid = NP_VALID;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/src/getpublickey.c new/libtirpc-1.2.5/src/getpublickey.c
--- old/libtirpc-1.1.4/src/getpublickey.c       2018-08-27 16:06:49.000000000 
+0200
+++ new/libtirpc-1.2.5/src/getpublickey.c       2019-12-19 19:55:48.000000000 
+0100
@@ -74,7 +74,7 @@
                return (0);
        }
        *p = '\0';
-       (void) strncpy(publickey, lookup, HEXKEYBYTES);
+       memcpy(publickey, lookup, HEXKEYBYTES);
        publickey[HEXKEYBYTES] = '\0';
        return (1);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/src/getrpcent.c new/libtirpc-1.2.5/src/getrpcent.c
--- old/libtirpc-1.1.4/src/getrpcent.c  2018-08-27 16:06:49.000000000 +0200
+++ new/libtirpc-1.2.5/src/getrpcent.c  2019-12-19 19:55:48.000000000 +0100
@@ -100,7 +100,7 @@
        return (d);
 }
 
-#if !HAVE_GETRPCBYNYMBER
+#if !HAVE_GETRPCBYNUMBER
 struct rpcent *
 getrpcbynumber(number)
        int number;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/src/rpc_generic.c new/libtirpc-1.2.5/src/rpc_generic.c
--- old/libtirpc-1.1.4/src/rpc_generic.c        2018-08-27 16:06:49.000000000 
+0200
+++ new/libtirpc-1.2.5/src/rpc_generic.c        2019-12-19 19:55:48.000000000 
+0100
@@ -319,6 +319,7 @@
                handle->nflag = FALSE;
                break;
        default:
+               free(handle);
                return (NULL);
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/src/rpc_soc.c new/libtirpc-1.2.5/src/rpc_soc.c
--- old/libtirpc-1.1.4/src/rpc_soc.c    2018-08-27 16:06:49.000000000 +0200
+++ new/libtirpc-1.2.5/src/rpc_soc.c    2019-12-19 19:55:48.000000000 +0100
@@ -516,6 +516,7 @@
            (resultproc_t) rpc_wrap_bcast, "udp");
 }
 
+#ifdef AUTHDES_SUPPORT
 /*
  * Create the client des authentication object. Obsoleted by
  * authdes_seccreate().
@@ -594,6 +595,25 @@
 fallback:
        return authdes_pk_seccreate(servername, pkey, window, NULL, ckey, NULL);
 }
+#else
+AUTH *
+authdes_create(servername, window, syncaddr, ckey)
+       char *servername;               /* network name of server */
+       u_int window;                   /* time to live */
+       struct sockaddr *syncaddr;      /* optional hostaddr to sync with */
+       des_block *ckey;                /* optional conversation key to use */
+{ return (NULL); }
+
+AUTH *
+authdes_pk_create(servername, pkey, window, syncaddr, ckey)
+       char *servername;               /* network name of server */
+       netobj *pkey;                   /* public key */
+       u_int window;                   /* time to live */
+       struct sockaddr *syncaddr;      /* optional hostaddr to sync with */
+       des_block *ckey;                /* optional conversation key to use */
+{ return (NULL); }
+
+#endif
 
 
 /*
@@ -663,15 +683,17 @@
                    strcmp(nconf->nc_protofmly, NC_LOOPBACK) == 0)
                        break;
        }
-       if (nconf == NULL)
+       if (nconf == NULL) {
+               endnetconfig(localhandle);
                return(xprt);
+       }
 
        if ((sock = __rpc_nconf2fd(nconf)) < 0)
                goto done;
 
        memset(&sun, 0, sizeof sun);
        sun.sun_family = AF_LOCAL;
-       strncpy(sun.sun_path, path, sizeof(sun.sun_path));
+       strncpy(sun.sun_path, path, (sizeof(sun.sun_path)-1));
        addrlen = sizeof(struct sockaddr_un);
        sa = (struct sockaddr *)&sun;
 
@@ -692,6 +714,8 @@
        }
 
        xprt = (SVCXPRT *)svc_tli_create(sock, nconf, &taddr, sendsize, 
recvsize);
+       if (xprt == NULL)
+               close(sock);
 
 done:
        endnetconfig(localhandle);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/src/rpcb_clnt.c new/libtirpc-1.2.5/src/rpcb_clnt.c
--- old/libtirpc-1.1.4/src/rpcb_clnt.c  2018-08-27 16:06:49.000000000 +0200
+++ new/libtirpc-1.2.5/src/rpcb_clnt.c  2019-12-19 19:55:48.000000000 +0100
@@ -547,6 +547,7 @@
                if (tmpnconf == NULL) {
                        rpc_createerr.cf_stat = RPC_UNKNOWNPROTO;
                        mutex_unlock(&loopnconf_lock);
+                       endnetconfig(nc_handle);
                        return (NULL);
                }
                loopnconf = getnetconfigent(tmpnconf->nc_netid);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/src/rtime.c new/libtirpc-1.2.5/src/rtime.c
--- old/libtirpc-1.1.4/src/rtime.c      2018-08-27 16:06:49.000000000 +0200
+++ new/libtirpc-1.2.5/src/rtime.c      2019-12-19 19:55:48.000000000 +0100
@@ -90,6 +90,7 @@
 
        /* TCP and UDP port are the same in this case */
        if ((serv = getservbyname("time", "tcp")) == NULL) {
+               do_close(s);
                return(-1);
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/src/svc_auth.c new/libtirpc-1.2.5/src/svc_auth.c
--- old/libtirpc-1.1.4/src/svc_auth.c   2018-08-27 16:06:49.000000000 +0200
+++ new/libtirpc-1.2.5/src/svc_auth.c   2019-12-19 19:55:48.000000000 +0100
@@ -115,8 +115,12 @@
                dummy = _svcauth_short(rqst, msg);
                return (dummy);
        case AUTH_DES:
+#ifdef AUTHDES_SUPPORT
                dummy = _svcauth_des(rqst, msg);
                return (dummy);
+#else
+               return (AUTH_FAILED);
+#endif
 #ifdef HAVE_RPCSEC_GSS
        case RPCSEC_GSS:
                dummy = _svcauth_gss(rqst, msg, no_dispatch);
@@ -176,6 +180,9 @@
            case AUTH_SYS:
            case AUTH_SHORT:
            case AUTH_DES:
+#ifndef AUTHDES_SUPPORT
+               return(-1);
+#endif
 #ifdef HAVE_RPCSEC_GSS
            case RPCSEC_GSS:
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/src/svc_auth_des.c new/libtirpc-1.2.5/src/svc_auth_des.c
--- old/libtirpc-1.1.4/src/svc_auth_des.c       2018-08-27 16:06:49.000000000 
+0200
+++ new/libtirpc-1.2.5/src/svc_auth_des.c       2019-12-19 19:55:48.000000000 
+0100
@@ -145,7 +145,7 @@
                        return (AUTH_BADCRED);
                }
                cred->adc_fullname.name = area->area_netname;
-               bcopy((char *)ixdr, cred->adc_fullname.name, 
+               memcpy(cred->adc_fullname.name, (char *)ixdr,
                        (u_int)namelen);
                cred->adc_fullname.name[namelen] = 0;
                ixdr += (RNDUP(namelen) / BYTES_PER_XDR_UNIT);
@@ -419,7 +419,7 @@
                if (cp->key.key.high == hi && 
                    cp->key.key.low == key->key.low &&
                    cp->rname != NULL &&
-                   bcmp(cp->rname, name, strlen(name) + 1) == 0) {
+                   memcmp(cp->rname, name, strlen(name) + 1) == 0) {
                        if (BEFORE(timestamp, &cp->laststamp)) {
                                svcauthdes_stats.ncachereplays++;
                                return (-1); /* replay */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/src/svc_generic.c new/libtirpc-1.2.5/src/svc_generic.c
--- old/libtirpc-1.1.4/src/svc_generic.c        2018-08-27 16:06:49.000000000 
+0200
+++ new/libtirpc-1.2.5/src/svc_generic.c        2019-12-19 19:55:48.000000000 
+0100
@@ -113,6 +113,7 @@
                                if (l == NULL) {
                                        warnx("svc_create: no memory");
                                        mutex_unlock(&xprtlist_lock);
+                                       __rpc_endconf(handle);
                                        return (0);
                                }
                                l->xprt = xprt;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/src/svc_simple.c new/libtirpc-1.2.5/src/svc_simple.c
--- old/libtirpc-1.1.4/src/svc_simple.c 2018-08-27 16:06:49.000000000 +0200
+++ new/libtirpc-1.2.5/src/svc_simple.c 2019-12-19 19:55:48.000000000 +0100
@@ -157,6 +157,7 @@
                                ((netid = strdup(nconf->nc_netid)) == NULL)) {
                                warnx(rpc_reg_err, rpc_reg_msg, __no_mem_str);
                                SVC_DESTROY(svcxprt);
+                               free(xdrbuf);
                                break;
                        }
                        madenow = TRUE;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/src/svc_vc.c new/libtirpc-1.2.5/src/svc_vc.c
--- old/libtirpc-1.1.4/src/svc_vc.c     2018-08-27 16:06:49.000000000 +0200
+++ new/libtirpc-1.2.5/src/svc_vc.c     2019-12-19 19:55:48.000000000 +0100
@@ -502,9 +502,14 @@
        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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/src/xdr.c new/libtirpc-1.2.5/src/xdr.c
--- old/libtirpc-1.1.4/src/xdr.c        2018-08-27 16:06:49.000000000 +0200
+++ new/libtirpc-1.2.5/src/xdr.c        2019-12-19 19:55:48.000000000 +0100
@@ -877,7 +877,8 @@
                if (XDR_GETLONG(xdrs, (long *)&ul[1]) == FALSE)
                        return (FALSE);
                *llp = (int64_t)
-                   (((u_int64_t)ul[0] << 32) | ((u_int64_t)ul[1]));
+                   (((u_int64_t)ul[0] << 32) |
+                    ((u_int64_t)(ul[1]) & 0xffffffff));
                return (TRUE);
        case XDR_FREE:
                return (TRUE);
@@ -910,7 +911,8 @@
                if (XDR_GETLONG(xdrs, (long *)&ul[1]) == FALSE)
                        return (FALSE);
                *ullp = (u_int64_t)
-                   (((u_int64_t)ul[0] << 32) | ((u_int64_t)ul[1]));
+                   (((u_int64_t)ul[0] << 32) |
+                    ((u_int64_t)(ul[1]) & 0xffffffff));
                return (TRUE);
        case XDR_FREE:
                return (TRUE);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/src/xdr_rec.c new/libtirpc-1.2.5/src/xdr_rec.c
--- old/libtirpc-1.1.4/src/xdr_rec.c    2018-08-27 16:06:49.000000000 +0200
+++ new/libtirpc-1.2.5/src/xdr_rec.c    2019-12-19 19:55:48.000000000 +0100
@@ -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 @@
                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 @@
                        rstrm->in_header &= ~LAST_FRAG;
                        rstrm->last_frag = TRUE;
                }
+               rstrm->in_haveheader = 1;
        }
 
        n =  rstrm->readit(rstrm->tcp_handle,
@@ -576,7 +584,13 @@
        }
 
        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;
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/tirpc/rpc/rpcent.h new/libtirpc-1.2.5/tirpc/rpc/rpcent.h
--- old/libtirpc-1.1.4/tirpc/rpc/rpcent.h       2018-08-27 16:06:49.000000000 
+0200
+++ new/libtirpc-1.2.5/tirpc/rpc/rpcent.h       2019-12-19 19:55:48.000000000 
+0100
@@ -48,8 +48,9 @@
 extern "C" {
 #endif
 
-/* These are defined in /usr/include/rpc/netdb.h */
-#if !defined(__GLIBC__) || defined(__UCLIBC__)
+/* These are defined in /usr/include/rpc/netdb.h, unless we are using
+   the C library without RPC support. */
+#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_RPC__) || !defined(__GLIBC__)
 struct rpcent {
        char    *r_name;        /* name of server for this rpc program */
        char    **r_aliases;    /* alias list */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libtirpc-1.1.4/tirpc/rpc/types.h new/libtirpc-1.2.5/tirpc/rpc/types.h
--- old/libtirpc-1.1.4/tirpc/rpc/types.h        2018-08-27 16:06:49.000000000 
+0200
+++ new/libtirpc-1.2.5/tirpc/rpc/types.h        2019-12-19 19:55:48.000000000 
+0100
@@ -66,7 +66,7 @@
 #define mem_free(ptr, bsize)   free(ptr)
 
 
-#if defined __APPLE_CC__ || defined __FreeBSD__
+#if defined __APPLE_CC__ || defined __FreeBSD__ || !defined (__GLIBC__)
 # define __u_char_defined
 # define __daddr_t_defined
 #endif


Reply via email to