diff --git a/src/auth/ktc_errors.et b/src/auth/ktc_errors.et index e010d503fd..9d7b9a8e8c 100644 --- a/src/auth/ktc_errors.et +++ b/src/auth/ktc_errors.et @@ -20,4 +20,6 @@ error_table KTC ec KTC_NOCM, "Cache Manager is not initialized / afsd is not running" ec KTC_RPC, "failed to send or receive session key via remote procedure call" ec KTC_NOCMRPC, "Cache Manager RPC server is not responding" + ec KTC_TOKEN_MUTEX_FAIL, "AFS_KTC_Mutex failure" + end diff --git a/src/auth/ktc_nt.c b/src/auth/ktc_nt.c index bb65edacce..0b0500f6c1 100644 --- a/src/auth/ktc_nt.c +++ b/src/auth/ktc_nt.c @@ -374,11 +374,11 @@ ktc_SetToken(struct ktc_principal *server, struct ktc_token *token, #ifndef AFS_WIN95_ENV ktcMutex = CreateMutex(NULL, TRUE, AFSGlobalKTCMutexName); if (ktcMutex == NULL) - return KTC_PIOCTLFAIL; + return KTC_TOKEN_MUTEX_FAIL; if (GetLastError() == ERROR_ALREADY_EXISTS) { if (WaitForSingleObject(ktcMutex, INFINITE) != WAIT_OBJECT_0) { CloseHandle(ktcMutex); - return KTC_PIOCTLFAIL; + return KTC_TOKEN_MUTEX_FAIL; } } @@ -486,11 +486,11 @@ ktc_GetToken(struct ktc_principal *server, struct ktc_token *token, #ifndef AFS_WIN95_ENV ktcMutex = CreateMutex(NULL, TRUE, AFSGlobalKTCMutexName); if (ktcMutex == NULL) - return KTC_PIOCTLFAIL; + return KTC_TOKEN_MUTEX_FAIL; if (GetLastError() == ERROR_ALREADY_EXISTS) { if (WaitForSingleObject(ktcMutex, INFINITE) != WAIT_OBJECT_0) { CloseHandle(ktcMutex); - return KTC_PIOCTLFAIL; + return KTC_TOKEN_MUTEX_FAIL; } } #endif /* AFS_WIN95_ENV */ @@ -651,11 +651,11 @@ ktc_GetTokenEx(char *cellName, struct ktc_setTokenData **tokenSet) { #ifndef AFS_WIN95_ENV ktcMutex = CreateMutex(NULL, TRUE, AFSGlobalKTCMutexName); if (ktcMutex == NULL) - return KTC_PIOCTLFAIL; + return KTC_TOKEN_MUTEX_FAIL; if (GetLastError() == ERROR_ALREADY_EXISTS) { if (WaitForSingleObject(ktcMutex, INFINITE) != WAIT_OBJECT_0) { CloseHandle(ktcMutex); - return KTC_PIOCTLFAIL; + return KTC_TOKEN_MUTEX_FAIL; } } #endif /* AFS_WIN95_ENV */ @@ -745,11 +745,11 @@ ktc_ListTokens(int cellNum, int *cellNumP, struct ktc_principal *server) #ifndef AFS_WIN95_ENV ktcMutex = CreateMutex(NULL, TRUE, AFSGlobalKTCMutexName); if (ktcMutex == NULL) - return KTC_PIOCTLFAIL; + return KTC_TOKEN_MUTEX_FAIL; if (GetLastError() == ERROR_ALREADY_EXISTS) { if (WaitForSingleObject(ktcMutex, INFINITE) != WAIT_OBJECT_0) { CloseHandle(ktcMutex); - return KTC_PIOCTLFAIL; + return KTC_TOKEN_MUTEX_FAIL; } } #endif /* AFS_WIN95_ENV */ @@ -858,11 +858,11 @@ ktc_ForgetToken(struct ktc_principal *server) #ifndef AFS_WIN95_ENV ktcMutex = CreateMutex(NULL, TRUE, AFSGlobalKTCMutexName); if (ktcMutex == NULL) - return KTC_PIOCTLFAIL; + return KTC_TOKEN_MUTEX_FAIL; if (GetLastError() == ERROR_ALREADY_EXISTS) { if (WaitForSingleObject(ktcMutex, INFINITE) != WAIT_OBJECT_0) { CloseHandle(ktcMutex); - return KTC_PIOCTLFAIL; + return KTC_TOKEN_MUTEX_FAIL; } } #endif /* AFS_WIN95_ENV */ @@ -913,11 +913,11 @@ ktc_ForgetAllTokens() #ifndef AFS_WIN95_ENV ktcMutex = CreateMutex(NULL, TRUE, AFSGlobalKTCMutexName); if (ktcMutex == NULL) - return KTC_PIOCTLFAIL; + return KTC_TOKEN_MUTEX_FAIL; if (GetLastError() == ERROR_ALREADY_EXISTS) { if (WaitForSingleObject(ktcMutex, INFINITE) != WAIT_OBJECT_0) { CloseHandle(ktcMutex); - return KTC_PIOCTLFAIL; + return KTC_TOKEN_MUTEX_FAIL; } } #endif /* AFS_WIN95_ENV */