summaryrefslogtreecommitdiff
path: root/src/mongo/db/auth/security_key.cpp
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@10gen.com>2013-07-03 18:31:20 -0400
committerAndy Schwerin <schwerin@10gen.com>2013-07-19 10:56:53 -0400
commitf29364047e9328b689d52dc45222452bbee4b84e (patch)
tree8d170f6dd0f0dfebaba0db1ed37f7324cc1cc286 /src/mongo/db/auth/security_key.cpp
parent1ddba8d97313a167e54a1f65c320d4bbddf2340b (diff)
downloadmongo-f29364047e9328b689d52dc45222452bbee4b84e.tar.gz
SERVER-1891 Consolidate auth failure/success behavior in authenticate command, for easier logging.
Diffstat (limited to 'src/mongo/db/auth/security_key.cpp')
-rw-r--r--src/mongo/db/auth/security_key.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/auth/security_key.cpp b/src/mongo/db/auth/security_key.cpp
index 1e74b683937..f66b4d95b48 100644
--- a/src/mongo/db/auth/security_key.cpp
+++ b/src/mongo/db/auth/security_key.cpp
@@ -129,14 +129,14 @@ namespace mongo {
LOG(1) << "security key: " << str << endl;
- // createPWDigest should really not be a member func
- DBClientConnection conn;
- internalSecurity.pwd = conn.createPasswordDigest(internalSecurity.user, str);
+ internalSecurity.pwd = DBClientWithCommands::createPasswordDigest(
+ internalSecurity.user.getUser().toString(), str);
if (cmdLine.clusterAuthMode == "keyfile" || cmdLine.clusterAuthMode == "sendKeyfile") {
setInternalUserAuthParams(BSON(saslCommandMechanismFieldName << "MONGODB-CR" <<
- saslCommandUserSourceFieldName << "local" <<
- saslCommandUserFieldName << internalSecurity.user <<
+ saslCommandUserSourceFieldName <<
+ internalSecurity.user.getDB() <<
+ saslCommandUserFieldName << internalSecurity.user.getUser() <<
saslCommandPasswordFieldName << internalSecurity.pwd <<
saslCommandDigestPasswordFieldName << false));
}