This is an automated email from the git hooks/post-receive script.
rharwood pushed a commit to branch master
in repository gssproxy.
commit d8b46bb2f1a57d305d15b5a316cd9c4ed3e7c535
Author: Simo Sorce <simo(a)redhat.com>
Date: Thu Mar 2 17:27:15 2017 -0500
Do not re-export unchanged creds
This avoids a needless re-encryption operation and also insures the
client receives back the exact same input; this way the client can
detect if credentials have changed.
Signed-off-by: Simo Sorce <simo(a)redhat.com>
Reviewed-by: Robbie Harwood <rharwood(a)redhat.com>
---
proxy/src/gp_rpc_acquire_cred.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/proxy/src/gp_rpc_acquire_cred.c b/proxy/src/gp_rpc_acquire_cred.c
index 7f40c64..9a55937 100644
--- a/proxy/src/gp_rpc_acquire_cred.c
+++ b/proxy/src/gp_rpc_acquire_cred.c
@@ -137,10 +137,16 @@ int gp_acquire_cred(struct gp_call_ctx *gpcall,
ret_min = ENOMEM;
goto done;
}
- ret_maj = gp_export_gssx_cred(&ret_min, gpcall,
- &out_cred, acr->output_cred_handle);
- if (ret_maj) {
- goto done;
+
+ if (out_cred == in_cred) {
+ acr->output_cred_handle = aca->input_cred_handle;
+ aca->input_cred_handle = NULL;
+ } else {
+ ret_maj = gp_export_gssx_cred(&ret_min, gpcall,
+ &out_cred, acr->output_cred_handle);
+ if (ret_maj) {
+ goto done;
+ }
}
done:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.