diff --git a/libtirpc-0.2.1_git201005272057.tar.bz2 b/libtirpc-0.2.1_git201005272057.tar.bz2 deleted file mode 100644 index e6f85d6..0000000 --- a/libtirpc-0.2.1_git201005272057.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:14007754ed4d9525b512330934afeb73c36fc4552a39d23235a1f23a3816c97c -size 173648 diff --git a/libtirpc-0.2.2.tar.bz2 b/libtirpc-0.2.2.tar.bz2 new file mode 100644 index 0000000..a4f49ab --- /dev/null +++ b/libtirpc-0.2.2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f05eb17c85d62423858b8f74512cfe66a9ae1cedf93f03c2a0a32e04f0a33705 +size 464094 diff --git a/libtirpc-revert-des_crypt.patch b/libtirpc-revert-des_crypt.patch new file mode 100644 index 0000000..71b310b --- /dev/null +++ b/libtirpc-revert-des_crypt.patch @@ -0,0 +1,33 @@ +[Libtirpc-devel] [PATCH] Revert "Include des_crypt in build" +From: Mike Frysinger - 2011-06-12 05:46 + +The des_crypt code requires the crypt_client code (which wasn't +added), and that code requires a currently undefined function +(namely xdr_desresp). Since I have no idea what that's about, +and this change ends up breaking some systems, just revert it. + +Once we have a patch that improves portability without breaking +existing systems, we can revisit this. + +This reverts commit 9bdcba10aa67ce3f67810c7aaac944a00dcfcee5. + +Signed-off-by: Mike Frysinger +--- +note: please ignore the recent "Include crypt_client in build" patch + + src/Makefile.am | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 7ee8cbc..6731ff9 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -50,7 +50,7 @@ libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c cln + 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_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 des_crypt.c ++ auth_time.c auth_des.c authdes_prot.c + + ## XDR + libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c diff --git a/libtirpc-use-correct-source-addr-on-replies.patch b/libtirpc-use-correct-source-addr-on-replies.patch deleted file mode 100644 index c4659dd..0000000 --- a/libtirpc-use-correct-source-addr-on-replies.patch +++ /dev/null @@ -1,195 +0,0 @@ - -Patch by Olaf Kirch and Leonardo Chiquitto as attached with id 348693 -at https://bugzilla.novell.com/show_bug.cgi?id=587934 - -diff --git a/src/svc_dg.c b/src/svc_dg.c -index 7df470e..edf7d17 100644 ---- a/src/svc_dg.c -+++ b/src/svc_dg.c -@@ -76,6 +76,8 @@ static bool_t svc_dg_control(SVCXPRT *, const u_int, void *); - static int cache_get(SVCXPRT *, struct rpc_msg *, char **, size_t *); - static void cache_set(SVCXPRT *, size_t); - int svc_dg_enablecache(SVCXPRT *, u_int); -+static void svc_dg_enable_pktinfo(int, const struct __rpc_sockinfo *); -+static int svc_dg_valid_pktinfo(struct msghdr *); - - /* - * Usage: -@@ -142,6 +144,9 @@ svc_dg_create(fd, sendsize, recvsize) - goto freedata; - __rpc_set_netbuf(&xprt->xp_ltaddr, &ss, slen); - -+ /* Enable reception of IP*_PKTINFO control msgs */ -+ svc_dg_enable_pktinfo(fd, &si); -+ - xprt_register(xprt); - return (xprt); - freedata: -@@ -171,19 +176,37 @@ svc_dg_recv(xprt, msg) - XDR *xdrs = &(su->su_xdrs); - char *reply; - struct sockaddr_storage ss; -+ struct msghdr *mesgp; -+ struct iovec iov; - socklen_t alen; - size_t replylen; - ssize_t rlen; - - again: -- alen = sizeof (struct sockaddr_storage); -- rlen = recvfrom(xprt->xp_fd, rpc_buffer(xprt), su->su_iosz, 0, -- (struct sockaddr *)(void *)&ss, &alen); -+ iov.iov_base = rpc_buffer(xprt); -+ iov.iov_len = su->su_iosz; -+ mesgp = &su->su_msghdr; -+ memset(mesgp, 0, sizeof(*mesgp)); -+ mesgp->msg_iov = &iov; -+ mesgp->msg_iovlen = 1; -+ mesgp->msg_name = (struct sockaddr *)(void *) &ss; -+ mesgp->msg_namelen = sizeof (struct sockaddr_storage); -+ mesgp->msg_control = su->su_cmsg; -+ mesgp->msg_controllen = sizeof(su->su_cmsg); -+ -+ rlen = recvmsg(xprt->xp_fd, mesgp, 0); - if (rlen == -1 && errno == EINTR) - goto again; - if (rlen == -1 || (rlen < (ssize_t)(4 * sizeof (u_int32_t)))) - return (FALSE); -- __rpc_set_netbuf(&xprt->xp_rtaddr, &ss, alen); -+ __rpc_set_netbuf(&xprt->xp_rtaddr, &ss, mesgp->msg_namelen); -+ -+ /* Check whether there's an IP_PKTINFO or IP6_PKTINFO control message. -+ * If yes, preserve it for svc_dg_reply; otherwise just zap an cmsgs */ -+ if (!svc_dg_valid_pktinfo(mesgp)) { -+ mesgp->msg_control = NULL; -+ mesgp->msg_controllen = 0; -+ } - - __xprt_set_raddr(xprt, &ss); - xdrs->x_op = XDR_DECODE; -@@ -194,8 +217,9 @@ again: - su->su_xid = msg->rm_xid; - if (su->su_cache != NULL) { - if (cache_get(xprt, msg, &reply, &replylen)) { -- (void)sendto(xprt->xp_fd, reply, replylen, 0, -- (struct sockaddr *)(void *)&ss, alen); -+ iov.iov_base = reply; -+ iov.iov_len = replylen; -+ (void) sendmsg(xprt->xp_fd, mesgp, 0); - return (FALSE); - } - } -@@ -216,10 +240,18 @@ svc_dg_reply(xprt, msg) - XDR_SETPOS(xdrs, 0); - msg->rm_xid = su->su_xid; - if (xdr_replymsg(xdrs, msg)) { -- slen = XDR_GETPOS(xdrs); -- if (sendto(xprt->xp_fd, rpc_buffer(xprt), slen, 0, -- (struct sockaddr *)xprt->xp_rtaddr.buf, -- (socklen_t)xprt->xp_rtaddr.len) == (ssize_t) slen) { -+ struct msghdr *msg = &su->su_msghdr; -+ struct iovec iov; -+ -+ iov.iov_base = rpc_buffer(xprt); -+ iov.iov_len = slen = XDR_GETPOS(xdrs); -+ msg->msg_iov = &iov; -+ msg->msg_iovlen = 1; -+ msg->msg_name = (struct sockaddr *)(void *) xprt->xp_rtaddr.buf; -+ msg->msg_namelen = xprt->xp_rtaddr.len; -+ /* cmsg already set in svc_dg_recv */ -+ -+ if (sendmsg(xprt->xp_fd, msg, 0) == (ssize_t) slen) { - stat = TRUE; - if (su->su_cache) - cache_set(xprt, slen); -@@ -583,3 +615,76 @@ cache_get(xprt, msg, replyp, replylenp) - mutex_unlock(&dupreq_lock); - return (0); - } -+ -+/* -+ * Enable reception of PKTINFO control messages -+ */ -+void -+svc_dg_enable_pktinfo(int fd, const struct __rpc_sockinfo *si) -+{ -+ int val = 1; -+ -+ switch (si->si_af) { -+ case AF_INET: -+ (void) setsockopt(fd, SOL_IP, IP_PKTINFO, &val, sizeof(val)); -+ break; -+ -+ case AF_INET6: -+ (void) setsockopt(fd, SOL_IPV6, IPV6_PKTINFO, &val, sizeof(val)); -+ break; -+ } -+} -+ -+/* -+ * When given a control message received from the socket -+ * layer, check whether it contains valid PKTINFO data matching -+ * the address family of the peer address. -+ */ -+int -+svc_dg_valid_pktinfo(struct msghdr *msg) -+{ -+ struct cmsghdr *cmsg; -+ -+ if (!msg->msg_name) -+ return 0; -+ -+ if (msg->msg_flags & MSG_CTRUNC) -+ return 0; -+ -+ cmsg = CMSG_FIRSTHDR(msg); -+ if (cmsg == NULL || CMSG_NXTHDR(msg, cmsg) != NULL) -+ return 0; -+ -+ switch (((struct sockaddr *) msg->msg_name)->sa_family) { -+ case AF_INET: -+ if (cmsg->cmsg_level != SOL_IP -+ || cmsg->cmsg_type != IP_PKTINFO -+ || cmsg->cmsg_len < CMSG_LEN(sizeof (struct in_pktinfo))) { -+ return 0; -+ } else { -+ struct in_pktinfo *pkti; -+ -+ pkti = (struct in_pktinfo *) CMSG_DATA (cmsg); -+ pkti->ipi_ifindex = 0; -+ } -+ break; -+ -+ case AF_INET6: -+ if (cmsg->cmsg_level != SOL_IPV6 -+ || cmsg->cmsg_type != IPV6_PKTINFO -+ || cmsg->cmsg_len < CMSG_LEN(sizeof (struct in6_pktinfo))) { -+ return 0; -+ } else { -+ struct in6_pktinfo *pkti; -+ -+ pkti = (struct in6_pktinfo *) CMSG_DATA (cmsg); -+ pkti->ipi6_ifindex = 0; -+ } -+ break; -+ -+ default: -+ return 0; -+ } -+ -+ return 1; -+} -diff --git a/tirpc/rpc/svc_dg.h b/tirpc/rpc/svc_dg.h -index 67d2564..88e7df7 100644 ---- a/tirpc/rpc/svc_dg.h -+++ b/tirpc/rpc/svc_dg.h -@@ -46,6 +46,9 @@ struct svc_dg_data { - XDR su_xdrs; /* XDR handle */ - char su_verfbody[MAX_AUTH_BYTES]; /* verifier body */ - void *su_cache; /* cached data, NULL if none */ -+ -+ struct msghdr su_msghdr; /* msghdr received from clnt */ -+ unsigned char su_cmsg[64]; /* cmsghdr received from clnt */ - }; - - #define __rpcb_get_dg_xidp(x) (&((struct svc_dg_data *)(x)->xp_p2)->su_xid) diff --git a/libtirpc.changes b/libtirpc.changes index b368f0a..4836a28 100644 --- a/libtirpc.changes +++ b/libtirpc.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Fri Jun 17 14:18:24 UTC 2011 - aj@suse.de + +- Fix library with reverting a patch in 0.22 release + (libtirpc-revert-des_crypt.patch) + +------------------------------------------------------------------- +Tue Jun 14 10:35:18 UTC 2011 - aj@suse.de + +- Update to libtirpc 0.22 which brings (compared to latest release): + * various bugfixes + * Replaces SISL files with BSD 3-clause +- Remove patch libtirpc-use-correct-source-addr-on-replies.patch + since it's part of the 0.22 release. + ------------------------------------------------------------------- Tue Feb 22 05:07:13 UTC 2011 - nfbrown@novell.com diff --git a/libtirpc.spec b/libtirpc.spec index ea7a205..120f6f6 100644 --- a/libtirpc.spec +++ b/libtirpc.spec @@ -20,10 +20,10 @@ BuildRequires: libgssglue-devel pkg-config Name: libtirpc -License: Other uncritical OpenSource License ; Sun Industry Standards Source License 1.0 +License: Other uncritical OpenSource License;BSD 3-Clause Group: System/Libraries AutoReqProv: on -Version: 0.2.1_git201005272057 +Version: 0.2.2 Release: 9 Summary: Transport Independent RPC Library Url: http://sourceforge.net/projects/libtirpc/ @@ -32,11 +32,12 @@ Patch21: libtirpc-clnt_broadcast_fix.patch Patch22: libtirpc-rpc_broadcast_misformed_replies.patch Patch31: libtirpc-getpmaphandle.patch Patch32: libtirpc-pmap-setunset.patch -Patch33: libtirpc-use-correct-source-addr-on-replies.patch Patch34: libtirpc-bindresvport_blacklist.patch +Patch35: libtirpc-revert-des_crypt.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %define debug_package_requires libtirpc1 = %{version}-%{release} + %description The Transport Independent RPC library (TI-RPC) is a replacement for the standard SunRPC library in glibc which does not support IPv6 addresses. @@ -55,6 +56,7 @@ License: Other uncritical OpenSource License ; Sun Industry Standards Sou Summary: Transport Independent RPC Library Group: System/Libraries + %description -n libtirpc1 The Transport Independent RPC library (TI-RPC) is a replacement for the standard SunRPC library in glibc which does not support IPv6 addresses. @@ -69,11 +71,12 @@ Authors: Antoine Fraticelli %package devel -License: Other uncritical OpenSource License ; Sun Industry Standards Source License 1.0 +License: Other uncritical OpenSource License ; BSD 3-Clause Summary: Transport Independent RPC Library Group: Development/Libraries/C and C++ Requires: libtirpc1 = %{version} glibc-devel + %description devel The Transport Independent RPC library (TI-RPC) is a replacement for the standard SunRPC library in glibc which does not support IPv6 addresses. @@ -93,15 +96,16 @@ Authors: %patch22 -p1 %patch31 -p1 %patch32 -p1 -%patch33 -p1 %patch34 -p1 +%patch35 -p1 + %build -mkdir m4 #bug autoreconf -fiv %configure --disable-static --with-pic --libdir=/%{_lib} --enable-gss %{__make} %{?_smp_mflags} + %install make install DESTDIR=$RPM_BUILD_ROOT # move devel so link to %{_libdir} @@ -110,19 +114,24 @@ mkdir -p $RPM_BUILD_ROOT%{_libdir} %{__rm} -v %{buildroot}/%{_lib}/%{name}.{la,so} mv -v $RPM_BUILD_ROOT/%{_lib}/pkgconfig $RPM_BUILD_ROOT/%{_libdir} + %clean rm -rf $RPM_BUILD_ROOT + %post -n libtirpc1 -p /sbin/ldconfig + %postun -n libtirpc1 -p /sbin/ldconfig + %files -n libtirpc1 %defattr(-,root,root) %config %{_sysconfdir}/netconfig /%{_lib}/libtirpc.so.1* %{_mandir}/man5/netconfig.5.gz + %files devel %defattr(-,root,root) %{_libdir}/libtirpc.so @@ -131,4 +140,6 @@ rm -rf $RPM_BUILD_ROOT /usr/%{_lib}/pkgconfig/* %{_mandir}/man3/* + + %changelog