diff options
author | Jason Rassi <rassi@10gen.com> | 2014-12-23 16:08:36 -0500 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2014-12-23 22:57:31 -0500 |
commit | 4d14564d2f63e397cd392f1a7df27f9a2305dc23 (patch) | |
tree | a69f3ac6d56a8a2f9469a16e88b3e48f00e9fab0 /src/mongo/db/instance.cpp | |
parent | 1df9c58634def7beeee86fc4f4353a70940fcbbf (diff) | |
download | mongo-4d14564d2f63e397cd392f1a7df27f9a2305dc23.tar.gz |
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).
Diffstat (limited to 'src/mongo/db/instance.cpp')
-rw-r--r-- | src/mongo/db/instance.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
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); |