[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r1873: Add some potentially helpful logging to the new authenticati (in trunk: . src/gui)
Author: edmanm
Date: 2007-08-25 02:52:08 -0400 (Sat, 25 Aug 2007)
New Revision: 1873
Modified:
trunk/
trunk/src/gui/mainwindow.cpp
Log:
r2067@adrastea: edmanm | 2007-08-25 02:51:57 -0400
Add some potentially helpful logging to the new authentication stuff.
Property changes on: trunk
___________________________________________________________________
svk:merge ticket from /vidalia/local/trunk [r2067] on 54b3572a-7227-0410-958f-53ecd705b71a
Modified: trunk/src/gui/mainwindow.cpp
===================================================================
--- trunk/src/gui/mainwindow.cpp 2007-08-25 06:28:52 UTC (rev 1872)
+++ trunk/src/gui/mainwindow.cpp 2007-08-25 06:52:08 UTC (rev 1873)
@@ -747,16 +747,20 @@
cookieDir = QFileInfo(cookieDir).absolutePath();
cookie = loadControlCookie(cookieDir);
}
+ vNotice("Authenticating using 'cookie' authentication.");
return _torControl->authenticate(cookie);
} else if (authMethod == TorSettings::PasswordAuth) {
/* Get the control password and send it to Tor */
+ vNotice("Authenticating using 'hashed password' authentication.");
QString password = settings.getControlPassword();
return _torControl->authenticate(password);
}
/* No authentication. Send an empty password. */
+ vNotice("Authenticating using 'null' authentication.");
return _torControl->authenticate(QString(""));
cancel:
+ vWarn("Cancelling control authentication attempt.");
if (_isVidaliaRunningTor)
stop();
else
@@ -813,6 +817,8 @@
{
bool retry = false;
+ vWarn("Authentication failed: %1").arg(errmsg);
+
/* Parsing log messages is evil, but we're left with little option */
if (errmsg.contains("Password did not match")) {
/* Bad password, so prompt for a new one. */
@@ -879,16 +885,20 @@
foreach (QString path, pathList) {
QString cookieFile = QFileInfo(path).isFile() ?
path : path + "/control_auth_cookie";
+ vDebug("Checking for authentication cookie in '%1'").arg(cookieFile);
if (!QFileInfo(cookieFile).exists())
continue;
authCookie.setFileName(cookieFile);
- if (authCookie.open(QIODevice::ReadOnly))
+ if (authCookie.open(QIODevice::ReadOnly)) {
+ vInfo("Reading authentication cookie from '%1'").arg(cookieFile);
return authCookie.readAll();
- else
+ } else {
vWarn("Couldn't open cookie file '%1': %2")
.arg(cookieFile).arg(authCookie.errorString());
+ }
}
+ vWarn("Couldn't find a readable authentication cookie.");
return QByteArray();
}