diff options
author | Andy Schwerin <schwerin@10gen.com> | 2013-07-03 18:31:20 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@10gen.com> | 2013-07-19 10:56:53 -0400 |
commit | f29364047e9328b689d52dc45222452bbee4b84e (patch) | |
tree | 8d170f6dd0f0dfebaba0db1ed37f7324cc1cc286 /src/mongo/db/auth/security_key.cpp | |
parent | 1ddba8d97313a167e54a1f65c320d4bbddf2340b (diff) | |
download | mongo-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.cpp | 10 |
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)); } |