diff options
| author | Michael Goulish <mgoulish@apache.org> | 2010-05-24 22:56:40 +0000 |
|---|---|---|
| committer | Michael Goulish <mgoulish@apache.org> | 2010-05-24 22:56:40 +0000 |
| commit | 7981b9d46fec43ff7b6969fca20c59d8c43b25eb (patch) | |
| tree | a53a3216a46f28d7fe477f0957145bf27e0667b2 /cpp/src/qpid/broker/SaslAuthenticator.cpp | |
| parent | b9e65f6bf0dddab93490792924ddf608eb22929e (diff) | |
| download | qpid-python-7981b9d46fec43ff7b6969fca20c59d8c43b25eb.tar.gz | |
Disable new sasl testing if SASL version is less than 2.1.22.
Earlier version do not have SASL_PATH_TYPE_CONFIG, which this testing requires.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@947850 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/SaslAuthenticator.cpp')
| -rw-r--r-- | cpp/src/qpid/broker/SaslAuthenticator.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cpp/src/qpid/broker/SaslAuthenticator.cpp b/cpp/src/qpid/broker/SaslAuthenticator.cpp index e5102ea4b0..1683432329 100644 --- a/cpp/src/qpid/broker/SaslAuthenticator.cpp +++ b/cpp/src/qpid/broker/SaslAuthenticator.cpp @@ -98,6 +98,8 @@ void SaslAuthenticator::init(const std::string& saslName, std::string const & sa int code; // If we are not given a specific sasl path, do // nothing and allow the default to be used. + // If we have a version of SASL in which SASL_PATH_TYPE_CONFIG does not yet exist, do nothing. + #if (SASL_VERSION_MAJOR >= 2) && (SASL_VERSION_MINOR >= 1) && (SASL_VERSION_STEP >= 22) if ( ! saslConfigPath.empty() ) { if(SASL_OK != (code=sasl_set_path(SASL_PATH_TYPE_CONFIG, const_cast<char *>(saslConfigPath.c_str())))) { QPID_LOG(error, "SASL: sasl_set_path: [" << code << "] " ); @@ -105,6 +107,7 @@ void SaslAuthenticator::init(const std::string& saslName, std::string const & sa } QPID_LOG(info, "SASL: config path set to " << saslConfigPath ); } + #endif code = sasl_server_init(NULL, saslName.c_str()); if (code != SASL_OK) { |
