- do some basic locking (no reference counting so contexts can be
removed while still used) - don't export gss_ctx_id_t_desc_struct and gss_cred_id_t_desc_struct - make sure all lifetime are returned in seconds left until expired, not in unix epoch git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12317 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -49,12 +49,14 @@ OM_uint32 gss_inquire_context (
|
||||
{
|
||||
OM_uint32 ret;
|
||||
|
||||
HEIMDAL_MUTEX_lock(&context_handle->ctx_id_mutex);
|
||||
|
||||
if (src_name) {
|
||||
ret = gss_duplicate_name (minor_status,
|
||||
context_handle->source,
|
||||
src_name);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto failed;
|
||||
}
|
||||
|
||||
if (targ_name) {
|
||||
@@ -62,11 +64,16 @@ OM_uint32 gss_inquire_context (
|
||||
context_handle->target,
|
||||
targ_name);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto failed;
|
||||
}
|
||||
|
||||
if (lifetime_rec)
|
||||
*lifetime_rec = context_handle->lifetime;
|
||||
if (lifetime_rec) {
|
||||
ret = gssapi_lifetime_left(minor_status,
|
||||
context_handle->lifetime,
|
||||
lifetime_rec);
|
||||
if (ret)
|
||||
goto failed;
|
||||
}
|
||||
|
||||
if (mech_type)
|
||||
*mech_type = GSS_KRB5_MECHANISM;
|
||||
@@ -81,5 +88,10 @@ OM_uint32 gss_inquire_context (
|
||||
*open_context = context_handle->more_flags & OPEN;
|
||||
|
||||
*minor_status = 0;
|
||||
return GSS_S_COMPLETE;
|
||||
ret = GSS_S_COMPLETE;
|
||||
|
||||
failed:
|
||||
|
||||
HEIMDAL_MUTEX_unlock(&context_handle->ctx_id_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user