diff options
Diffstat (limited to 'src/mongo/db/instance.cpp')
-rw-r--r-- | src/mongo/db/instance.cpp | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/mongo/db/instance.cpp b/src/mongo/db/instance.cpp index dd176413f01..96a9fa496b8 100644 --- a/src/mongo/db/instance.cpp +++ b/src/mongo/db/instance.cpp @@ -126,8 +126,7 @@ namespace mongo { bool receivedGetMore(OperationContext* txn, DbResponse& dbresponse, Message& m, - CurOp& curop, - bool fromDBDirectClient); + CurOp& curop); int nloggedsome = 0; #define LOGWITHRATELIMIT if( ++nloggedsome < 1000 || nloggedsome % 100 == 0 ) @@ -195,8 +194,7 @@ namespace mongo { static bool receivedQuery(OperationContext* txn, Client& c, DbResponse& dbresponse, - Message& m, - bool fromDBDirectClient) { + Message& m) { bool ok = true; MSGID responseTo = m.header().getId(); @@ -217,7 +215,7 @@ namespace mongo { audit::logQueryAuthzCheck(client, ns, q.query, status.code()); uassertStatusOK(status); } - dbresponse.exhaustNS = runQuery(txn, m, q, ns, op, *resp, fromDBDirectClient); + dbresponse.exhaustNS = runQuery(txn, m, q, ns, op, *resp); verify( !resp->empty() ); } catch ( SendStaleConfigException& e ){ @@ -298,8 +296,7 @@ namespace mongo { void assembleResponse( OperationContext* txn, Message& m, DbResponse& dbresponse, - const HostAndPort& remote, - bool fromDBDirectClient ) { + const HostAndPort& remote) { // before we lock... int op = m.operation(); bool isCommand = false; @@ -307,7 +304,7 @@ namespace mongo { DbMessage dbmsg(m); Client& c = *txn->getClient(); - if (!txn->isGod()) { + if (!txn->getClient()->isInDirectClient()) { c.getAuthorizationSession()->startRequest(txn); // We should not be holding any locks at this point @@ -400,10 +397,10 @@ namespace mongo { logger::LogSeverity::Debug(1)); if ( op == dbQuery ) { - receivedQuery(txn, c , dbresponse, m, fromDBDirectClient ); + receivedQuery(txn, c , dbresponse, m); } else if ( op == dbGetMore ) { - if ( ! receivedGetMore(txn, dbresponse, m, currentOp, fromDBDirectClient) ) + if ( ! receivedGetMore(txn, dbresponse, m, currentOp) ) shouldLog = true; } else if ( op == dbMsg ) { @@ -741,8 +738,7 @@ namespace mongo { bool receivedGetMore(OperationContext* txn, DbResponse& dbresponse, Message& m, - CurOp& curop, - bool fromDBDirectClient) { + CurOp& curop) { bool ok = true; DbMessage d(m); @@ -792,8 +788,7 @@ namespace mongo { curop, pass, exhaust, - &isCursorAuthorized, - fromDBDirectClient); + &isCursorAuthorized); } catch ( AssertionException& e ) { if ( isCursorAuthorized ) { |