Blame SOURCES/nfs-utils-1.3.0-gssd-noclear-retval.patch

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