mutex buglet, From: Luke Howard <lukeh@PADL.COM>

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14098 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2004-08-07 14:31:52 +00:00
parent 9fc2282d2b
commit b28cb7da78
4 changed files with 16 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003 Kungliga Tekniska H<>gskolan
* Copyright (c) 2003 - 2004 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -317,7 +317,7 @@ _gssapi_verify_mic_arcfour(OM_uint32 * minor_status,
HEIMDAL_MUTEX_lock(&context_handle->ctx_id_mutex);
omret = gssapi_msg_order_check(context_handle->order, seq_number);
HEIMDAL_MUTEX_lock(&context_handle->ctx_id_mutex);
HEIMDAL_MUTEX_unlock(&context_handle->ctx_id_mutex);
if (omret)
return omret;
@@ -624,7 +624,7 @@ OM_uint32 _gssapi_unwrap_arcfour(OM_uint32 *minor_status,
HEIMDAL_MUTEX_lock(&context_handle->ctx_id_mutex);
omret = gssapi_msg_order_check(context_handle->order, seq_number);
HEIMDAL_MUTEX_lock(&context_handle->ctx_id_mutex);
HEIMDAL_MUTEX_unlock(&context_handle->ctx_id_mutex);
if (omret)
return omret;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003 Kungliga Tekniska H<>gskolan
* Copyright (c) 2003 - 2004 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -317,7 +317,7 @@ _gssapi_verify_mic_arcfour(OM_uint32 * minor_status,
HEIMDAL_MUTEX_lock(&context_handle->ctx_id_mutex);
omret = gssapi_msg_order_check(context_handle->order, seq_number);
HEIMDAL_MUTEX_lock(&context_handle->ctx_id_mutex);
HEIMDAL_MUTEX_unlock(&context_handle->ctx_id_mutex);
if (omret)
return omret;
@@ -624,7 +624,7 @@ OM_uint32 _gssapi_unwrap_arcfour(OM_uint32 *minor_status,
HEIMDAL_MUTEX_lock(&context_handle->ctx_id_mutex);
omret = gssapi_msg_order_check(context_handle->order, seq_number);
HEIMDAL_MUTEX_lock(&context_handle->ctx_id_mutex);
HEIMDAL_MUTEX_unlock(&context_handle->ctx_id_mutex);
if (omret)
return omret;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997 - 2003 Kungliga Tekniska H<>gskolan
* Copyright (c) 1997 - 2004 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -63,10 +63,12 @@ gss_krb5_get_remotekey(const gss_ctx_id_t context_handle,
krb5_auth_con_getkey(gssapi_krb5_context,
context_handle->auth_context,
&skey);
HEIMDAL_MUTEX_unlock(&context_handle->ctx_id_mutex);
if(skey == NULL)
if(skey == NULL) {
HEIMDAL_MUTEX_unlock(&context_handle->ctx_id_mutex);
return GSS_KRB5_S_KG_NO_SUBKEY; /* XXX */
}
}
HEIMDAL_MUTEX_unlock(&context_handle->ctx_id_mutex);
*key = skey;
return 0;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997 - 2003 Kungliga Tekniska H<>gskolan
* Copyright (c) 1997 - 2004 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -63,10 +63,12 @@ gss_krb5_get_remotekey(const gss_ctx_id_t context_handle,
krb5_auth_con_getkey(gssapi_krb5_context,
context_handle->auth_context,
&skey);
HEIMDAL_MUTEX_unlock(&context_handle->ctx_id_mutex);
if(skey == NULL)
if(skey == NULL) {
HEIMDAL_MUTEX_unlock(&context_handle->ctx_id_mutex);
return GSS_KRB5_S_KG_NO_SUBKEY; /* XXX */
}
}
HEIMDAL_MUTEX_unlock(&context_handle->ctx_id_mutex);
*key = skey;
return 0;
}