Fixed segfault in SVCAUTH_WRAP call (bz 722594)

Signed-off-by: Steve Dickson <steved@redhat.com>
This commit is contained in:
Steve Dickson 2011-07-20 11:20:27 -04:00
parent 3af6360c1e
commit cff64a55ed
2 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,28 @@
diff -up libtirpc-0.2.2/src/svc_dg.c.orig libtirpc-0.2.2/src/svc_dg.c
--- libtirpc-0.2.2/src/svc_dg.c.orig 2011-07-19 15:02:41.087631000 -0400
+++ libtirpc-0.2.2/src/svc_dg.c 2011-07-19 15:04:43.154243000 -0400
@@ -254,8 +254,8 @@ svc_dg_reply(xprt, msg)
XDR_SETPOS(xdrs, 0);
msg->rm_xid = su->su_xid;
if (xdr_replymsg(xdrs, msg) &&
- (!has_args ||
- (SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) {
+ (!has_args || (xprt->xp_auth &&
+ SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) {
struct msghdr *msg = &su->su_msghdr;
struct iovec iov;
diff -up libtirpc-0.2.2/src/svc_vc.c.orig libtirpc-0.2.2/src/svc_vc.c
--- libtirpc-0.2.2/src/svc_vc.c.orig 2011-07-19 15:05:28.577588000 -0400
+++ libtirpc-0.2.2/src/svc_vc.c 2011-07-19 15:05:40.058928000 -0400
@@ -698,8 +698,8 @@ svc_vc_reply(xprt, msg)
msg->rm_xid = cd->x_id;
rstat = FALSE;
if (xdr_replymsg(xdrs, msg) &&
- (!has_args ||
- (SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) {
+ (!has_args || (xprt->xp_auth &&
+ SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) {
rstat = TRUE;
}
(void)xdrrec_endofrecord(xdrs, TRUE);

View File

@ -2,7 +2,7 @@
Name: libtirpc
Version: 0.2.2
Release: 1%{?dist}
Release: 1.1%{?dist}
Summary: Transport Independent RPC Library
Group: System Environment/Libraries
License: SISSL and BSD
@ -12,6 +12,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: http://downloads.sourceforge.net/libtirpc/libtirpc-%{version}.tar.bz2
Patch001: libtirpc-0.2.3-rc1.patch
Patch002: libtirpc-0.2.2-wrap-segfault.patch
BuildRequires: automake, autoconf, libtool, pkgconfig
BuildRequires: libgssglue-devel
@ -43,6 +44,7 @@ developing programs which use the tirpc library.
%setup -q
%patch001 -p1
%patch002 -p1
# Remove .orig files
find . -name "*.orig" | xargs rm -f
@ -131,6 +133,9 @@ rm -rf %{buildroot}
%{_mandir}/*/*
%changelog
* Wed Jul 20 2011 Steve Dickson <steved@redhat.com> 0.2.1-1.1
- Fixed segfault in SVCAUTH_WRAP call (bz 722594)
* Tue Jun 21 2011 Steve Dickson <steved@redhat.com> 0.2.1-1
- Updated to latest upstream version: 0.2.3-rc1