From fe8ca5ba66a0299964d2fdfa43673cce325307ff Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Tue, 14 Nov 2017 11:39:16 -0500 Subject: [PATCH] Update to latest upstream RC release: libtirpc-1-0-3-rc1 Signed-off-by: Steve Dickson --- libtirpc-1.0.3-rc1.patch | 112 ++++++++++++++++++++++++++++++++++++++ libtirpc.spec | 10 ++-- libtirpc_gssglue.patch | 113 --------------------------------------- libtirpc_header.patch | 10 ---- 4 files changed, 119 insertions(+), 126 deletions(-) create mode 100644 libtirpc-1.0.3-rc1.patch delete mode 100644 libtirpc_gssglue.patch delete mode 100644 libtirpc_header.patch diff --git a/libtirpc-1.0.3-rc1.patch b/libtirpc-1.0.3-rc1.patch new file mode 100644 index 0000000..e474029 --- /dev/null +++ b/libtirpc-1.0.3-rc1.patch @@ -0,0 +1,112 @@ +diff --git a/src/auth_time.c b/src/auth_time.c +index 7f83ab4..69400bc 100644 +--- a/src/auth_time.c ++++ b/src/auth_time.c +@@ -317,7 +317,7 @@ __rpc_get_time_offset(td, srv, thost, uaddr, netid) + sprintf(ipuaddr, "%d.%d.%d.%d.0.111", a1, a2, a3, a4); + useua = &ipuaddr[0]; + +- bzero((char *)&sin, sizeof(sin)); ++ memset(&sin, 0, sizeof(sin)); + if (uaddr_to_sockaddr(useua, &sin)) { + msg("unable to translate uaddr to sockaddr."); + if (needfree) +diff --git a/src/des_impl.c b/src/des_impl.c +index 9dbccaf..15bec2a 100644 +--- a/src/des_impl.c ++++ b/src/des_impl.c +@@ -588,7 +588,7 @@ _des_crypt (char *buf, unsigned len, struct desparams *desp) + } + tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0; + tbuf[0] = tbuf[1] = 0; +- __bzero (schedule, sizeof (schedule)); ++ memset (schedule, 0, sizeof (schedule)); + + return (1); + } +diff --git a/src/libtirpc.map b/src/libtirpc.map +index f385de5..21d6065 100644 +--- a/src/libtirpc.map ++++ b/src/libtirpc.map +@@ -298,7 +298,7 @@ TIRPC_0.3.2 { + key_gendes; + key_get_conv; + key_setsecret; +- key_secret_is_set; ++ key_secretkey_is_set; + key_setnet; + netname2host; + netname2user; +diff --git a/src/svc_auth_des.c b/src/svc_auth_des.c +index 2e90146..19a7c60 100644 +--- a/src/svc_auth_des.c ++++ b/src/svc_auth_des.c +@@ -356,7 +356,7 @@ cache_init() + + authdes_cache = (struct cache_entry *) + mem_alloc(sizeof(struct cache_entry) * AUTHDES_CACHESZ); +- bzero((char *)authdes_cache, ++ memset(authdes_cache, 0, + sizeof(struct cache_entry) * AUTHDES_CACHESZ); + + authdes_lru = (short *)mem_alloc(sizeof(short) * AUTHDES_CACHESZ); +diff --git a/src/xdr_sizeof.c b/src/xdr_sizeof.c +index d23fbd1..79d6707 100644 +--- a/src/xdr_sizeof.c ++++ b/src/xdr_sizeof.c +@@ -39,6 +39,7 @@ + #include + #include + #include ++#include + #include "un-namespace.h" + + /* ARGSUSED */ +diff --git a/tirpc/rpc/pmap_clnt.h b/tirpc/rpc/pmap_clnt.h +index 6abd583..cf1ab61 100644 +--- a/tirpc/rpc/pmap_clnt.h ++++ b/tirpc/rpc/pmap_clnt.h +@@ -64,6 +64,10 @@ + #ifndef _RPC_PMAP_CLNT_H_ + #define _RPC_PMAP_CLNT_H_ + ++#include ++#include ++#include ++ + #ifdef __cplusplus + extern "C" { + #endif +diff --git a/tirpc/rpc/types.h b/tirpc/rpc/types.h +index 52c30a2..f069efa 100644 +--- a/tirpc/rpc/types.h ++++ b/tirpc/rpc/types.h +@@ -65,6 +65,28 @@ typedef int32_t rpc_inline_t; + #define mem_alloc(bsize) calloc(1, bsize) + #define mem_free(ptr, bsize) free(ptr) + ++ ++#if defined __APPLE_CC__ || defined __FreeBSD__ ++# define __u_char_defined ++# define __daddr_t_defined ++#endif ++ ++#ifndef __u_char_defined ++typedef __u_char u_char; ++typedef __u_short u_short; ++typedef __u_int u_int; ++typedef __u_long u_long; ++typedef __quad_t quad_t; ++typedef __u_quad_t u_quad_t; ++typedef __fsid_t fsid_t; ++# define __u_char_defined ++#endif ++#ifndef __daddr_t_defined ++typedef __daddr_t daddr_t; ++typedef __caddr_t caddr_t; ++# define __daddr_t_defined ++#endif ++ + #include + #include + #include diff --git a/libtirpc.spec b/libtirpc.spec index 0d7748e..f070c74 100644 --- a/libtirpc.spec +++ b/libtirpc.spec @@ -2,15 +2,15 @@ Name: libtirpc Version: 1.0.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Transport Independent RPC Library Group: System Environment/Libraries License: SISSL and BSD URL: http://nfsv4.bullopensource.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Source0: http://downloads.sourceforge.net/libtirpc/libtirpc-%{version}.tar.bz2 -Patch0: %{name}_header.patch +Patch001: libtirpc-1.0.3-rc1.patch BuildRequires: automake, autoconf, libtool, pkgconfig BuildRequires: krb5-devel @@ -40,7 +40,8 @@ developing programs which use the tirpc library. %prep %setup -q -%patch0 -p1 -b .header + +%patch001 -p1 # Remove .orig files find . -name "*.orig" | xargs rm -f @@ -134,6 +135,9 @@ rm -rf %{buildroot} %{_mandir}/*/* %changelog +* Tue Nov 14 2017 Steve Dickson 1.0.2-4 +- Update to latest upstream RC release: libtirpc-1-0-3-rc1 + * Tue Aug 22 2017 Petr Ĺ abata - 1.0.2-3 - Fixing the FTBFS on behalf of Rafael Fonseca (rhbz#1482063) diff --git a/libtirpc_gssglue.patch b/libtirpc_gssglue.patch deleted file mode 100644 index d16f815..0000000 --- a/libtirpc_gssglue.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 9151a39539145e1f62f8b30168d1cdeb19299dac Mon Sep 17 00:00:00 2001 -From: Simo Sorce -Date: Tue, 26 Mar 2013 11:13:05 -0400 -Subject: [PATCH 1/2] Switch to use standard GSSAPI by default - -Make libgssglue configurable still but disabled by default. -There is no reason to use libgssglue anymore, and modern gssapi -supports all needed features for libtirpc and its dependencies. - -Signed-off-by: Steve Dickson ---- - configure.ac | 23 +++++++++++++++++++---- - src/Makefile.am | 4 ++-- - 2 files changed, 21 insertions(+), 6 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 40dce96..4a4adba 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -5,15 +5,30 @@ AC_CONFIG_SRCDIR([src/auth_des.c]) - AC_CONFIG_MACRO_DIR([m4]) - - AC_ARG_ENABLE(gss,[ --enable-gss Turn on gss api], [case "${enableval}" in -- yes) gss=true ; AC_CHECK_LIB([gssapi],[gss_init_sec_context]) ;; -+ yes) gss=true ;; - no) gss=false ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-gss) ;; - esac],[gss=false]) - AM_CONDITIONAL(GSS, test x$gss = xtrue) -+AC_ARG_WITH(gssglue, -+ [ --with-gssglue Use libgssglue], -+ [case "${enableval}" in -+ yes) gssglue=true ;; -+ no) gssglue=false ;; -+ *) AC_MSG_ERROR(bad value ${enableval} for --with-gssglue) ;; -+ esac], -+ [gssglue=false]) -+AM_CONDITIONAL(USEGSSGLUE, test x$gssglue = xtrue) - if test x$gss = xtrue; then -- AC_DEFINE(HAVE_LIBGSSAPI, 1, []) -- PKG_CHECK_MODULES(GSSGLUE, libgssglue, [], -- AC_MSG_ERROR([Unable to locate information required to use libgssglue.])) -+ if test x$gssglue = xtrue; then -+ PKG_CHECK_MODULES(GSSAPI, libgssglue, [], -+ AC_MSG_ERROR([Unable to locate information required to use libgssglue.])) -+ else -+ GSSAPI_CFLAGS=`krb5-config --cflags gssapi` -+ GSSAPI_LIBS=`krb5-config --libs gssapi` -+ AC_SUBST([GSSAPI_CFLAGS]) -+ AC_SUBST([GSSAPI_LIBS]) -+ fi - fi - AC_ARG_ENABLE(ipv6, - [AC_HELP_STRING([--disable-ipv6], [Disable IPv6 support @<:@default=no@:>@])], -diff --git a/src/Makefile.am b/src/Makefile.am -index 66350f5..2dd7768 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -58,8 +58,8 @@ libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_ref - ## Secure-RPC - if GSS - libtirpc_la_SOURCES += auth_gss.c authgss_prot.c svc_auth_gss.c -- libtirpc_la_LDFLAGS += $(GSSGLUE_LIBS) -- libtirpc_la_CFLAGS = -DHAVE_RPCSEC_GSS $(GSSGLUE_CFLAGS) -+ libtirpc_la_LDFLAGS += $(GSSAPI_LIBS) -+ libtirpc_la_CFLAGS = -DHAVE_RPCSEC_GSS $(GSSAPI_CFLAGS) - endif - - ## libtirpc_a_SOURCES += key_call.c key_prot_xdr.c getpublickey.c --- -1.8.1.4 - - -From 4072a0bb8b619cab027bb3833785768681da4ed5 Mon Sep 17 00:00:00 2001 -From: Simo Sorce -Date: Wed, 10 Apr 2013 11:38:14 -0400 -Subject: [PATCH 2/2] gss: Fix private data giveaway - -When the private data is given away the gss context also needs to go, -because the caller may destroy it, such as when the context is exported -into a lucid context to hand it to the kernel. - -Signed-off-by: Simo Sorce -Signed-off-by: Steve Dickson ---- - src/auth_gss.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/auth_gss.c b/src/auth_gss.c -index 81ae8ae..703bc3f 100644 ---- a/src/auth_gss.c -+++ b/src/auth_gss.c -@@ -269,6 +269,7 @@ authgss_get_private_data(AUTH *auth, struct authgss_private_data *pd) - * send an RPCSEC_GSS_DESTROY request which might inappropriately - * destroy the context. - */ -+ gd->ctx = GSS_C_NO_CONTEXT; - gd->gc.gc_ctx.length = 0; - gd->gc.gc_ctx.value = NULL; - -@@ -284,7 +285,8 @@ authgss_free_private_data(struct authgss_private_data *pd) - if (!pd) - return (FALSE); - -- pd->pd_ctx = NULL; -+ if (pd->pd_ctx != GSS_C_NO_CONTEXT) -+ gss_delete_sec_context(&min_stat, &pd->pd_ctx, NULL); - gss_release_buffer(&min_stat, &pd->pd_ctx_hndl); - memset(&pd->pd_ctx_hndl, 0, sizeof(pd->pd_ctx_hndl)); - pd->pd_seq_win = 0; --- -1.8.1.4 - diff --git a/libtirpc_header.patch b/libtirpc_header.patch deleted file mode 100644 index d18d3d0..0000000 --- a/libtirpc_header.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- libtirpc-1.0.2/src/xdr_sizeof.c 2017-07-05 17:02:23.000000000 +0200 -+++ libtirpc-1.0.2/src/xdr_sizeof.c.fixed 2017-08-10 18:47:14.369381335 +0200 -@@ -39,6 +39,7 @@ - #include - #include - #include -+#include - #include "un-namespace.h" - - /* ARGSUSED */