diff options
author | Simo Sorce <simo@redhat.com> | 2012-01-30 14:24:28 -0500 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2012-02-01 17:33:10 -0500 |
commit | f986347fe72bd542fe3ebccdf5358ed3dbcb388a (patch) | |
tree | 4ea2433efd2f0efa113f4fedd56c937bbb226313 | |
parent | 6b59083556c019e6be1fe97ca5d1ef4ba2ca3c08 (diff) | |
download | gss-proxy-f986347fe72bd542fe3ebccdf5358ed3dbcb388a.tar.gz gss-proxy-f986347fe72bd542fe3ebccdf5358ed3dbcb388a.tar.xz gss-proxy-f986347fe72bd542fe3ebccdf5358ed3dbcb388a.zip |
Fix gp_rpc_accept_sec_context to handle input credential
-rw-r--r-- | proxy/src/gp_rpc_accept_sec_context.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/proxy/src/gp_rpc_accept_sec_context.c b/proxy/src/gp_rpc_accept_sec_context.c index fd4fdbd..6195d1f 100644 --- a/proxy/src/gp_rpc_accept_sec_context.c +++ b/proxy/src/gp_rpc_accept_sec_context.c @@ -33,17 +33,17 @@ int gp_accept_sec_context(struct gssproxy_ctx *gpctx, struct gssx_res_accept_sec_context *ascr; uint32_t ret_maj; uint32_t ret_min; - gss_ctx_id_t ctx = NULL; - gss_cred_id_t ach; + gss_ctx_id_t ctx = GSS_C_NO_CONTEXT; + gss_cred_id_t ach = GSS_C_NO_CREDENTIAL; gss_buffer_desc ibuf; struct gss_channel_bindings_struct cbs; gss_channel_bindings_t pcbs; - gss_name_t src_name = NULL; + gss_name_t src_name = GSS_C_NO_NAME; gss_OID oid; gss_buffer_desc obuf = { 0, NULL }; uint32_t ret_flags; uint32_t time_rec; - gss_cred_id_t dch = NULL; + gss_cred_id_t dch = GSS_C_NO_CREDENTIAL; int ret; asca = &arg->accept_sec_context; @@ -52,10 +52,10 @@ int gp_accept_sec_context(struct gssproxy_ctx *gpctx, ctx = GSS_C_NO_CONTEXT; if (asca->cred_handle) { - /* FIXME: deal with actually acquired credentials */ - ach = GSS_C_NO_CREDENTIAL; - } else { - ach = GSS_C_NO_CREDENTIAL; + ret = gp_find_cred(asca->cred_handle, &ach); + if (ret) { + goto done; + } } gp_conv_gssx_to_buffer(&asca->input_token, &ibuf); |