*minor_status = 0;
- k5_mutex_lock(&g_mechListLock);
+ minor_status = k5_mutex_lock(&g_mechListLock);
+ if (minor_status)
+ return GSS_S_FAILURE;
aMech = g_mechList;
while (aMech != NULL) {
* need to lock the g_mechSet in case someone tries to update it while
* I'm copying it.
*/
- (void) k5_mutex_lock(&g_mechSetLock);
+ minorStatus = k5_mutex_lock(&g_mechSetLock);
+ if (minorStatus)
+ return GSS_S_FAILURE;
/* allocate space for the oid structures */
if (((*mechSet)->elements =
* since we are accessing parts of the mechList which could be
* modified.
*/
- (void) k5_mutex_lock(&g_mechListLock);
+ if (k5_mutex_lock(&g_mechListLock) != 0)
+ return GSS_S_FAILURE;
updateMechList();
* we need to lock the mech set so that no one else will
* try to read it as we are re-creating it
*/
- (void) k5_mutex_lock(&g_mechSetLock);
+ if (k5_mutex_lock(&g_mechSetLock) != 0)
+ return GSS_S_FAILURE;
/* if the oid list already exists we must free it first */
free_mechSet();
char *modOptions = NULL;
/* make sure we have fresh data */
- (void) k5_mutex_lock(&g_mechListLock);
+ if (k5_mutex_lock(&g_mechListLock) != 0)
+ return NULL;
updateMechList();
if ((aMech = searchMechList(oid)) == NULL ||
return (GSS_S_COMPLETE);
/* ensure we have fresh data */
- (void) k5_mutex_lock(&g_mechListLock);
+ if (k5_mutex_lock(&g_mechListLock) != 0)
+ return GSS_S_FAILURE;
updateMechList();
(void) k5_mutex_unlock(&g_mechListLock);
return (M_DEFAULT);
/* ensure we have fresh data */
- (void) k5_mutex_lock(&g_mechListLock);
+ if (k5_mutex_lock(&g_mechListLock) != 0)
+ return GSS_S_FAILURE;
updateMechList();
aMech = searchMechList(oid);
(void) k5_mutex_unlock(&g_mechListLock);
return (GSS_S_CALL_INACCESSIBLE_WRITE);
/* ensure we have fresh data */
- (void) k5_mutex_lock(&g_mechListLock);
+ if (k5_mutex_lock(&g_mechListLock) != 0)
+ return GSS_S_FAILURE;
updateMechList();
(void) k5_mutex_unlock(&g_mechListLock);
if (gssint_initialize_library())
return NULL;
- (void) k5_mutex_lock(&g_mechListLock);
+ if (k5_mutex_lock(&g_mechListLock) != 0)
+ return GSS_S_FAILURE;
/* check if the mechanism is already loaded */
if ((aMech = searchMechList(oid)) != NULL && aMech->mech) {
(void) k5_mutex_unlock(&g_mechListLock);