Package: gnugk
Version: 2.2.3-2-3
Severity: important
Tags: patch

The bug shows up when both MD5 CryptoToken and CAT Token have arrived and the 
CAT Token is wrong. In this case MD5 CryptoToken turns out to be failed even 
if it is right. This situation was encountered with Teles iGate hardware 
which by some means makes bad Cisco Access Token hash (or maybe gnugk makes 
bad CAT hash). Now it works OK.

The fix is contained in attachment:
--- gnugk-2.2.3-2/gkauth.h	2005-02-01 15:28:10.000000000 +0100
+++ gnugk-2.2.3-2-mod/gkauth.h	2006-07-31 17:15:10.000000000 +0200
@@ -632,18 +632,13 @@ protected:
 	{
 		const RAS& req = request;
 		bool finalResult = false;
-		int result;
 		
 		if (req.HasOptionalField(RAS::e_cryptoTokens)) {
-			if ((result = CheckCryptoTokens(req.m_cryptoTokens, aliases, 
-					request->m_rasPDU)) == e_fail)
-				return e_fail;
-			finalResult = (result == e_ok);
+			finalResult = (CheckCryptoTokens(req.m_cryptoTokens, aliases, 
+					request->m_rasPDU) == e_ok);
 		}
 		if (req.HasOptionalField(RAS::e_tokens)) {
-			if ((result = CheckTokens(req.m_tokens, aliases)) == e_fail)
-				return e_fail;
-			finalResult = finalResult || (result == e_ok);
+			finalResult = finalResult || (CheckTokens(req.m_tokens, aliases) == e_ok);
 		}
 		return finalResult ? e_ok : GetDefaultStatus();
 	}

Reply via email to