Commit 7d8c043c authored by Joel Rennich's avatar Joel Rennich

improved error logging

parent 6797de9d
......@@ -74,7 +74,8 @@ class LoginWindow: NSWindowController, NSWindowDelegate {
var userNameChecked = ""
// ensure that user entered just a shortname, in which case add the Kerberos realm
// or if there is an "@" in the name, assume it's a full Kerberos principal
// or if there is an "@" in the name, remove what's after it and put in the AD Domain set in the prefs
// TODO: support multiple domains at the same time
if userName.stringValue.contains("@") {
let split = userName.stringValue.components(separatedBy: "@")
......@@ -93,6 +94,7 @@ class LoginWindow: NSWindowController, NSWindowDelegate {
// Checks if the remote users's password is correct.
// If it is and the current console user is not an
// AD account, then we'll change it.
myError = noMADUser.checkRemoteUserPassword(password: currentPassword)
// Let's present any errors we got before we do anything else.
......
......@@ -158,12 +158,12 @@ class NoMADUser {
if (err == noErr) {
return true
} else if ( err == errSecAuthFailed ) {
myLogger.logit(LogLevel.base, message: "Authentication failed." + err.description)
myLogger.logit(LogLevel.base, message: "Keychain authentication failed." + err.description)
return false
} else {
// If we got any other error, we don't know if the password is good or not because we probably couldn't find the keychain.
myLogger.logit(LogLevel.base, message: "Unknown error: " + err.description)
throw NoMADUserError.unknownError("Unknown error: " + err.description)
myLogger.logit(LogLevel.base, message: "Unknown keychain unlocking error: " + err.description)
throw NoMADUserError.unknownError("Unknown keychain unlocking error: " + err.description)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment