0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00

don't log auth messages when no auth is being used SERVER-2781

This commit is contained in:
Kristina 2011-03-24 15:38:17 -04:00
parent 5d5e995ecf
commit 79ea0806a9

View File

@ -1438,6 +1438,9 @@ namespace mongo {
BSONObj userReplQuery = fromjson("{\"user\":\"repl\"}");
bool replAuthenticate(DBClientBase *conn) {
if( noauth ) {
return true;
}
if( ! cc().isAdmin() ) {
log() << "replauthenticate: requires admin permissions, failing\n";
return false;
@ -1458,7 +1461,7 @@ namespace mongo {
// try the first user in local
!Helpers::getSingleton("local.system.users", user) ) {
log() << "replauthenticate: no user in local.system.users to use for authentication\n";
return noauth;
return false;
}
}
u = user.getStringField("user");