From 95f5f1cbd50f5dd87f5aa5cc7738411ef2300ed7ffcd18bce4b1550dd1691409 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 29 Jun 2015 21:31:36 +0000 Subject: [PATCH] Accepting request 313578 from home:kukuk:NIS - Add 008-fix-undef-ref.patch to fix a undefined reference bug - Update to version 0.3.2 (bring authdes back) - Remove 005-no_IPv6_for_old_code.patch (accepted upstream) - Remove 001-tirpc-features.patch (obsolete) - Add 005-missing-symvers.patch (fix missing, new symbols) - Add 006-memleak1.patch (fix memory leak) - Add 007-memleak2.patch (fix memory leak) OBS-URL: https://build.opensuse.org/request/show/313578 OBS-URL: https://build.opensuse.org/package/show/Base:System/libtirpc?expand=0&rev=49 --- 001-tirpc-features.patch | 154 --------------------------------- 002-old-automake.patch | 2 +- 005-missing-symvers.patch | 18 ++++ 005-no_IPv6_for_old_code.patch | 24 ----- 006-memleak1.patch | 41 +++++++++ 007-memleak2.patch | 56 ++++++++++++ 008-fix-undef-ref.patch | 88 +++++++++++++++++++ libtirpc-0.3.1.tar.bz2 | 3 - libtirpc-0.3.2.tar.bz2 | 3 + libtirpc.changes | 15 ++++ libtirpc.spec | 22 ++--- 11 files changed, 234 insertions(+), 192 deletions(-) delete mode 100644 001-tirpc-features.patch create mode 100644 005-missing-symvers.patch delete mode 100644 005-no_IPv6_for_old_code.patch create mode 100644 006-memleak1.patch create mode 100644 007-memleak2.patch create mode 100644 008-fix-undef-ref.patch delete mode 100644 libtirpc-0.3.1.tar.bz2 create mode 100644 libtirpc-0.3.2.tar.bz2 diff --git a/001-tirpc-features.patch b/001-tirpc-features.patch deleted file mode 100644 index 5708645..0000000 --- a/001-tirpc-features.patch +++ /dev/null @@ -1,154 +0,0 @@ -diff --git a/.gitignore b/.gitignore -index b7814a3..fad274f 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -34,6 +34,8 @@ libtirpc.pc - lib*.a - src/libtirpc.la - src/libtirpc_la-*.lo -+tirpc/stamp-h2 -+tirpc/tirpc-features.h - # generic editor backup et al - *~ - .stgitmail.txt -diff --git a/Makefile.am b/Makefile.am -index 466b6dd..665d328 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -4,9 +4,11 @@ ACLOCAL_AMFLAGS = -I m4 - noinst_HEADERS = tirpc/reentrant.h \ - tirpc/getpeereid.h \ - tirpc/libc_private.h \ -- tirpc/un-namespace.h -+ tirpc/un-namespace.h \ -+ tirpc/tirpc-features.h.in - - nobase_include_HEADERS = tirpc/netconfig.h \ -+ tirpc/tirpc-features.h \ - tirpc/rpcsvc/crypt.x \ - tirpc/rpcsvc/crypt.h \ - tirpc/rpc/xdr.h \ -diff --git a/configure.ac b/configure.ac -index e3cb8af..7802304 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -31,7 +31,7 @@ AC_ARG_ENABLE(authdes, - [],[enable_authdes=no]) - AM_CONDITIONAL(AUTHDES, test "x$enable_authdes" = xyes) - if test "x$enable_authdes" = xyes; then -- AC_DEFINE([HAVE_AUTHDES], [1], -+ AC_DEFINE([TIRPC_AUTHDES], [1], - [Define to 1 if DES authentication is enabled]) - CFLAG_AUTHDES="-DHAVE_AUTHDES=1" - AC_SUBST([CFLAG_AUTHDES]) -@@ -50,7 +50,7 @@ AC_ARG_ENABLE(symvers, - [],[enable_symvers=yes]) - AM_CONDITIONAL(SYMVERS, test "x$enable_symvers" = xyes) - --AC_CONFIG_HEADERS([config.h]) -+AC_CONFIG_HEADERS([config.h tirpc/tirpc-features.h]) - AC_PROG_LIBTOOL - AC_HEADER_DIRENT - AC_PREFIX_DEFAULT(/usr) -diff --git a/tirpc/rpc/auth.h b/tirpc/rpc/auth.h -index f7fa16c..3e2d1cf 100644 ---- a/tirpc/rpc/auth.h -+++ b/tirpc/rpc/auth.h -@@ -51,6 +51,7 @@ - #include - #include - -+#include - - #define MAX_AUTH_BYTES 400 - #define MAXNETNAMELEN 255 /* maximum length of network user's name */ -@@ -164,7 +165,7 @@ union des_block { - }; - typedef union des_block des_block; - --#ifdef HAVE_AUTHDES -+#ifdef TIRPC_AUTHDES - #ifdef __cplusplus - extern "C" { - #endif -@@ -172,7 +173,7 @@ extern bool_t xdr_des_block(XDR *, des_block *); - #ifdef __cplusplus - } - #endif --#endif /* HAVE_AUTHDES */ -+#endif /* TIRPC_AUTHDES */ - - /* - * Authentication info. Opaque to client. -@@ -320,7 +321,7 @@ extern AUTH *authnone_create(void); /* takes no parameters */ - } - #endif - --#ifdef HAVE_AUTHDES -+#ifdef TIRPC_AUTHDES - /* - * DES style authentication - * AUTH *authsecdes_create(servername, window, timehost, ckey) -@@ -338,7 +339,7 @@ extern AUTH *authdes_seccreate (const char *, const u_int, const char *, - #ifdef __cplusplus - } - #endif --#endif /* HAVE_AUTHDES */ -+#endif /* TIRPC_AUTHDES */ - - #ifdef __cplusplus - extern "C" { -@@ -362,9 +363,9 @@ extern int host2netname(char *, const char *, const char *); - extern int user2netname(char *, const uid_t, const char *); - extern int netname2user(char *, uid_t *, gid_t *, int *, gid_t *); - extern int netname2host(char *, char *, const int); --#ifdef HAVE_AUTHDES -+#ifdef TIRPC_AUTHDES - extern void passwd2des ( char *, char * ); --#endif /* HAVE_AUTHDES */ -+#endif /* TIRPC_AUTHDES */ - #ifdef __cplusplus - } - #endif -diff --git a/tirpc/rpc/rpc.h b/tirpc/rpc/rpc.h -index 392a7b9..7517264 100644 ---- a/tirpc/rpc/rpc.h -+++ b/tirpc/rpc/rpc.h -@@ -39,6 +39,8 @@ - #include - #include - -+#include -+ - /* external data representation interfaces */ - #include /* generic (de)serializer */ - -@@ -52,13 +54,13 @@ - #include /* protocol for rpc messages */ - #include /* protocol for unix style cred */ - --#ifdef HAVE_AUTHDES -+#ifdef TIRPC_AUTHDES - /* - * Uncomment-out the next line if you are building the rpc library with - * DES Authentication (see the README file in the secure_rpc/ directory). - */ - #include /* protocol for des style cred */ --#endif /* HAVE_AUTHDES */ -+#endif /* TIRPC_AUTHDES */ - - /* Server side only remote procedure callee */ - #include /* service side authenticator */ -diff --git a/tirpc/tirpc-features.h.in b/tirpc/tirpc-features.h.in -new file mode 100644 -index 0000000..9bea966 ---- /dev/null -+++ b/tirpc/tirpc-features.h.in -@@ -0,0 +1,7 @@ -+#ifndef _TIRPC_FEATURES_H -+#define _TIRPC_FEATURES_H -+ -+/* Define to 1 if DES authentication is enabled */ -+#undef TIRPC_AUTHDES -+ -+#endif /* _TIRPC_FEATURES_H */ diff --git a/002-old-automake.patch b/002-old-automake.patch index 9c93f42..2eb0d63 100644 --- a/002-old-automake.patch +++ b/002-old-automake.patch @@ -3,7 +3,7 @@ index 290c635..a6a202e 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,4 @@ - AC_INIT(libtirpc, 0.3.1) + AC_INIT(libtirpc, 0.3.2) -AM_INIT_AUTOMAKE([silent-rules]) +AM_INIT_AUTOMAKE -AM_SILENT_RULES([yes]) diff --git a/005-missing-symvers.patch b/005-missing-symvers.patch new file mode 100644 index 0000000..3883a11 --- /dev/null +++ b/005-missing-symvers.patch @@ -0,0 +1,18 @@ +diff --git a/src/libtirpc.map b/src/libtirpc.map +index 063cddd..449b769 100644 +--- a/src/libtirpc.map ++++ b/src/libtirpc.map +@@ -316,6 +316,13 @@ TIRPC_0.3.2 { + xdr_unixcred; + } TIRPC_0.3.1; + ++TIRPC_0.3.3 { ++ __getpublickey_LOCAL; ++ __key_decryptsession_pk_LOCAL; ++ __key_encryptsession_pk_LOCAL; ++ __key_gendes_LOCAL; ++} TIRPC_0.3.2; ++ + TIRPC_PRIVATE { + global: + __libc_clntudp_bufcreate; diff --git a/005-no_IPv6_for_old_code.patch b/005-no_IPv6_for_old_code.patch deleted file mode 100644 index 3075394..0000000 --- a/005-no_IPv6_for_old_code.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/src/rpc_generic.c b/src/rpc_generic.c -index 6148830..f443c47 100644 ---- a/src/rpc_generic.c -+++ b/src/rpc_generic.c -@@ -213,7 +213,8 @@ getnettype(nettype) - } - - /* -- * For the given nettype (tcp or udp only), return the first structure found. -+ * For the given nettype (tcp or udp only), return the first -+ * IPv4 structure found. - * This should be freed by calling freenetconfigent() - */ - struct netconfig * -@@ -250,8 +251,7 @@ __rpc_getconfip(nettype) - return (NULL); - } - while ((nconf = getnetconfig(confighandle)) != NULL) { -- if (strcmp(nconf->nc_protofmly, NC_INET) == 0 || -- strcmp(nconf->nc_protofmly, NC_INET6) == 0) { -+ if (strcmp(nconf->nc_protofmly, NC_INET) == 0) { - if (strcmp(nconf->nc_proto, NC_TCP) == 0 && - netid_tcp == NULL) { - netid_tcp = strdup(nconf->nc_netid); diff --git a/006-memleak1.patch b/006-memleak1.patch new file mode 100644 index 0000000..d1758aa --- /dev/null +++ b/006-memleak1.patch @@ -0,0 +1,41 @@ +xprt->xp_netid can be allocated by makefd_xprt() in +svc_fd_create(), so don't blindly overwrite the +pointer in svc_tli_create() + +The API expection is the nc_netid passed in will be +used for the xp_netid. So the pointer must be +freed then re-allocated. + +Reported-by: Michael Theall +Signed-off-by: Steve Dickson +--- + src/svc_generic.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/svc_generic.c b/src/svc_generic.c +index f49d776..7aae796 100644 +--- a/src/svc_generic.c ++++ b/src/svc_generic.c +@@ -283,6 +283,8 @@ svc_tli_create(fd, nconf, bindaddr, sendsz, recvsz) + xprt->xp_type = __rpc_socktype2seman(si.si_socktype); + + if (nconf) { ++ if (xprt->xp_netid != NULL) ++ free(xprt->xp_netid); + xprt->xp_netid = strdup(nconf->nc_netid); + xprt->xp_tp = strdup(nconf->nc_device); + } +-- +2.4.3 + + +------------------------------------------------------------------------------ +Monitor 25 network devices or servers for free with OpManager! +OpManager is web-based network management software that monitors +network devices and physical & virtual servers, alerts via email & sms +for fault. Monitor 25 devices for free with no restriction. Download now +http://ad.doubleclick.net/ddm/clk/292181274;119417398;o +_______________________________________________ +Libtirpc-devel mailing list +Libtirpc-devel@lists.sourceforge.net +https://lists.sourceforge.net/lists/listinfo/libtirpc-devel diff --git a/007-memleak2.patch b/007-memleak2.patch new file mode 100644 index 0000000..29aebfa --- /dev/null +++ b/007-memleak2.patch @@ -0,0 +1,56 @@ +A rendezvouser socket is defined by a +xp_port value of (u_short)-1 which does +not work because xp_port is overwritten +by svc_com_create() and 65535 is a valid +port value. + +To ensure actual connections get freed +properly in __svc_vc_dodestroy(), compare +the xp_recv value to rendezvous_request. + +Reported-by: Michael Theall +Signed-off-by: Steve Dickson +--- + src/svc_vc.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/svc_vc.c b/src/svc_vc.c +index 9824631..6848c09 100644 +--- a/src/svc_vc.c ++++ b/src/svc_vc.c +@@ -392,6 +392,12 @@ svc_vc_destroy(xprt) + __svc_vc_dodestroy(xprt); + } + ++static bool_t ++__svc_rendezvous_socket(xprt) ++ SVCXPRT *xprt; ++{ ++ return (xprt->xp_ops->xp_recv == rendezvous_request); ++} + static void + __svc_vc_dodestroy(xprt) + SVCXPRT *xprt; +@@ -403,7 +409,7 @@ __svc_vc_dodestroy(xprt) + + if (xprt->xp_fd != RPC_ANYFD) + (void)close(xprt->xp_fd); +- if (xprt->xp_port != 0) { ++ if (__svc_rendezvous_socket(xprt)) { + /* a rendezvouser socket */ + r = (struct cf_rendezvous *)xprt->xp_p1; + mem_free(r, sizeof (struct cf_rendezvous)); +-- +2.4.3 + + +------------------------------------------------------------------------------ +Monitor 25 network devices or servers for free with OpManager! +OpManager is web-based network management software that monitors +network devices and physical & virtual servers, alerts via email & sms +for fault. Monitor 25 devices for free with no restriction. Download now +http://ad.doubleclick.net/ddm/clk/292181274;119417398;o +_______________________________________________ +Libtirpc-devel mailing list +Libtirpc-devel@lists.sourceforge.net +https://lists.sourceforge.net/lists/listinfo/libtirpc-devel diff --git a/008-fix-undef-ref.patch b/008-fix-undef-ref.patch new file mode 100644 index 0000000..46b5e26 --- /dev/null +++ b/008-fix-undef-ref.patch @@ -0,0 +1,88 @@ +diff -Naur a/src/Makefile.am b/src/Makefile.am +--- a/src/Makefile.am 2015-06-16 17:35:08.000000000 +0200 ++++ b/src/Makefile.am 2015-06-17 21:23:05.185276962 +0200 +@@ -69,7 +69,7 @@ + endif + + libtirpc_la_SOURCES += key_call.c key_prot_xdr.c getpublickey.c +-libtirpc_la_SOURCES += netname.c netnamer.c rtime.c ++libtirpc_la_SOURCES += netname.c netnamer.c rpcdname.c rtime.c + + CLEANFILES = cscope.* *~ + DISTCLEANFILES = Makefile.in +diff -Naur a/src/rpcdname.c b/src/rpcdname.c +--- a/src/rpcdname.c 1970-01-01 01:00:00.000000000 +0100 ++++ b/src/rpcdname.c 2015-06-17 21:23:05.186276982 +0200 +@@ -0,0 +1,72 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* ++ * rpcdname.c ++ * Gets the default domain name ++ */ ++ ++#include ++#include ++#include ++ ++static char *default_domain = 0; ++ ++static char * ++get_default_domain() ++{ ++ char temp[256]; ++ ++ if (default_domain) ++ return (default_domain); ++ if (getdomainname(temp, sizeof(temp)) < 0) ++ return (0); ++ if ((int) strlen(temp) > 0) { ++ default_domain = (char *)malloc((strlen(temp)+(unsigned)1)); ++ if (default_domain == 0) ++ return (0); ++ (void) strcpy(default_domain, temp); ++ return (default_domain); ++ } ++ return (0); ++} ++ ++/* ++ * This is a wrapper for the system call getdomainname which returns a ++ * ypclnt.h error code in the failure case. It also checks to see that ++ * the domain name is non-null, knowing that the null string is going to ++ * get rejected elsewhere in the NIS client package. ++ */ ++int ++__rpc_get_default_domain(domain) ++ char **domain; ++{ ++ if ((*domain = get_default_domain()) != 0) ++ return (0); ++ return (-1); ++} diff --git a/libtirpc-0.3.1.tar.bz2 b/libtirpc-0.3.1.tar.bz2 deleted file mode 100644 index cc341a1..0000000 --- a/libtirpc-0.3.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a8838fe180deb8a6f6e491ee665325a28dee4100ec6b1f0b86d611dbfe3a2bb8 -size 479721 diff --git a/libtirpc-0.3.2.tar.bz2 b/libtirpc-0.3.2.tar.bz2 new file mode 100644 index 0000000..69e2ce7 --- /dev/null +++ b/libtirpc-0.3.2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2008a379f37f2c5d5a87a568b06707422cc3e4f5da305f7fb71f3f4c6d473ffc +size 491373 diff --git a/libtirpc.changes b/libtirpc.changes index 71acbd9..9f7d3f4 100644 --- a/libtirpc.changes +++ b/libtirpc.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Wed Jun 24 16:44:06 CEST 2015 - kukuk@suse.de + +- Add 008-fix-undef-ref.patch to fix a undefined reference bug + +------------------------------------------------------------------- +Tue Jun 23 14:15:25 CEST 2015 - kukuk@suse.de + +- Update to version 0.3.2 (bring authdes back) +- Remove 005-no_IPv6_for_old_code.patch (accepted upstream) +- Remove 001-tirpc-features.patch (obsolete) +- Add 005-missing-symvers.patch (fix missing, new symbols) +- Add 006-memleak1.patch (fix memory leak) +- Add 007-memleak2.patch (fix memory leak) + ------------------------------------------------------------------- Mon Jun 1 17:06:29 CEST 2015 - kukuk@suse.de diff --git a/libtirpc.spec b/libtirpc.spec index c7ea7c9..4d25590 100644 --- a/libtirpc.spec +++ b/libtirpc.spec @@ -16,12 +16,10 @@ # -%define tarversion 0.3.1 - Name: libtirpc # src/crypt_client.c tirpc/spinlock.h and tirpc/rpcsvc/crypt.x have the BSD # advertising clause -Version: 0.3.1 +Version: 0.3.2 Release: 0 Summary: Transport Independent RPC Library License: BSD-4-Clause @@ -35,15 +33,17 @@ BuildRequires: autoconf BuildRequires: libtool BuildRequires: pkg-config Url: http://sourceforge.net/projects/libtirpc/ -# http://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{tarversion}.tar.bz2 -Source: %{name}-%{tarversion}.tar.bz2 +# http://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.tar.bz2 +Source: %{name}-%{version}.tar.bz2 Source1: baselibs.conf Patch0: 000-bindresvport_blacklist.patch -Patch1: 001-tirpc-features.patch # Patch2 is only needed for SLES11 Patch2: 002-old-automake.patch Patch4: 004-netconfig-prefer-IPv6.patch -Patch5: 005-no_IPv6_for_old_code.patch +Patch5: 005-missing-symvers.patch +Patch6: 006-memleak1.patch +Patch7: 007-memleak2.patch +Patch8: 008-fix-undef-ref.patch Patch25: patch6_7.diff # Patch37 is only needed on openSUSE >= 13.1, SLE >= 12 Patch37: libtirpc-new-path-rpcbindsock.patch @@ -81,13 +81,15 @@ This implementation allows the support of other transports than UDP and TCP over IPv4 %prep -%setup -q -n %name-%tarversion +%setup -q -n %name-%version %patch0 -p0 -%patch1 -p1 +%patch2 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 %patch25 -p1 -%patch2 -p1 %if 0%{suse_version} >= 1310 %patch37 -p1 %endif