diff options
author | Antonin Kral <a.kral@bobek.cz> | 2011-12-15 09:35:47 +0100 |
---|---|---|
committer | Antonin Kral <a.kral@bobek.cz> | 2011-12-15 09:35:47 +0100 |
commit | f0d9a01bccdaeb466c12c92057914bbfef59526c (patch) | |
tree | 7679efa1f0daf7d1d906882a15dc77af6b7aef32 /db/commands | |
parent | 5d342a758c6095b4d30aba0750b54f13b8916f51 (diff) | |
download | mongodb-f0d9a01bccdaeb466c12c92057914bbfef59526c.tar.gz |
Imported Upstream version 2.0.2
Diffstat (limited to 'db/commands')
-rw-r--r-- | db/commands/isself.cpp | 6 | ||||
-rw-r--r-- | db/commands/mr.cpp | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/db/commands/isself.cpp b/db/commands/isself.cpp index 5a868de..7b1cea4 100644 --- a/db/commands/isself.cpp +++ b/db/commands/isself.cpp @@ -4,6 +4,7 @@ #include "../../util/net/listen.h" #include "../commands.h" #include "../../client/dbclient.h" +#include "../security.h" #ifndef _WIN32 # ifndef __sunos__ @@ -211,6 +212,11 @@ namespace mongo { return false; } + if (!noauth && cmdLine.keyFile && + !conn.auth("local", internalSecurity.user, internalSecurity.pwd, errmsg, false)) { + return false; + } + BSONObj out; bool ok = conn.simpleCommand( "admin" , &out , "_isSelf" ); diff --git a/db/commands/mr.cpp b/db/commands/mr.cpp index 56e9770..b79e62b 100644 --- a/db/commands/mr.cpp +++ b/db/commands/mr.cpp @@ -1119,6 +1119,7 @@ namespace mongo { virtual LockType locktype() const { return NONE; } bool run(const string& dbname , BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool) { + ShardedConnectionInfo::addHook(); string shardedOutputCollection = cmdObj["shardedOutputCollection"].valuestrsafe(); string postProcessCollection = cmdObj["postProcessCollection"].valuestrsafe(); bool postProcessOnly = !(postProcessCollection.empty()); |