Blame SOURCES/Always-initialize-out-cred-in-gp_import_gssx_cred.patch

4bd34d
From 8f787b66bc23b8317d95c6cf64fe6e0e6409f869 Mon Sep 17 00:00:00 2001
4bd34d
From: Robbie Harwood <rharwood@redhat.com>
4bd34d
Date: Mon, 15 Apr 2019 19:54:17 -0400
4bd34d
Subject: [PATCH] Always initialize out cred in gp_import_gssx_cred()
4bd34d
4bd34d
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
4bd34d
Reviewed-by: Simo Sorce <simo@redhat.com>
4bd34d
Merges: #244
4bd34d
(cherry picked from commit 5697dfd94345c945f93070c40b9d4480f3d3d7ea)
4bd34d
---
4bd34d
 src/gp_export.c | 3 ++-
4bd34d
 1 file changed, 2 insertions(+), 1 deletion(-)
4bd34d
4bd34d
diff --git a/src/gp_export.c b/src/gp_export.c
4bd34d
index 5e8e160..403e339 100644
4bd34d
--- a/src/gp_export.c
4bd34d
+++ b/src/gp_export.c
4bd34d
@@ -449,6 +449,8 @@ uint32_t gp_import_gssx_cred(uint32_t *min, struct gp_call_ctx *gpcall,
4bd34d
     uint32_t ret_min = 0;
4bd34d
     int ret;
4bd34d
 
4bd34d
+    *out = GSS_C_NO_CREDENTIAL;
4bd34d
+
4bd34d
     handle = gp_service_get_creds_handle(gpcall->service);
4bd34d
     if (!handle) {
4bd34d
         ret_maj = GSS_S_FAILURE;
4bd34d
@@ -470,7 +472,6 @@ uint32_t gp_import_gssx_cred(uint32_t *min, struct gp_call_ctx *gpcall,
4bd34d
     if (ret) {
4bd34d
         /* Allow for re-issuance of the keytab. */
4bd34d
         GPDEBUG("Stored ccache failed to decrypt; treating as empty\n");
4bd34d
-        *out = GSS_C_NO_CREDENTIAL;
4bd34d
         goto done;
4bd34d
     }
4bd34d