nfs-utils/nfs-utils-1.3.2-gssd-noclear-retval.patch
Petr Šabata 9e917f864c RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/nfs-utils#ae3700f20b5680274b29ff27c2f54879b44ab34b
2020-10-15 21:04:16 +02:00

28 lines
819 B
Diff

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;