increased logging for NTLM authentication to help track down cause of bug 283331

This commit is contained in:
darin%meer.net 2005-03-25 22:25:32 +00:00
Родитель 1aef58d043
Коммит b6c9f9b66a
1 изменённых файлов: 12 добавлений и 3 удалений

Просмотреть файл

@ -184,13 +184,16 @@ CanUseSysNTLM(nsIHttpChannel *channel, PRBool isProxyAuth)
if (isProxyAuth) {
if (NS_FAILED(prefs->GetBoolPref(kAllowProxies, &val)))
val = PR_FALSE;
LOG(("sys-ntlm allowed for proxy: %d\n", val));
return val;
}
else {
nsCOMPtr<nsIURI> uri;
channel->GetURI(getter_AddRefs(uri));
if (uri && TestPref(uri, kTrustedURIs))
if (uri && TestPref(uri, kTrustedURIs)) {
LOG(("sys-ntlm allowed for host\n"));
return PR_TRUE;
}
}
return PR_FALSE;
@ -219,7 +222,8 @@ nsHttpNTLMAuth::ChallengeReceived(nsIHttpChannel *channel,
nsISupports **continuationState,
PRBool *identityInvalid)
{
LOG(("nsHttpNTLMAuth::ChallengeReceived\n"));
LOG(("nsHttpNTLMAuth::ChallengeReceived [ss=%p cs=%p]\n",
*sessionState, *continuationState));
// NOTE: we don't define any session state
@ -244,8 +248,13 @@ nsHttpNTLMAuth::ChallengeReceived(nsIHttpChannel *channel,
// may send a weak LMv1 hash of the user's password, we cannot just
// send it to any server.
//
if (trySysNTLM && !*continuationState && CanUseSysNTLM(channel, isProxyAuth))
if (trySysNTLM && !*continuationState && CanUseSysNTLM(channel, isProxyAuth)) {
module = do_CreateInstance(NS_AUTH_MODULE_CONTRACTID_PREFIX "sys-ntlm");
#ifdef PR_LOGGING
if (!module)
LOG(("failed to load sys-ntlm module\n"));
#endif
}
// it's possible that there is no ntlm-sspi auth module...
if (!module) {