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:
@@ -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).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -317,7 +317,7 @@ _gssapi_verify_mic_arcfour(OM_uint32 * minor_status,
|
|||||||
|
|
||||||
HEIMDAL_MUTEX_lock(&context_handle->ctx_id_mutex);
|
HEIMDAL_MUTEX_lock(&context_handle->ctx_id_mutex);
|
||||||
omret = gssapi_msg_order_check(context_handle->order, seq_number);
|
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)
|
if (omret)
|
||||||
return omret;
|
return omret;
|
||||||
|
|
||||||
@@ -624,7 +624,7 @@ OM_uint32 _gssapi_unwrap_arcfour(OM_uint32 *minor_status,
|
|||||||
|
|
||||||
HEIMDAL_MUTEX_lock(&context_handle->ctx_id_mutex);
|
HEIMDAL_MUTEX_lock(&context_handle->ctx_id_mutex);
|
||||||
omret = gssapi_msg_order_check(context_handle->order, seq_number);
|
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)
|
if (omret)
|
||||||
return omret;
|
return omret;
|
||||||
|
|
||||||
|
@@ -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).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -317,7 +317,7 @@ _gssapi_verify_mic_arcfour(OM_uint32 * minor_status,
|
|||||||
|
|
||||||
HEIMDAL_MUTEX_lock(&context_handle->ctx_id_mutex);
|
HEIMDAL_MUTEX_lock(&context_handle->ctx_id_mutex);
|
||||||
omret = gssapi_msg_order_check(context_handle->order, seq_number);
|
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)
|
if (omret)
|
||||||
return omret;
|
return omret;
|
||||||
|
|
||||||
@@ -624,7 +624,7 @@ OM_uint32 _gssapi_unwrap_arcfour(OM_uint32 *minor_status,
|
|||||||
|
|
||||||
HEIMDAL_MUTEX_lock(&context_handle->ctx_id_mutex);
|
HEIMDAL_MUTEX_lock(&context_handle->ctx_id_mutex);
|
||||||
omret = gssapi_msg_order_check(context_handle->order, seq_number);
|
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)
|
if (omret)
|
||||||
return omret;
|
return omret;
|
||||||
|
|
||||||
|
@@ -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).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* 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,
|
krb5_auth_con_getkey(gssapi_krb5_context,
|
||||||
context_handle->auth_context,
|
context_handle->auth_context,
|
||||||
&skey);
|
&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 */
|
return GSS_KRB5_S_KG_NO_SUBKEY; /* XXX */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
HEIMDAL_MUTEX_unlock(&context_handle->ctx_id_mutex);
|
||||||
*key = skey;
|
*key = skey;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -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).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* 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,
|
krb5_auth_con_getkey(gssapi_krb5_context,
|
||||||
context_handle->auth_context,
|
context_handle->auth_context,
|
||||||
&skey);
|
&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 */
|
return GSS_KRB5_S_KG_NO_SUBKEY; /* XXX */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
HEIMDAL_MUTEX_unlock(&context_handle->ctx_id_mutex);
|
||||||
*key = skey;
|
*key = skey;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user