Fixed return value being overrun in gssd (bz 1249046)

Signed-off-by: Steve Dickson <steved@redhat.com>
This commit is contained in:
Steve Dickson 2015-07-31 08:32:47 -04:00
parent 1d7d067063
commit 689375a4cc
2 changed files with 34 additions and 2 deletions

View File

@ -0,0 +1,27 @@
commit a705076172b274463563416adffe55f129740267
Author: Steve Dickson <steved@redhat.com>
Date: Thu Jul 30 17:06:39 2015 -0400
rpc.gssd: Only clear the retval if it has not been set
In gssd_search_krb5_keytab() an error code can be
cleared by blindly setting retval to zero.
Reported-by: Jianhong Yin <jiyin@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c
index f1ebc0d..ecf17a2 100644
--- a/utils/gssd/krb5_util.c
+++ b/utils/gssd/krb5_util.c
@@ -772,7 +772,9 @@ gssd_search_krb5_keytab(krb5_context context, krb5_keytab kt,
"keytab '%s'\n", k5err, kt_name);
}
- retval = 0;
+ /* Only clear the retval if has not been set */
+ if (retval < 0)
+ retval = 0;
out:
free(k5err);
return retval;

View File

@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser
Name: nfs-utils
URL: http://sourceforge.net/projects/nfs
Version: 1.3.2
Release: 11%{?dist}
Release: 12%{?dist}
Epoch: 1
# group all 32bit related archs
@ -16,6 +16,7 @@ Source3: nfs-utils_env.sh
Source4: lockd.conf
Patch001: nfs-utils-1.3.3-rc5.patch
Patch002: nfs-utils-1.3.2-gssd-noclear-retval.patch
Patch100: nfs-utils-1.2.1-statdpath-man.patch
Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch
@ -75,6 +76,7 @@ This package also contains the mount.nfs and umount.nfs program.
%setup -q
%patch001 -p1
%patch002 -p1
%patch100 -p1
%patch101 -p1
@ -311,7 +313,10 @@ fi
/sbin/umount.nfs4
%changelog
* Mon Jul 13 2015 Miro Hrončok <mhroncok@redhat.com> - 1:1.3.2-11
* Fri Jul 31 2015 Steve Dickson <steved@redhat.com> 1.3.2-12
- Fixed return value being overrun in gssd (bz 1249046)
* Mon Jul 13 2015 Miro Hronok <mhroncok@redhat.com> - 1:1.3.2-11
- Replace Python scripts shebangs with %%{__python3} and require python3-devel to have that
* Fri Jun 26 2015 Steve Dickson <steved@redhat.com> 1.3.2-10