From 3a3a89a2e4bb375220e23fabd5eee6e723f840a37324e62ebff9b68330e3e461 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Sat, 5 Apr 2008 02:43:51 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libtirpc?expand=0&rev=1 --- .gitattributes | 23 +++ .gitignore | 1 + libtirpc-0.1.7-arm.patch | 23 +++ libtirpc-0.1.7-bindresvport-ntohs.patch | 29 +++ libtirpc-0.1.7-bindresvport_ports.patch | 64 +++++++ libtirpc-0.1.7-bufoverflow.patch | 35 ++++ libtirpc-0.1.7-clnt_raw-mutex.patch | 39 +++++ libtirpc-0.1.7-dgcall-iprecverr.patch | 98 +++++++++++ libtirpc-0.1.7-gssglue.patch | 28 +++ libtirpc-0.1.7-libtirpc-pc.patch | 51 ++++++ libtirpc-0.1.7-man-install.patch | 35 ++++ libtirpc-0.1.7-netconfig.patch | 15 ++ libtirpc-0.1.7-overflow_fix.patch | 13 ++ libtirpc-0.1.7-ppc64.patch | 12 ++ libtirpc-0.1.7-snprintf.patch | 150 ++++++++++++++++ libtirpc-0.1.7-svc-rtaddr.patch | 52 ++++++ libtirpc-0.1.7-svc-run.patch | 19 ++ libtirpc-0.1.7-svc_auth_gss_lvalue_fix.patch | 13 ++ libtirpc-0.1.7-svcauthdestroy.patch | 12 ++ libtirpc-0.1.7-svcauthnone.patch | 101 +++++++++++ libtirpc-0.1.7-use_sysconfdir.patch | 13 ++ libtirpc-0.1.7-version.patch | 26 +++ libtirpc-0.1.7-xdr_bufferoverlow.patch | 45 +++++ libtirpc-0.1.7.tar.bz2 | 3 + libtirpc.changes | 10 ++ libtirpc.spec | 175 +++++++++++++++++++ ready | 0 27 files changed, 1085 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 libtirpc-0.1.7-arm.patch create mode 100644 libtirpc-0.1.7-bindresvport-ntohs.patch create mode 100644 libtirpc-0.1.7-bindresvport_ports.patch create mode 100644 libtirpc-0.1.7-bufoverflow.patch create mode 100644 libtirpc-0.1.7-clnt_raw-mutex.patch create mode 100644 libtirpc-0.1.7-dgcall-iprecverr.patch create mode 100644 libtirpc-0.1.7-gssglue.patch create mode 100644 libtirpc-0.1.7-libtirpc-pc.patch create mode 100644 libtirpc-0.1.7-man-install.patch create mode 100644 libtirpc-0.1.7-netconfig.patch create mode 100644 libtirpc-0.1.7-overflow_fix.patch create mode 100644 libtirpc-0.1.7-ppc64.patch create mode 100644 libtirpc-0.1.7-snprintf.patch create mode 100644 libtirpc-0.1.7-svc-rtaddr.patch create mode 100644 libtirpc-0.1.7-svc-run.patch create mode 100644 libtirpc-0.1.7-svc_auth_gss_lvalue_fix.patch create mode 100644 libtirpc-0.1.7-svcauthdestroy.patch create mode 100644 libtirpc-0.1.7-svcauthnone.patch create mode 100644 libtirpc-0.1.7-use_sysconfdir.patch create mode 100644 libtirpc-0.1.7-version.patch create mode 100644 libtirpc-0.1.7-xdr_bufferoverlow.patch create mode 100644 libtirpc-0.1.7.tar.bz2 create mode 100644 libtirpc.changes create mode 100644 libtirpc.spec create mode 100644 ready diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/libtirpc-0.1.7-arm.patch b/libtirpc-0.1.7-arm.patch new file mode 100644 index 0000000..61ea3ce --- /dev/null +++ b/libtirpc-0.1.7-arm.patch @@ -0,0 +1,23 @@ +commit 3f947c093f828629c2fc5624aa3ad8c7465f76d1 +Author: Steve Dickson +Date: Thu Oct 25 10:55:57 2007 -0400 + + Added " || defined(__arm__)" to xdr_float.c which allows libtirpc + to build on ARM processors. + + Author-by: Lennert Buytenhek + Signed-off-by: Steve Dickson + +diff --git a/src/xdr_float.c b/src/xdr_float.c +index 375e535..d8b22e6 100644 +--- a/src/xdr_float.c ++++ b/src/xdr_float.c +@@ -59,7 +59,7 @@ + defined(__mips__) || defined(__ns32k__) || defined(__alpha__) || \ + defined(__arm32__) || defined(__ppc__) || defined(__ia64__) || \ + defined(__arm26__) || defined(__sparc64__) || defined(__amd64__) || \ +- defined(__powerpc__) || defined(__s390__) ++ defined(__powerpc__) || defined(__s390__) || defined(__arm__) + #include + #define IEEEFP + #endif diff --git a/libtirpc-0.1.7-bindresvport-ntohs.patch b/libtirpc-0.1.7-bindresvport-ntohs.patch new file mode 100644 index 0000000..e6da731 --- /dev/null +++ b/libtirpc-0.1.7-bindresvport-ntohs.patch @@ -0,0 +1,29 @@ +commit 83cb8b02f87fe6fd7bbd903e4825f7cb38e59ec4 +Author: Steve Dickson +Date: Fri May 4 12:19:27 2007 -0400 + + A couple ntohs() were needed in bindresvport_sa() + + Signed-off-by: Steve Dickson + +diff --git a/src/bindresvport.c b/src/bindresvport.c +index bc75d29..6aac03c 100644 +--- a/src/bindresvport.c ++++ b/src/bindresvport.c +@@ -101,14 +101,14 @@ bindresvport_sa(sd, sa) + case AF_INET: + sin = (struct sockaddr_in *)sa; + salen = sizeof(struct sockaddr_in); +- port = sin->sin_port; ++ port = ntohs(sin->sin_port); + portp = &sin->sin_port; + break; + #ifdef INET6 + case AF_INET6: + sin6 = (struct sockaddr_in6 *)sa; + salen = sizeof(struct sockaddr_in6); +- port = sin6->sin6_port; ++ port = ntohs(sin6->sin6_port); + portp = &sin6->sin6_port; + break; + #endif diff --git a/libtirpc-0.1.7-bindresvport_ports.patch b/libtirpc-0.1.7-bindresvport_ports.patch new file mode 100644 index 0000000..e104472 --- /dev/null +++ b/libtirpc-0.1.7-bindresvport_ports.patch @@ -0,0 +1,64 @@ +commit c254b435007ebd4ed471737198975d5ccf4e7949 +Author: Steve Dickson +Date: Thu Apr 26 17:20:21 2007 -0400 + + Added a optimization to bindresvport that allows more + ports to be tried. + + Signed-off-by: Steve Dickson + +diff --git a/src/bindresvport.c b/src/bindresvport.c +index b197efa..bc75d29 100644 +--- a/src/bindresvport.c ++++ b/src/bindresvport.c +@@ -62,6 +62,7 @@ bindresvport(sd, sin) + #ifdef __linux__ + + #define STARTPORT 600 ++#define LOWPORT 512 + #define ENDPORT (IPPORT_RESERVED - 1) + #define NPORTS (ENDPORT - STARTPORT + 1) + +@@ -76,10 +77,13 @@ bindresvport_sa(sd, sa) + #ifdef INET6 + struct sockaddr_in6 *sin6; + #endif +- u_int16_t port; + u_int16_t *portp; ++ static u_int16_t port; ++ static short startport = STARTPORT; + socklen_t salen; +- int i; ++ int nports = ENDPORT - startport + 1; ++ int endport = ENDPORT; ++ int i; + + if (sa == NULL) { + salen = sizeof(myaddr); +@@ -119,13 +123,22 @@ bindresvport_sa(sd, sa) + } + res = -1; + errno = EADDRINUSE; +- for (i = 0; i < NPORTS && res < 0 && errno == EADDRINUSE; i++) { ++ again: ++ for (i = 0; i < nports; ++i) { + *portp = htons(port++); +- if (port > ENDPORT) { +- port = STARTPORT; +- } ++ if (port > endport) ++ port = startport; + res = bind(sd, sa, salen); ++ if (res >= 0 || errno != EADDRINUSE) ++ break; + } ++ if (i == nports && startport != LOWPORT) { ++ startport = LOWPORT; ++ endport = STARTPORT - 1; ++ nports = STARTPORT - LOWPORT; ++ port = LOWPORT + port % (STARTPORT - LOWPORT); ++ goto again; ++ } + return (res); + } + #else diff --git a/libtirpc-0.1.7-bufoverflow.patch b/libtirpc-0.1.7-bufoverflow.patch new file mode 100644 index 0000000..3a15166 --- /dev/null +++ b/libtirpc-0.1.7-bufoverflow.patch @@ -0,0 +1,35 @@ +commit 3cf1a3ce1a409e647f9b8ca4497c26e6d066f293 +Author: Steve Dickson +Date: Thu Jan 24 15:01:22 2008 -0500 + + Protect from buffer overflow in the GSS code. + + Signed-off-by: Steve Dickson + +diff -up libtirpc-0.1.7/src/svc_auth_gss.c.orig libtirpc-0.1.7/src/svc_auth_gss.c +--- libtirpc-0.1.7/src/svc_auth_gss.c.orig 2008-01-24 14:41:21.000000000 -0500 ++++ libtirpc-0.1.7/src/svc_auth_gss.c 2008-01-24 14:59:31.000000000 -0500 +@@ -294,6 +294,15 @@ svcauth_gss_validate(struct svc_rpc_gss_ + memset(rpchdr, 0, sizeof(rpchdr)); + + /* XXX - Reconstruct RPC header for signing (from xdr_callmsg). */ ++ oa = &msg->rm_call.cb_cred; ++ if (oa->oa_length > MAX_AUTH_BYTES) ++ return (FALSE); ++ ++ /* 8 XDR units from the IXDR macro calls. */ ++ if (sizeof(rpchdr) < (8 * BYTES_PER_XDR_UNIT + ++ RNDUP(oa->oa_length))) ++ return (FALSE); ++ + buf = (int32_t *)rpchdr; + IXDR_PUT_LONG(buf, msg->rm_xid); + IXDR_PUT_ENUM(buf, msg->rm_direction); +@@ -301,7 +310,6 @@ svcauth_gss_validate(struct svc_rpc_gss_ + IXDR_PUT_LONG(buf, msg->rm_call.cb_prog); + IXDR_PUT_LONG(buf, msg->rm_call.cb_vers); + IXDR_PUT_LONG(buf, msg->rm_call.cb_proc); +- oa = &msg->rm_call.cb_cred; + IXDR_PUT_ENUM(buf, oa->oa_flavor); + IXDR_PUT_LONG(buf, oa->oa_length); + if (oa->oa_length) { diff --git a/libtirpc-0.1.7-clnt_raw-mutex.patch b/libtirpc-0.1.7-clnt_raw-mutex.patch new file mode 100644 index 0000000..0b3582f --- /dev/null +++ b/libtirpc-0.1.7-clnt_raw-mutex.patch @@ -0,0 +1,39 @@ +commit 419d35db75ab8bd8f79c424f529a6c2f7c4f5fa7 +Author: Steve Dickson +Date: Fri May 4 09:27:00 2007 -0400 + + Fixed mutex locking problem in clnt_raw.c. One should grab the + clntraw_lock before accessing at clntraw_private, not after. + + Signed-off-by: Steve Dickson + +Index: libtirpc-0.1.7/src/clnt_raw.c +=================================================================== +--- libtirpc-0.1.7.orig/src/clnt_raw.c ++++ libtirpc-0.1.7/src/clnt_raw.c +@@ -82,12 +82,13 @@ clnt_raw_create(prog, vers) + rpcprog_t prog; + rpcvers_t vers; + { +- struct clntraw_private *clp = clntraw_private; ++ struct clntraw_private *clp; + struct rpc_msg call_msg; +- XDR *xdrs = &clp->xdr_stream; +- CLIENT *client = &clp->client_object; ++ XDR *xdrs; ++ CLIENT *client; + + mutex_lock(&clntraw_lock); ++ clp = clntraw_private; + if (clp == NULL) { + clp = (struct clntraw_private *)calloc(1, sizeof (*clp)); + if (clp == NULL) { +@@ -100,6 +101,8 @@ clnt_raw_create(prog, vers) + clp->_raw_buf = __rpc_rawcombuf; + clntraw_private = clp; + } ++ xdrs = &clp->xdr_stream; ++ client = &clp->client_object; + /* + * pre-serialize the static part of the call msg and stash it away + */ diff --git a/libtirpc-0.1.7-dgcall-iprecverr.patch b/libtirpc-0.1.7-dgcall-iprecverr.patch new file mode 100644 index 0000000..59e9737 --- /dev/null +++ b/libtirpc-0.1.7-dgcall-iprecverr.patch @@ -0,0 +1,98 @@ +commit 40ab0c28e995786d5844bd490a31b788ecabf546 +Author: Steve Dickson +Date: Fri May 4 14:26:56 2007 -0400 + + Added IP_RECVERR processing with to clnt_dg_call() so + application will see errors instead of timing out + + Signed-off-by: Steve Dickson + +diff --git a/src/clnt_dg.c b/src/clnt_dg.c +index 151b449..0e35742 100644 +--- a/src/clnt_dg.c ++++ b/src/clnt_dg.c +@@ -55,6 +55,13 @@ + #include + #include "rpc_com.h" + ++#ifdef IP_RECVERR ++#include ++#include ++#include ++#endif ++ ++ + #define MAX_DEFAULT_FDS 20000 + + static struct clnt_ops *clnt_dg_ops(void); +@@ -246,6 +253,12 @@ clnt_dg_create(fd, svcaddr, program, version, sendsz, recvsz) + #if 0 + (void)bindresvport_sa(fd, (struct sockaddr *)svcaddr->buf); + #endif ++#ifdef IP_RECVERR ++ { ++ int on = 1; ++ setsockopt(fd, SOL_IP, IP_RECVERR, &on, sizeof(on)); ++ } ++#endif + ioctl(fd, FIONBIO, (char *)(void *)&one); + /* + * By default, closeit is always FALSE. It is users responsibility +@@ -352,7 +365,7 @@ call_again: + xid++; + *(u_int32_t *)(void *)(cu->cu_outbuf) = htonl(xid); + +- if ((! XDR_PUTINT32(xdrs, &proc)) || ++ if ((! XDR_PUTINT32(xdrs, (int32_t *)&proc)) || + (! AUTH_MARSHALL(cl->cl_auth, xdrs)) || + (! (*xargs)(xdrs, argsp))) { + cu->cu_error.re_status = RPC_CANTENCODEARGS; +@@ -404,6 +417,48 @@ get_reply: + } + break; + } ++#ifdef IP_RECVERR ++ if (fd.revents & POLLERR) ++ { ++ struct msghdr msg; ++ struct cmsghdr *cmsg; ++ struct sock_extended_err *e; ++ struct sockaddr_in err_addr; ++ struct sockaddr_in *sin = (struct sockaddr_in *)&cu->cu_raddr; ++ struct iovec iov; ++ char *cbuf = (char *) alloca (outlen + 256); ++ int ret; ++ ++ iov.iov_base = cbuf + 256; ++ iov.iov_len = outlen; ++ msg.msg_name = (void *) &err_addr; ++ msg.msg_namelen = sizeof (err_addr); ++ msg.msg_iov = &iov; ++ msg.msg_iovlen = 1; ++ msg.msg_flags = 0; ++ msg.msg_control = cbuf; ++ msg.msg_controllen = 256; ++ ret = recvmsg (cu->cu_fd, &msg, MSG_ERRQUEUE); ++ if (ret >= 0 ++ && memcmp (cbuf + 256, cu->cu_outbuf, ret) == 0 ++ && (msg.msg_flags & MSG_ERRQUEUE) ++ && ((msg.msg_namelen == 0 ++ && ret >= 12) ++ || (msg.msg_namelen == sizeof (err_addr) ++ && err_addr.sin_family == AF_INET ++ && memcmp (&err_addr.sin_addr, &sin->sin_addr, ++ sizeof (err_addr.sin_addr)) == 0 ++ && err_addr.sin_port == sin->sin_port))) ++ for (cmsg = CMSG_FIRSTHDR (&msg); cmsg; ++ cmsg = CMSG_NXTHDR (&msg, cmsg)) ++ if (cmsg->cmsg_level == SOL_IP && cmsg->cmsg_type == IP_RECVERR) ++ { ++ e = (struct sock_extended_err *) CMSG_DATA(cmsg); ++ cu->cu_error.re_errno = e->ee_errno; ++ return (cu->cu_error.re_status = RPC_CANTRECV); ++ } ++ } ++#endif + + /* We have some data now */ + do { diff --git a/libtirpc-0.1.7-gssglue.patch b/libtirpc-0.1.7-gssglue.patch new file mode 100644 index 0000000..29f7d84 --- /dev/null +++ b/libtirpc-0.1.7-gssglue.patch @@ -0,0 +1,28 @@ +diff -up libtirpc-0.1.7/configure.in.orig libtirpc-0.1.7/configure.in +--- libtirpc-0.1.7/configure.in.orig 2007-10-17 12:03:25.000000000 -0400 ++++ libtirpc-0.1.7/configure.in 2007-10-17 12:07:18.000000000 -0400 +@@ -10,6 +10,10 @@ AC_ARG_ENABLE(gss,[ --enable-gss + *) AC_MSG_ERROR(bad value ${enableval} for --enable-gss) ;; + esac],[gss=false]) + AM_CONDITIONAL(GSS, test x$gss = xtrue) ++if test x$gss = xtrue; then ++ PKG_CHECK_MODULES(GSSGLUE, libgssglue, [], ++ AC_MSG_ERROR([Unable to locate information required to use libgssglue.])) ++fi + + + AC_PROG_CC +diff -up libtirpc-0.1.7/src/Makefile.am.orig libtirpc-0.1.7/src/Makefile.am +--- libtirpc-0.1.7/src/Makefile.am.orig 2007-10-17 12:03:25.000000000 -0400 ++++ libtirpc-0.1.7/src/Makefile.am 2007-10-17 12:06:19.000000000 -0400 +@@ -29,8 +29,8 @@ libtirpc_la_SOURCES += xdr.c xdr_rec.c x + ## Secure-RPC + if GSS + libtirpc_la_SOURCES += auth_gss.c authgss_prot.c svc_auth_gss.c +- libtirpc_la_LDFLAGS += -lgssapi +- libtirpc_la_CFLAGS = -DHAVE_RPCSEC_GSS ++ libtirpc_la_LDFLAGS += $(GSSGLUE_LIBS) ++ libtirpc_la_CFLAGS = -DHAVE_RPCSEC_GSS -I/usr/include/gssglue $(GSSGLUE_LIBS) + endif + + ## libtirpc_a_SOURCES += key_call.c key_prot_xdr.c getpublickey.c diff --git a/libtirpc-0.1.7-libtirpc-pc.patch b/libtirpc-0.1.7-libtirpc-pc.patch new file mode 100644 index 0000000..60a8b0c --- /dev/null +++ b/libtirpc-0.1.7-libtirpc-pc.patch @@ -0,0 +1,51 @@ +commit 4d77b479511a27fb52b54811020176bb32099444 +Author: Steve Dickson +Date: Mon Feb 18 17:30:46 2008 -0500 + + Added that libtirpc.pc.in that will create + the /usr/lib/pkgconfig/libtirpc.pc file that is + used by the pkg-config(1) command + + Signed-off-by: Steve Dickson + +diff --git a/Makefile.am b/Makefile.am +index 1a212e8..4e1503c 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -43,6 +43,9 @@ nobase_include_HEADERS = tirpc/un-namespace.h \ + tirpc/rpc/auth_gss.h \ + tirpc/rpc/auth_des.h + ++pkgconfigdir=$(libdir)/pkgconfig ++pkgconfig_DATA = libtirpc.pc ++ + install-exec-local: + cp -p ./doc/etc_netconfig /etc/netconfig + chmod 0644 /etc/netconfig +diff --git a/configure.in b/configure.in +index dc597dd..e907c31 100644 +--- a/configure.in ++++ b/configure.in +@@ -27,4 +27,4 @@ AC_CHECK_LIB([pthread], [pthread_create]) + + + AC_CONFIG_FILES([Makefile src/Makefile]) +-AC_OUTPUT() ++AC_OUTPUT(libtirpc.pc) +diff --git a/libtirpc.pc.in b/libtirpc.pc.in +new file mode 100644 +index 0000000..df9e7ed +--- /dev/null ++++ b/libtirpc.pc.in +@@ -0,0 +1,11 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: libtirpc ++Description: Transport Independent RPC Library ++Requires: ++Version: @PACKAGE_VERSION@ ++Libs: -L@libdir@ -ltirpc ++Cflags: -I@includedir@/tirpc diff --git a/libtirpc-0.1.7-man-install.patch b/libtirpc-0.1.7-man-install.patch new file mode 100644 index 0000000..8bec012 --- /dev/null +++ b/libtirpc-0.1.7-man-install.patch @@ -0,0 +1,35 @@ +Index: libtirpc-0.1.7/man/Makefile.am +=================================================================== +--- /dev/null ++++ libtirpc-0.1.7/man/Makefile.am +@@ -0,0 +1,9 @@ ++ ++man5_MANS = netconfig.5 ++man3_MANS = bindresvport.3t des_crypt.3t getnetconfig.3t getnetpath.3t \ ++ getrpcent.3t getrpcport.3t rpc.3t rpc_clnt_auth.3t rpc_clnt_calls.3t \ ++ rpc_clnt_create.3t rpc_secure.3t rpc_soc.3t rpc_svc_calls.3t \ ++ rpc_svc_create.3t rpc_svc_err.3t rpc_svc_reg.3t rpc_xdr.3t rtime.3t ++ ++EXTRA_DIST = $(man5_MANS) $(man3_MANS) ++ +Index: libtirpc-0.1.7/configure.in +=================================================================== +--- libtirpc-0.1.7.orig/configure.in ++++ libtirpc-0.1.7/configure.in +@@ -26,5 +26,5 @@ AC_CHECK_HEADERS([arpa/inet.h fcntl.h li + AC_CHECK_LIB([pthread], [pthread_create]) + + +-AC_CONFIG_FILES([Makefile src/Makefile]) ++AC_CONFIG_FILES([Makefile src/Makefile man/Makefile]) + AC_OUTPUT(libtirpc.pc) +Index: libtirpc-0.1.7/Makefile.am +=================================================================== +--- libtirpc-0.1.7.orig/Makefile.am ++++ libtirpc-0.1.7/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = src ++SUBDIRS = src man + + nobase_include_HEADERS = tirpc/un-namespace.h \ + tirpc/spinlock.h \ diff --git a/libtirpc-0.1.7-netconfig.patch b/libtirpc-0.1.7-netconfig.patch new file mode 100644 index 0000000..88a74dc --- /dev/null +++ b/libtirpc-0.1.7-netconfig.patch @@ -0,0 +1,15 @@ +--- libtirpc-0.1.7/doc/etc_netconfig.orig 2005-05-18 01:10:50.000000000 -0400 ++++ libtirpc-0.1.7/doc/etc_netconfig 2007-07-24 09:45:40.000000000 -0400 +@@ -10,10 +10,10 @@ + # The and fields are always empty in this + # implementation. + # +-#udp6 tpi_clts v inet6 udp - - +-#tcp6 tpi_cots_ord v inet6 tcp - - + udp tpi_clts v inet udp - - + tcp tpi_cots_ord v inet tcp - - ++udp6 tpi_clts - inet6 udp6 - - ++tcp6 tpi_cots_ord - inet6 tcp6 - - + rawip tpi_raw - inet - - - + local tpi_cots_ord - loopback - - - + unix tpi_cots_ord - loopback - - - diff --git a/libtirpc-0.1.7-overflow_fix.patch b/libtirpc-0.1.7-overflow_fix.patch new file mode 100644 index 0000000..08d771f --- /dev/null +++ b/libtirpc-0.1.7-overflow_fix.patch @@ -0,0 +1,13 @@ +Index: libtirpc-0.1.7/src/svc_vc.c +=================================================================== +--- libtirpc-0.1.7.orig/src/svc_vc.c ++++ libtirpc-0.1.7/src/svc_vc.c +@@ -231,7 +231,7 @@ svc_fd_create(fd, sendsize, recvsize) + if (ss.ss_family == AF_INET) { + map_ipv4_to_ipv6((struct sockaddr_in *)&ss, &sin6); + } else { +- memcpy(&sin6, &ss, sizeof(ss)); ++ memcpy(&sin6, &ss, sizeof(sin6)); + } + ret->xp_rtaddr.maxlen = ret->xp_rtaddr.len = sizeof(ss); + ret->xp_rtaddr.buf = mem_alloc((size_t)sizeof(ss)); diff --git a/libtirpc-0.1.7-ppc64.patch b/libtirpc-0.1.7-ppc64.patch new file mode 100644 index 0000000..df8d6d4 --- /dev/null +++ b/libtirpc-0.1.7-ppc64.patch @@ -0,0 +1,12 @@ +--- libtirpc-0.1.7/src/xdr_float.c.orig 2005-05-18 01:10:50.000000000 -0400 ++++ libtirpc-0.1.7/src/xdr_float.c 2006-08-16 08:41:43.000000000 -0400 +@@ -58,7 +58,8 @@ + #if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \ + defined(__mips__) || defined(__ns32k__) || defined(__alpha__) || \ + defined(__arm32__) || defined(__ppc__) || defined(__ia64__) || \ +- defined(__arm26__) || defined(__sparc64__) || defined(__amd64__) ++ defined(__arm26__) || defined(__sparc64__) || defined(__amd64__) || \ ++ defined(__powerpc__) || defined(__s390__) + #include + #define IEEEFP + #endif diff --git a/libtirpc-0.1.7-snprintf.patch b/libtirpc-0.1.7-snprintf.patch new file mode 100644 index 0000000..74d8f81 --- /dev/null +++ b/libtirpc-0.1.7-snprintf.patch @@ -0,0 +1,150 @@ +commit a3a3a4e5157932c254200e3b31a78739f5878071 +Author: Steve Dickson +Date: Fri May 4 11:27:43 2007 -0400 + + Ignore the return value of snprintf() and use strlen() instead + to bump the pointer in clnt_sperror() + + Also removed calls to assert(), not needed. + + Signed-off-by: Steve Dickson + +diff --git a/src/clnt_perror.c b/src/clnt_perror.c +index e46d95f..8f53f8e 100644 +--- a/src/clnt_perror.c ++++ b/src/clnt_perror.c +@@ -36,7 +36,6 @@ + * Copyright (C) 1984, Sun Microsystems, Inc. + * + */ +-#include + #include + #include + #include +@@ -75,8 +74,8 @@ clnt_sperror(rpch, s) + char *strstart; + size_t len, i; + +- assert(rpch != NULL); +- assert(s != NULL); ++ if (rpch == NULL || s == NULL) ++ return(0); + + str = _buf(); /* side effect: sets CLNT_PERROR_BUFLEN */ + if (str == 0) +@@ -85,7 +84,8 @@ clnt_sperror(rpch, s) + strstart = str; + CLNT_GETERR(rpch, &e); + +- if ((i = snprintf(str, len, "%s: ", s)) > 0) { ++ if (snprintf(str, len, "%s: ", s) > 0) { ++ i = strlen(str); + str += i; + len -= i; + } +@@ -113,7 +113,8 @@ clnt_sperror(rpch, s) + + case RPC_CANTSEND: + case RPC_CANTRECV: +- i = snprintf(str, len, "; errno = %s", strerror(e.re_errno)); ++ snprintf(str, len, "; errno = %s", strerror(e.re_errno)); ++ i = strlen(str); + if (i > 0) { + str += i; + len -= i; +@@ -121,8 +122,9 @@ clnt_sperror(rpch, s) + break; + + case RPC_VERSMISMATCH: +- i = snprintf(str, len, "; low version = %u, high version = %u", ++ snprintf(str, len, "; low version = %u, high version = %u", + e.re_vers.low, e.re_vers.high); ++ i = strlen(str); + if (i > 0) { + str += i; + len -= i; +@@ -131,18 +133,20 @@ clnt_sperror(rpch, s) + + case RPC_AUTHERROR: + err = auth_errmsg(e.re_why); +- i = snprintf(str, len, "; why = "); ++ snprintf(str, len, "; why = "); ++ i = strlen(str); + if (i > 0) { + str += i; + len -= i; + } + if (err != NULL) { +- i = snprintf(str, len, "%s",err); ++ snprintf(str, len, "%s",err); + } else { +- i = snprintf(str, len, ++ snprintf(str, len, + "(unknown authentication error - %d)", + (int) e.re_why); + } ++ i = strlen(str); + if (i > 0) { + str += i; + len -= i; +@@ -150,8 +154,9 @@ clnt_sperror(rpch, s) + break; + + case RPC_PROGVERSMISMATCH: +- i = snprintf(str, len, "; low version = %u, high version = %u", ++ snprintf(str, len, "; low version = %u, high version = %u", + e.re_vers.low, e.re_vers.high); ++ i = strlen(str); + if (i > 0) { + str += i; + len -= i; +@@ -159,8 +164,9 @@ clnt_sperror(rpch, s) + break; + + default: /* unknown */ +- i = snprintf(str, len, "; s1 = %u, s2 = %u", ++ snprintf(str, len, "; s1 = %u, s2 = %u", + e.re_lb.s1, e.re_lb.s2); ++ i = strlen(str); + if (i > 0) { + str += i; + len -= i; +@@ -177,8 +183,8 @@ clnt_perror(rpch, s) + const char *s; + { + +- assert(rpch != NULL); +- assert(s != NULL); ++ if (rpch == NULL || s == NULL) ++ return; + + (void) fprintf(stderr, "%s\n", clnt_sperror(rpch,s)); + } +@@ -236,13 +242,15 @@ clnt_spcreateerror(s) + char *str; + size_t len, i; + +- assert(s != NULL); ++ if (s == NULL) ++ return(0); + + str = _buf(); /* side effect: sets CLNT_PERROR_BUFLEN */ + if (str == 0) + return(0); + len = CLNT_PERROR_BUFLEN; +- i = snprintf(str, len, "%s: ", s); ++ snprintf(str, len, "%s: ", s); ++ i = strlen(str); + if (i > 0) + len -= i; + (void)strncat(str, clnt_sperrno(rpc_createerr.cf_stat), len - 1); +@@ -287,7 +295,8 @@ clnt_pcreateerror(s) + const char *s; + { + +- assert(s != NULL); ++ if (s == NULL) ++ return; + + (void) fprintf(stderr, "%s\n", clnt_spcreateerror(s)); + } diff --git a/libtirpc-0.1.7-svc-rtaddr.patch b/libtirpc-0.1.7-svc-rtaddr.patch new file mode 100644 index 0000000..c9bab13 --- /dev/null +++ b/libtirpc-0.1.7-svc-rtaddr.patch @@ -0,0 +1,52 @@ +commit f8ff8f0de33606ff544dc87c0a9993fd3a0f5475 +Author: Steve Dickson +Date: Mon Jul 30 07:26:45 2007 -0400 + + - Make sure remote address (xp_rtaddr) is populated + with the correct type of address. + + Signed-off-by: Steve Dickson + +diff --git a/src/svc_vc.c b/src/svc_vc.c +index 48494e1..3d77aef 100644 +--- a/src/svc_vc.c ++++ b/src/svc_vc.c +@@ -239,7 +239,10 @@ svc_fd_create(fd, sendsize, recvsize) + warnx("svc_fd_create: no mem for local addr"); + goto freedata; + } +- memcpy(ret->xp_rtaddr.buf, &sin6, (size_t)sizeof(ss)); ++ if (ss.ss_family == AF_INET) ++ memcpy(ret->xp_rtaddr.buf, &ss, (size_t)sizeof(ss)); ++ else ++ memcpy(ret->xp_rtaddr.buf, &sin6, (size_t)sizeof(ss)); + #ifdef PORTMAP + if (sin6.sin6_family == AF_INET6 || sin6.sin6_family == AF_LOCAL) { + memcpy(&ret->xp_raddr, ret->xp_rtaddr.buf, +@@ -343,20 +346,23 @@ again: + newxprt = makefd_xprt(sock, r->sendsize, r->recvsize); + if (addr.ss_family == AF_INET) { + map_ipv4_to_ipv6((struct sockaddr_in *)&addr, &sin6); +- len = sizeof(struct sockaddr_in6); + } else { + memcpy(&sin6, &addr, len); + } + newxprt->xp_rtaddr.buf = mem_alloc(len); + if (newxprt->xp_rtaddr.buf == NULL) + return (FALSE); +- memcpy(newxprt->xp_rtaddr.buf, &sin6, len); ++ ++ if (addr.ss_family == AF_INET) ++ memcpy(newxprt->xp_rtaddr.buf, &addr, len); ++ else ++ memcpy(newxprt->xp_rtaddr.buf, &sin6, len); + newxprt->xp_rtaddr.maxlen = newxprt->xp_rtaddr.len = len; + #ifdef PORTMAP + if (sin6.sin6_family == AF_INET6 || sin6.sin6_family == AF_LOCAL) { + memcpy(&newxprt->xp_raddr, newxprt->xp_rtaddr.buf, + sizeof(struct sockaddr_in6)); +- newxprt->xp_addrlen = len; ++ newxprt->xp_addrlen = sizeof(struct sockaddr_in6); + } + #endif /* PORTMAP */ + if (__rpc_fd2sockinfo(sock, &si) && si.si_proto == IPPROTO_TCP) { diff --git a/libtirpc-0.1.7-svc-run.patch b/libtirpc-0.1.7-svc-run.patch new file mode 100644 index 0000000..40fff40 --- /dev/null +++ b/libtirpc-0.1.7-svc-run.patch @@ -0,0 +1,19 @@ +--- libtirpc-0.1.7/src/svc_run.c.orig 2005-05-18 01:10:50.000000000 -0400 ++++ libtirpc-0.1.7/src/svc_run.c 2007-07-09 12:52:23.000000000 -0400 +@@ -51,14 +51,14 @@ svc_run() + struct timeval timeout; + extern rwlock_t svc_fd_lock; + +- timeout.tv_sec = 30; +- timeout.tv_usec = 0; + + for (;;) { + rwlock_rdlock(&svc_fd_lock); + readfds = svc_fdset; + cleanfds = svc_fdset; + rwlock_unlock(&svc_fd_lock); ++ timeout.tv_sec = 30; ++ timeout.tv_usec = 0; + switch (select(svc_maxfd+1, &readfds, NULL, NULL, &timeout)) { + case -1: + FD_ZERO(&readfds); diff --git a/libtirpc-0.1.7-svc_auth_gss_lvalue_fix.patch b/libtirpc-0.1.7-svc_auth_gss_lvalue_fix.patch new file mode 100644 index 0000000..4eafb9d --- /dev/null +++ b/libtirpc-0.1.7-svc_auth_gss_lvalue_fix.patch @@ -0,0 +1,13 @@ +Index: libtirpc-0.1.7/src/svc_auth_gss.c +=================================================================== +--- libtirpc-0.1.7.orig/src/svc_auth_gss.c ++++ libtirpc-0.1.7/src/svc_auth_gss.c +@@ -390,7 +390,7 @@ _svcauth_gss(struct svc_req *rqst, struc + return (AUTH_FAILED); + } + auth->svc_ah_ops = &svc_auth_gss_ops; +- SVCAUTH_PRIVATE(auth) = gd; ++ auth->svc_ah_private = gd; + rqst->rq_xprt->xp_auth = auth; + } + else gd = SVCAUTH_PRIVATE(rqst->rq_xprt->xp_auth); diff --git a/libtirpc-0.1.7-svcauthdestroy.patch b/libtirpc-0.1.7-svcauthdestroy.patch new file mode 100644 index 0000000..337f69d --- /dev/null +++ b/libtirpc-0.1.7-svcauthdestroy.patch @@ -0,0 +1,12 @@ +--- libtirpc-0.1.7/tirpc/rpc/svc_auth.h.orig 2005-05-18 01:10:51.000000000 -0400 ++++ libtirpc-0.1.7/tirpc/rpc/svc_auth.h 2006-08-28 08:13:37.801283000 -0400 +@@ -54,6 +54,9 @@ + caddr_t svc_ah_private; + } SVCAUTH; + ++#define SVCAUTH_DESTROY(cred) ((*(cred)->svc_ah_ops->svc_ah_destroy)()) ++#define svcauth_destroy(cred) ((*(cred)->svc_ah_ops->svc_ah_destroy)()) ++ + /* + * Server side authenticator + */ diff --git a/libtirpc-0.1.7-svcauthnone.patch b/libtirpc-0.1.7-svcauthnone.patch new file mode 100644 index 0000000..82a4d81 --- /dev/null +++ b/libtirpc-0.1.7-svcauthnone.patch @@ -0,0 +1,101 @@ +Index: libtirpc-0.1.7/src/svc_auth_none.c +=================================================================== +--- /dev/null ++++ libtirpc-0.1.7/src/svc_auth_none.c +@@ -0,0 +1,73 @@ ++/* ++ svc_auth_none.c ++ ++ Copyright (c) 2000 The Regents of the University of Michigan. ++ All rights reserved. ++ ++ Copyright (c) 2000 Dug Song . ++ All rights reserved, all wrongs reversed. ++ ++ Redistribution and use in source and binary forms, with or without ++ modification, are permitted provided that the following conditions ++ are met: ++ ++ 1. Redistributions of source code must retain the above copyright ++ notice, this list of conditions and the following disclaimer. ++ 2. 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. ++ 3. Neither the name of the University 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 ``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 REGENTS 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. ++ ++ $Id: svc_auth_none.c,v 1.1 2004/10/22 17:24:30 bfields Exp $ ++ */ ++ ++#include ++ ++static bool_t svcauth_none_destroy(); ++static bool_t svcauth_none_wrap(); ++ ++struct svc_auth_ops svc_auth_none_ops = { ++ svcauth_none_wrap, ++ svcauth_none_wrap, ++ svcauth_none_destroy ++}; ++ ++SVCAUTH svc_auth_none = { ++ &svc_auth_none_ops, ++ NULL, ++}; ++ ++static bool_t ++svcauth_none_destroy(SVCAUTH *auth) ++{ ++ return (TRUE); ++} ++ ++static bool_t ++svcauth_none_wrap(SVCAUTH *auth, XDR *xdrs, xdrproc_t xdr_func, ++ caddr_t xdr_ptr) ++{ ++ return ((*xdr_func)(xdrs, xdr_ptr)); ++} ++ ++enum auth_stat ++_svcauth_none(struct svc_req *rqst, struct rpc_msg *msg) ++{ ++ rqst->rq_xprt->xp_auth = &svc_auth_none; ++ ++ return (AUTH_OK); ++} +Index: libtirpc-0.1.7/src/Makefile.am +=================================================================== +--- libtirpc-0.1.7.orig/src/Makefile.am ++++ libtirpc-0.1.7/src/Makefile.am +@@ -28,7 +28,8 @@ libtirpc_la_SOURCES += xdr.c xdr_rec.c x + + ## Secure-RPC + if GSS +- libtirpc_la_SOURCES += auth_gss.c authgss_prot.c svc_auth_gss.c ++ libtirpc_la_SOURCES += auth_gss.c authgss_prot.c svc_auth_gss.c \ ++ svc_auth_none.c + libtirpc_la_LDFLAGS += $(GSSGLUE_LIBS) + libtirpc_la_CFLAGS = -DHAVE_RPCSEC_GSS -I/usr/include/gssglue $(GSSGLUE_LIBS) + endif +@@ -49,7 +50,7 @@ $(libtirpc_la_OBJECTS) :auth_none.c auth + svc_raw.c svc_run.c svc_simple.c svc_vc.c \ + xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c \ + auth_gss.c authgss_prot.c svc_auth_gss.c getpeereid.c \ +- auth_time.c auth_des.c authdes_prot.c ++ auth_time.c auth_des.c authdes_prot.c svc_auth_none.c + + else + $(libtirpc_la_OBJECTS) :auth_none.c auth_unix.c authunix_prot.c bindresvport.c clnt_bcast.c \ diff --git a/libtirpc-0.1.7-use_sysconfdir.patch b/libtirpc-0.1.7-use_sysconfdir.patch new file mode 100644 index 0000000..ca5e8ea --- /dev/null +++ b/libtirpc-0.1.7-use_sysconfdir.patch @@ -0,0 +1,13 @@ +Index: libtirpc-0.1.7/Makefile.am +=================================================================== +--- libtirpc-0.1.7.orig/Makefile.am ++++ libtirpc-0.1.7/Makefile.am +@@ -44,5 +44,6 @@ nobase_include_HEADERS = tirpc/un-namesp + tirpc/rpc/auth_des.h + + install-exec-local: +- cp -p ./doc/etc_netconfig /etc/netconfig +- chmod 0644 /etc/netconfig ++ mkdir -p $(DESTDIR)$(sysconfdir) ++ cp -p ./doc/etc_netconfig $(DESTDIR)$(sysconfdir)/netconfig ++ chmod 0644 $(DESTDIR)$(sysconfdir)/netconfig diff --git a/libtirpc-0.1.7-version.patch b/libtirpc-0.1.7-version.patch new file mode 100644 index 0000000..74b6738 --- /dev/null +++ b/libtirpc-0.1.7-version.patch @@ -0,0 +1,26 @@ +Index: libtirpc-0.1.7/configure.in +=================================================================== +--- libtirpc-0.1.7.orig/configure.in ++++ libtirpc-0.1.7/configure.in +@@ -1,6 +1,6 @@ + +-AC_INIT(libtirpc, 0.1.5) +-AM_INIT_AUTOMAKE(libtirpc, 0.1.5) ++AC_INIT(libtirpc, 0.1.7) ++AM_INIT_AUTOMAKE(libtirpc, 0.1.7) + AM_MAINTAINER_MODE + AC_CONFIG_SRCDIR([src/auth_des.c]) + +Index: libtirpc-0.1.7/src/Makefile.am +=================================================================== +--- libtirpc-0.1.7.orig/src/Makefile.am ++++ libtirpc-0.1.7/src/Makefile.am +@@ -11,7 +11,7 @@ INCLUDES = -I../tirpc -DPORTMAP -DINET6 + + lib_LTLIBRARIES = libtirpc.la + +-libtirpc_la_LDFLAGS = -lnsl -lpthread ++libtirpc_la_LDFLAGS = -lnsl -lpthread -version-info 1:7:0 + + libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c clnt_bcast.c \ + clnt_dg.c clnt_generic.c clnt_perror.c clnt_raw.c clnt_simple.c \ diff --git a/libtirpc-0.1.7-xdr_bufferoverlow.patch b/libtirpc-0.1.7-xdr_bufferoverlow.patch new file mode 100644 index 0000000..c4e72c3 --- /dev/null +++ b/libtirpc-0.1.7-xdr_bufferoverlow.patch @@ -0,0 +1,45 @@ +commit 30431c6d846eab1bc6b7a3a91a7894f3acf2680f +Author: Steve Dickson +Date: Thu Apr 26 14:42:16 2007 -0400 + + Check for buffer overflow in xdr_string. + + Signed-off-by: Steve Dickson + +diff --git a/src/xdr.c b/src/xdr.c +index 764c30f..292723b 100644 +--- a/src/xdr.c ++++ b/src/xdr.c +@@ -669,6 +669,8 @@ xdr_string(xdrs, cpp, maxsize) + } + /* FALLTHROUGH */ + case XDR_ENCODE: ++ if (sp == NULL) ++ return FALSE; + size = strlen(sp); + break; + case XDR_DECODE: +@@ -681,6 +683,13 @@ xdr_string(xdrs, cpp, maxsize) + return (FALSE); + } + nodesize = size + 1; ++ if (nodesize == 0) { ++ /* This means an overflow. It a bug in the caller which ++ * provided a too large maxsize but nevertheless catch it ++ * here. ++ */ ++ return FALSE; ++ } + + /* + * now deal with the actual bytes +@@ -688,9 +697,6 @@ xdr_string(xdrs, cpp, maxsize) + switch (xdrs->x_op) { + + case XDR_DECODE: +- if (nodesize == 0) { +- return (TRUE); +- } + if (sp == NULL) + *cpp = sp = mem_alloc(nodesize); + if (sp == NULL) { diff --git a/libtirpc-0.1.7.tar.bz2 b/libtirpc-0.1.7.tar.bz2 new file mode 100644 index 0000000..0c52500 --- /dev/null +++ b/libtirpc-0.1.7.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c66778f179fd5883d2cf8172c6aa730edacb2c1e4fc30ed4db165aed82d4c984 +size 450332 diff --git a/libtirpc.changes b/libtirpc.changes new file mode 100644 index 0000000..1d1f235 --- /dev/null +++ b/libtirpc.changes @@ -0,0 +1,10 @@ +------------------------------------------------------------------- +Wed Mar 19 17:12:18 CET 2008 - mkoenig@suse.de + +- initial packaging, version 0.1.7 [fate#300607] +- apply some fixes/enhancements from Steve Dickson +- includes fix for CVE-2007-3999 +- set shlib soname version initially to 1.0.7, + keeping compatibility with RH +- fix some compiling issues + diff --git a/libtirpc.spec b/libtirpc.spec new file mode 100644 index 0000000..8620552 --- /dev/null +++ b/libtirpc.spec @@ -0,0 +1,175 @@ +# +# spec file for package libtirpc (Version 0.1.7) +# +# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + +BuildRequires: libgssglue-devel pkg-config + +Name: libtirpc +License: Other uncritical OpenSource License; Sun Industry Standards Source License 1.0 +Group: System/Libraries +AutoReqProv: on +Version: 0.1.7 +Release: 2 +Summary: Transport Independent RPC Library +Url: http://nfsv4.bullopensource.org/doc/tirpc_rpcbind.php +Source: %{name}-%{version}.tar.bz2 +Patch1: libtirpc-0.1.7-netconfig.patch +Patch2: libtirpc-0.1.7-gssglue.patch +Patch3: libtirpc-0.1.7-svcauthnone.patch +Patch4: libtirpc-0.1.7-ppc64.patch +Patch5: libtirpc-0.1.7-svcauthdestroy.patch +Patch6: libtirpc-0.1.7-xdr_bufferoverlow.patch +Patch7: libtirpc-0.1.7-bindresvport_ports.patch +Patch8: libtirpc-0.1.7-svc-run.patch +Patch9: libtirpc-0.1.7-clnt_raw-mutex.patch +Patch10: libtirpc-0.1.7-snprintf.patch +Patch11: libtirpc-0.1.7-bindresvport-ntohs.patch +Patch12: libtirpc-0.1.7-dgcall-iprecverr.patch +Patch13: libtirpc-0.1.7-svc-rtaddr.patch +Patch14: libtirpc-0.1.7-arm.patch +Patch15: libtirpc-0.1.7-bufoverflow.patch +Patch16: libtirpc-0.1.7-libtirpc-pc.patch +Patch17: libtirpc-0.1.7-man-install.patch +# +Patch20: libtirpc-0.1.7-use_sysconfdir.patch +Patch21: libtirpc-0.1.7-overflow_fix.patch +Patch22: libtirpc-0.1.7-version.patch +Patch23: libtirpc-0.1.7-svc_auth_gss_lvalue_fix.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +The Transport Independent RPC library (TI-RPC) is a replacement for the +standard SunRPC library in glibc which does not support IPv6 addresses. +This implementation allows the support of other transports than UDP and +TCP over IPv4 + + + +Authors: +-------- + Gilles Quillard + Antoine Fraticelli + +%package -n libtirpc1 +License: Other uncritical OpenSource License; Sun Industry Standards Source License 1.0 +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. +This implementation allows the support of other transports than UDP and +TCP over IPv4 + + + +Authors: +-------- + Gilles Quillard + Antoine Fraticelli + +%package devel +License: Other uncritical OpenSource License; Sun Industry Standards Source License 1.0 +Summary: Transport Independent RPC Library +Group: System/Libraries +Requires: libtirpc1 = %{version} + +%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. +This implementation allows the support of other transports than UDP and +TCP over IPv4 + + + +Authors: +-------- + Gilles Quillard + Antoine Fraticelli + +%prep +%setup +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch20 -p1 +%patch21 -p1 +%patch22 -p1 +%patch23 -p1 +pushd man +for f in *.3; do mv $f ${f}t; done +popd + +%build +autoreconf -fi +./configure --prefix=%{_prefix} \ + --libdir=/%{_lib} \ + --sysconfdir=%{_sysconfdir} \ + --disable-static \ + --enable-gss \ + CFLAGS="$RPM_OPT_FLAGS" +make + +%install +make install DESTDIR=$RPM_BUILD_ROOT +rm -f $RPM_BUILD_ROOT/%{_lib}/libtirpc.la +# move devel so link to %{_libdir} +rm -f $RPM_BUILD_ROOT/%{_lib}/libtirpc.so +mkdir -p $RPM_BUILD_ROOT%{_libdir} +ln -s /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libtirpc.so.?.?.?) \ + $RPM_BUILD_ROOT%{_libdir}/libtirpc.so +mv $RPM_BUILD_ROOT/%{_lib}/pkgconfig $RPM_BUILD_ROOT/%{_libdir} + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -n libtirpc1 +/sbin/ldconfig + +%postun -n libtirpc1 +/sbin/ldconfig + +%files -n libtirpc1 +%defattr(-,root,root) +/%{_lib}/libtirpc.so.1* +%{_sysconfdir}/netconfig +%{_mandir}/man5/netconfig.5.gz + +%files devel +%defattr(-,root,root) +%{_libdir}/libtirpc.so +%dir /usr/include/tirpc/ +/usr/include/tirpc/* +/usr/%{_lib}/pkgconfig/* +%{_mandir}/man3/* + +%changelog +* Wed Mar 19 2008 mkoenig@suse.de +- initial packaging, version 0.1.7 [fate#300607] +- apply some fixes/enhancements from Steve Dickson +- includes fix for CVE-2007-3999 +- set shlib soname version initially to 1.0.7, + keeping compatibility with RH +- fix some compiling issues diff --git a/ready b/ready new file mode 100644 index 0000000..473a0f4