summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles E. Rolke <chug@apache.org>2013-04-19 22:13:11 +0000
committerCharles E. Rolke <chug@apache.org>2013-04-19 22:13:11 +0000
commitdeb7ef04e708e141a35f16c00169b4f861cb3fe9 (patch)
tree2bc4f9c19ca14225fdeb104fdabecc08a808e176
parent4889235edfd1da572a040d0bbdb0924e4303b0f2 (diff)
downloadqpid-python-deb7ef04e708e141a35f16c00169b4f861cb3fe9.tar.gz
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
-rw-r--r--qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp7
1 files changed, 7 insertions, 0 deletions
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);
}