From 4d14564d2f63e397cd392f1a7df27f9a2305dc23 Mon Sep 17 00:00:00 2001 From: Jason Rassi Date: Tue, 23 Dec 2014 16:08:36 -0500 Subject: SERVER-16520 Add a global CursorManager The global cursor manager owns ClientCursor objects that aren't associated with a particular collection. The auth check for getMore against cursors owned by the global cursor manager is left as a TODO (tracked by SERVER-16657). --- src/mongo/db/instance.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/mongo/db/instance.cpp') diff --git a/src/mongo/db/instance.cpp b/src/mongo/db/instance.cpp index 92c3f8e30e0..048b0f81bd2 100644 --- a/src/mongo/db/instance.cpp +++ b/src/mongo/db/instance.cpp @@ -746,8 +746,14 @@ namespace { const NamespaceString nsString( ns ); uassert( 16258, str::stream() << "Invalid ns [" << ns << "]", nsString.isValid() ); - Status status = txn->getClient()->getAuthorizationSession()->checkAuthForGetMore( - nsString, cursorid); + Status status = Status::OK(); + if (CursorManager::getGlobalCursorManager()->ownsCursorId(cursorid)) { + // TODO Implement auth check for global cursors. SERVER-16657. + } + else { + status = txn->getClient()->getAuthorizationSession()->checkAuthForGetMore( + nsString, cursorid); + } audit::logGetMoreAuthzCheck(txn->getClient(), nsString, cursorid, status.code()); uassertStatusOK(status); -- cgit v1.2.1