From deb7ef04e708e141a35f16c00169b4f861cb3fe9 Mon Sep 17 00:00:00 2001 From: "Charles E. Rolke" Date: Fri, 19 Apr 2013 22:13:11 +0000 Subject: QPID-4757: C++ Broker report sasldb failures more clearly when problem may be a permission issue. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1470065 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp b/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp index 8211657e04..7ab0f7f21d 100644 --- a/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp +++ b/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp @@ -469,6 +469,13 @@ void CyrusAuthenticator::processAuthenticationStep(int code, const char *challen std::string errordetail = sasl_errdetail(sasl_conn); if (!getUsername(uid)) { QPID_LOG(info, "SASL: Authentication failed (no username available yet):" << errordetail); + } else if (SASL_NOUSER == code) { + // SASL_NOUSER is returned when either: + // - the user name supplied was not in the sasl db or + // - the sasl db could not be read + // - because of file permissions or + // - because the file was not found + QPID_LOG(info, "SASL: Authentication failed. User not found or sasldb not accessible.(" << code << ") for " << uid); } else { QPID_LOG(info, "SASL: Authentication failed for " << uid << ":" << errordetail); } -- cgit v1.2.1