Updated to latest upstream version: 0.2.1

This commit is contained in:
Steve Dickson 2009-11-30 14:36:06 +00:00
parent 0a01ef8b13
commit a1c517f42b
5 changed files with 7 additions and 447 deletions

View File

@ -4,3 +4,4 @@ libtirpc-0.1.9.tar.bz2
libtirpc-0.1.10.tar.bz2 libtirpc-0.1.10.tar.bz2
libtirpc-0.1.11.tar.bz2 libtirpc-0.1.11.tar.bz2
libtirpc-0.2.0.tar.bz2 libtirpc-0.2.0.tar.bz2
libtirpc-0.2.1.tar.bz2

View File

@ -1,67 +0,0 @@
diff --git a/.gitignore b/.gitignore
index d088f05..f4a325a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,3 +36,11 @@ src/libtirpc_la-*.lo
*~
# cscope database files
cscope.*
+# files generated by patches
+*.patch
+*.rej
+*.orig
+# files generated by debugging
+.gdb_history
+.gdbinit
+core
diff --git a/Makefile.am b/Makefile.am
index 3e50d3c..7f5f37b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = src man
+SUBDIRS = src man doc
nobase_include_HEADERS = tirpc/netconfig.h \
tirpc/rpcsvc/crypt.x \
diff --git a/src/Makefile.am b/src/Makefile.am
index f832baa..7b002da 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -6,7 +6,7 @@
## anything like that.
-INCLUDES = -I../tirpc -DPORTMAP -DINET6 -DVERSION="\"$(VERSION)\"" \
+INCLUDES = -I$(top_srcdir)/tirpc -DPORTMAP -DINET6 -DVERSION="\"$(VERSION)\"" \
-D_GNU_SOURCE -Wall -pipe
lib_LTLIBRARIES = libtirpc.la
diff --git a/src/clnt_dg.c b/src/clnt_dg.c
index 2eeaada..2f870b1 100644
--- a/src/clnt_dg.c
+++ b/src/clnt_dg.c
@@ -381,6 +381,10 @@ call_again:
}
send_again:
+ if (total_time <= 0) {
+ cu->cu_error.re_status = RPC_TIMEDOUT;
+ goto out;
+ }
nextsend_time = cu->cu_wait.tv_sec * 1000 + cu->cu_wait.tv_usec / 1000;
if (sendto(cu->cu_fd, cu->cu_outbuf, outlen, 0, sa, salen) != outlen) {
cu->cu_error.re_errno = errno;
diff --git a/src/rpcb_clnt.c b/src/rpcb_clnt.c
index 732c556..6494370 100644
--- a/src/rpcb_clnt.c
+++ b/src/rpcb_clnt.c
@@ -781,7 +781,7 @@ __rpcb_findaddr_timed(program, version, nconf, host, clpp, tp)
if ((ua == NULL) || (ua[0] == 0)) {
/* address unknown */
rpc_createerr.cf_stat = RPC_PROGNOTREGISTERED;
- continue; /* try other versions */
+ goto error;
}
address = uaddr2taddr(nconf, ua);
#ifdef ND_DEBUG

View File

@ -1,372 +0,0 @@
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..df50e94
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,29 @@
+AC_INIT(libtirpc, 0.2.0)
+AM_INIT_AUTOMAKE(libtirpc, 0.2.0)
+AM_MAINTAINER_MODE
+AC_CONFIG_SRCDIR([src/auth_des.c])
+
+AC_ARG_ENABLE(gss,[ --enable-gss Turn on gss api], [case "${enableval}" in
+ yes) gss=true ; AC_CHECK_LIB([gssapi],[gss_init_sec_context]) ;;
+ no) gss=false ;;
+ *) 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
+ AC_DEFINE(HAVE_LIBGSSAPI, 1, [])
+ PKG_CHECK_MODULES(GSSGLUE, libgssglue, [],
+ AC_MSG_ERROR([Unable to locate information required to use libgssglue.]))
+fi
+
+AC_PROG_CC
+AM_CONFIG_HEADER(config.h)
+AC_PROG_LIBTOOL
+##AC_PROG_RANLIB
+AC_HEADER_DIRENT
+AC_PREFIX_DEFAULT(/usr)
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h locale.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h])
+AC_CHECK_LIB([pthread], [pthread_create])
+
+
+AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile])
+AC_OUTPUT(libtirpc.pc)
diff --git a/configure.in b/configure.in
deleted file mode 100644
index bacb265..0000000
--- a/configure.in
+++ /dev/null
@@ -1,28 +0,0 @@
-AC_INIT(libtirpc, 0.2.0)
-AM_INIT_AUTOMAKE(libtirpc, 0.2.0)
-AM_MAINTAINER_MODE
-AC_CONFIG_SRCDIR([src/auth_des.c])
-
-AC_ARG_ENABLE(gss,[ --enable-gss Turn on gss api], [case "${enableval}" in
- yes) gss=true ; AC_CHECK_LIB([gssapi],[gss_init_sec_context]) ;;
- no) gss=false ;;
- *) 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
-AM_CONFIG_HEADER(config.h)
-AC_PROG_LIBTOOL
-##AC_PROG_RANLIB
-AC_HEADER_DIRENT
-AC_PREFIX_DEFAULT(/usr)
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h locale.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h])
-AC_CHECK_LIB([pthread], [pthread_create])
-
-
-AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile])
-AC_OUTPUT(libtirpc.pc)
diff --git a/src/authgss_prot.c b/src/authgss_prot.c
index be0d1a6..ab72d91 100644
--- a/src/authgss_prot.c
+++ b/src/authgss_prot.c
@@ -54,7 +54,7 @@ xdr_rpc_gss_cred(XDR *xdrs, struct rpc_gss_cred *p)
xdr_u_int(xdrs, &p->gc_seq) &&
xdr_enum(xdrs, (enum_t *)&p->gc_svc) &&
xdr_bytes(xdrs, (char **)&p->gc_ctx.value,
- &p->gc_ctx.length, MAX_AUTH_BYTES));
+ (u_int *)&p->gc_ctx.length, MAX_AUTH_BYTES));
log_debug("xdr_rpc_gss_cred: %s %s "
"(v %d, proc %d, seq %d, svc %d, ctx %p:%d)",
@@ -72,7 +72,7 @@ xdr_rpc_gss_init_args(XDR *xdrs, gss_buffer_desc *p)
bool_t xdr_stat;
xdr_stat = xdr_bytes(xdrs, (char **)&p->value,
- &p->length, MAX_NETOBJ_SZ);
+ (u_int *)&p->length, MAX_NETOBJ_SZ);
log_debug("xdr_rpc_gss_init_args: %s %s (token %p:%d)",
(xdrs->x_op == XDR_ENCODE) ? "encode" : "decode",
@@ -88,12 +88,12 @@ xdr_rpc_gss_init_res(XDR *xdrs, struct rpc_gss_init_res *p)
bool_t xdr_stat;
xdr_stat = (xdr_bytes(xdrs, (char **)&p->gr_ctx.value,
- &p->gr_ctx.length, MAX_NETOBJ_SZ) &&
+ (u_int *)&p->gr_ctx.length, MAX_NETOBJ_SZ) &&
xdr_u_int(xdrs, &p->gr_major) &&
xdr_u_int(xdrs, &p->gr_minor) &&
xdr_u_int(xdrs, &p->gr_win) &&
xdr_bytes(xdrs, (char **)&p->gr_token.value,
- &p->gr_token.length, MAX_NETOBJ_SZ));
+ (u_int *)&p->gr_token.length, MAX_NETOBJ_SZ));
log_debug("xdr_rpc_gss_init_res %s %s "
"(ctx %p:%d, maj %d, min %d, win %d, token %p:%d)",
@@ -135,7 +135,7 @@ xdr_rpc_gss_wrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr,
if (svc == RPCSEC_GSS_SVC_INTEGRITY) {
/* Marshal databody_integ length. */
XDR_SETPOS(xdrs, start);
- if (!xdr_u_int(xdrs, &databuf.length))
+ if (!xdr_u_int(xdrs, (u_int *)&databuf.length))
return (FALSE);
/* Checksum rpc_gss_data_t. */
@@ -148,7 +148,7 @@ xdr_rpc_gss_wrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr,
/* Marshal checksum. */
XDR_SETPOS(xdrs, end);
xdr_stat = xdr_bytes(xdrs, (char **)&wrapbuf.value,
- &wrapbuf.length, MAX_NETOBJ_SZ);
+ (u_int *)&wrapbuf.length, MAX_NETOBJ_SZ);
gss_release_buffer(&min_stat, &wrapbuf);
}
else if (svc == RPCSEC_GSS_SVC_PRIVACY) {
@@ -162,7 +162,7 @@ xdr_rpc_gss_wrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr,
/* Marshal databody_priv. */
XDR_SETPOS(xdrs, start);
xdr_stat = xdr_bytes(xdrs, (char **)&wrapbuf.value,
- &wrapbuf.length, MAX_NETOBJ_SZ);
+ (u_int *)&wrapbuf.length, MAX_NETOBJ_SZ);
gss_release_buffer(&min_stat, &wrapbuf);
}
return (xdr_stat);
@@ -188,13 +188,13 @@ xdr_rpc_gss_unwrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr,
if (svc == RPCSEC_GSS_SVC_INTEGRITY) {
/* Decode databody_integ. */
- if (!xdr_bytes(xdrs, (char **)&databuf.value, &databuf.length,
+ if (!xdr_bytes(xdrs, (char **)&databuf.value, (u_int *)&databuf.length,
MAX_NETOBJ_SZ)) {
log_debug("xdr decode databody_integ failed");
return (FALSE);
}
/* Decode checksum. */
- if (!xdr_bytes(xdrs, (char **)&wrapbuf.value, &wrapbuf.length,
+ if (!xdr_bytes(xdrs, (char **)&wrapbuf.value, (u_int *)&wrapbuf.length,
MAX_NETOBJ_SZ)) {
gss_release_buffer(&min_stat, &databuf);
log_debug("xdr decode checksum failed");
@@ -213,7 +213,7 @@ xdr_rpc_gss_unwrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr,
}
else if (svc == RPCSEC_GSS_SVC_PRIVACY) {
/* Decode databody_priv. */
- if (!xdr_bytes(xdrs, (char **)&wrapbuf.value, &wrapbuf.length,
+ if (!xdr_bytes(xdrs, (char **)&wrapbuf.value, (u_int *)&wrapbuf.length,
MAX_NETOBJ_SZ)) {
log_debug("xdr decode databody_priv failed");
return (FALSE);
diff --git a/src/bindresvport.c b/src/bindresvport.c
index 730dc6b..6ce3e81 100644
--- a/src/bindresvport.c
+++ b/src/bindresvport.c
@@ -88,11 +88,10 @@ bindresvport_sa(sd, sa)
salen = sizeof(myaddr);
sa = (struct sockaddr *)&myaddr;
- if (getsockname(sd, sa, &salen) == -1)
+ if (getsockname(sd, (struct sockaddr *)&myaddr, &salen) == -1)
return -1; /* errno is correctly set */
- af = sa->sa_family;
- memset(sa, 0, salen);
+ af = myaddr.ss_family;
} else
af = sa->sa_family;
diff --git a/src/clnt_bcast.c b/src/clnt_bcast.c
index fef7a4b..140407b 100644
--- a/src/clnt_bcast.c
+++ b/src/clnt_bcast.c
@@ -586,13 +586,12 @@ rpc_broadcast_exp(prog, vers, proc, xargs, argsp, xresults, resultsp,
struct netbuf *np;
#ifdef PORTMAP
struct netbuf taddr;
- struct sockaddr_in *sin;
+ struct sockaddr_in sin;
if (pmap_flag && pmap_reply_flag) {
- sin = (struct sockaddr_in *)
- (void *)&fdlist[i].raddr;
- sin->sin_port =
- htons((u_short)port);
+ memcpy(&sin, &fdlist[i].raddr, sizeof(sin));
+ sin.sin_port = htons((u_short)port);
+ memcpy(&fdlist[i].raddr, &sin, sizeof(sin));
taddr.len = taddr.maxlen =
sizeof(fdlist[i].raddr);
taddr.buf = &fdlist[i].raddr;
diff --git a/src/clnt_dg.c b/src/clnt_dg.c
index 2f870b1..79fed5d 100644
--- a/src/clnt_dg.c
+++ b/src/clnt_dg.c
@@ -312,7 +312,7 @@ clnt_dg_call(cl, proc, xargs, argsp, xresults, resultsp, utimeout)
socklen_t inlen, salen;
ssize_t recvlen = 0;
int rpc_lock_value;
- u_int32_t xid;
+ u_int32_t xid, inval, outval;
outlen = 0;
sigfillset(&newmask);
@@ -475,15 +475,23 @@ get_reply:
cu->cu_error.re_status = RPC_CANTRECV;
goto out;
}
- if (recvlen >= sizeof(u_int32_t) &&
- (cu->cu_async == TRUE ||
- *((u_int32_t *)(void *)(cu->cu_inbuf)) ==
- *((u_int32_t *)(void *)(cu->cu_outbuf))))
- inlen = (socklen_t)recvlen;
- else {
- total_time -= tv;
- goto send_again;
- }
+
+ if (recvlen < sizeof(u_int32_t)) {
+ total_time -= tv;
+ goto send_again;
+ }
+
+ if (cu->cu_async == TRUE)
+ inlen = (socklen_t)recvlen;
+ else {
+ memcpy(&inval, cu->cu_inbuf, sizeof(u_int32_t));
+ memcpy(&outval, cu->cu_outbuf, sizeof(u_int32_t));
+ if (inval != outval) {
+ total_time -= tv;
+ goto send_again;
+ }
+ inlen = (socklen_t)recvlen;
+ }
/*
* now decode and validate the response
diff --git a/src/mt_misc.c b/src/mt_misc.c
index 94bb645..4cba143 100644
--- a/src/mt_misc.c
+++ b/src/mt_misc.c
@@ -120,7 +120,7 @@ __rpc_createerr()
return (rce_addr);
}
-void __attribute ((descructor)) tsd_key_delete(void)
+void tsd_key_delete(void)
{
if (clnt_broadcast_key != -1)
thr_keydelete(clnt_broadcast_key);
diff --git a/src/rpc_generic.c b/src/rpc_generic.c
index 8219483..541275c 100644
--- a/src/rpc_generic.c
+++ b/src/rpc_generic.c
@@ -812,6 +812,11 @@ int
__rpc_sockisbound(int fd)
{
struct sockaddr_storage ss;
+ union {
+ struct sockaddr_in sin;
+ struct sockaddr_in6 sin6;
+ struct sockaddr_un usin;
+ } u_addr;
socklen_t slen;
slen = sizeof (struct sockaddr_storage);
@@ -820,17 +825,17 @@ __rpc_sockisbound(int fd)
switch (ss.ss_family) {
case AF_INET:
- return (((struct sockaddr_in *)
- (void *)&ss)->sin_port != 0);
+ memcpy(&u_addr.sin, &ss, sizeof(u_addr.sin));
+ return (u_addr.sin.sin_port != 0);
#ifdef INET6
case AF_INET6:
- return (((struct sockaddr_in6 *)
- (void *)&ss)->sin6_port != 0);
+ memcpy(&u_addr.sin6, &ss, sizeof(u_addr.sin6));
+ return (u_addr.sin6.sin6_port != 0);
#endif
case AF_LOCAL:
/* XXX check this */
- return (((struct sockaddr_un *)
- (void *)&ss)->sun_path[0] != '\0');
+ memcpy(&u_addr.usin, &ss, sizeof(u_addr.usin));
+ return (u_addr.usin.sun_path[0] != 0);
default:
break;
}
diff --git a/src/svc.c b/src/svc.c
index a61c14b..cc65e6a 100644
--- a/src/svc.c
+++ b/src/svc.c
@@ -77,7 +77,9 @@ static struct svc_callout
extern rwlock_t svc_lock;
extern rwlock_t svc_fd_lock;
+#ifdef HAVE_LIBGSSAPI
extern struct svc_auth_ops svc_auth_gss_ops;
+#endif
static struct svc_callout *svc_find (rpcprog_t, rpcvers_t,
struct svc_callout **, char *);
@@ -715,9 +717,11 @@ svc_getreq_common (fd)
SVC_DESTROY (xprt);
break;
}
- else if ((xprt->xp_auth != NULL) &&
- (xprt->xp_auth->svc_ah_ops != &svc_auth_gss_ops))
- {
+ else if ((xprt->xp_auth != NULL)
+#ifdef HAVE_LIBGSSAPI
+ && (xprt->xp_auth->svc_ah_ops != &svc_auth_gss_ops)
+#endif
+ ) {
xprt->xp_auth = NULL;
}
}
diff --git a/src/svc_auth_gss.c b/src/svc_auth_gss.c
index 9e9ff81..54b23b1 100644
--- a/src/svc_auth_gss.c
+++ b/src/svc_auth_gss.c
@@ -121,7 +121,7 @@ svcauth_gss_import_name(char *service)
namebuf.length = strlen(service);
maj_stat = gss_import_name(&min_stat, &namebuf,
- GSS_C_NT_HOSTBASED_SERVICE, &name);
+ (gss_OID)GSS_C_NT_HOSTBASED_SERVICE, &name);
if (maj_stat != GSS_S_COMPLETE) {
log_status("gss_import_name", maj_stat, min_stat);
diff --git a/src/xdr_float.c b/src/xdr_float.c
index 4c5b28a..114b192 100644
--- a/src/xdr_float.c
+++ b/src/xdr_float.c
@@ -54,16 +54,6 @@
* This routine works on machines with IEEE754 FP and Vaxen.
*/
-#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(__powerpc__) || defined(__s390__) || defined(__arm__) || \
- defined(__sh__)
-#include <bits/endian.h>
-#define IEEEFP
-#endif
-
#if defined(__vax__)
/* What IEEE single precision floating point looks like on a Vax */
@@ -93,6 +83,11 @@ static struct sgl_limits {
{{ 0x0, 0x0, 0x0, 0x0 }, /* Min Vax */
{ 0x0, 0x0, 0x0 }} /* Min IEEE */
};
+#else
+
+#include <bits/endian.h>
+#define IEEEFP
+
#endif /* vax */
bool_t

View File

@ -1,6 +1,6 @@
Name: libtirpc Name: libtirpc
Version: 0.2.0 Version: 0.2.1
Release: 4%{?dist} Release: 1%{?dist}
Summary: Transport Independent RPC Library Summary: Transport Independent RPC Library
Group: System Environment/Libraries Group: System Environment/Libraries
License: SISSL and BSD License: SISSL and BSD
@ -30,9 +30,6 @@ Group: Development/Libraries
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Requires(devel): pkgconfig man Requires(devel): pkgconfig man
Patch1: libtirpc-0.2.0-rc2.patch
Patch2: libtirpc-0.2.0-rc3.patch
%description devel %description devel
This package includes header files and libraries necessary for This package includes header files and libraries necessary for
developing programs which use the tirpc library. developing programs which use the tirpc library.
@ -40,8 +37,6 @@ developing programs which use the tirpc library.
%prep %prep
%setup -q %setup -q
%patch1 -p1
%patch2 -p1
# Remove .orig files # Remove .orig files
find . -name "*.orig" | xargs rm -f find . -name "*.orig" | xargs rm -f
@ -126,6 +121,9 @@ rm -rf %{buildroot}
%{_mandir}/*/* %{_mandir}/*/*
%changelog %changelog
* Mon Nov 30 2009 Steve Dickson <steved@redhat.com> 0.2.1-1
- Updated to latest upstream version: 0.2.1
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-4 * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

View File

@ -1 +1 @@
b3b513a8825aa227deac63ea38c64f41 libtirpc-0.2.0.tar.bz2 d77eb15f464bf9d6e66259eaf78b2a4e libtirpc-0.2.1.tar.bz2