diff options
author | Sara Golemon <sara.golemon@mongodb.com> | 2017-11-02 09:53:31 -0400 |
---|---|---|
committer | Sara Golemon <sara.golemon@mongodb.com> | 2017-11-30 14:43:49 -0500 |
commit | d75b113186e1914a5f2dc6d1983d604324a8f7f1 (patch) | |
tree | 70456067423a5cae9387beab80a149d29728745b /src/mongo/db/commands/killcursors_common.h | |
parent | 3607059cd791b273ccaefd879d765dcd9365ebd6 (diff) | |
download | mongo-d75b113186e1914a5f2dc6d1983d604324a8f7f1.tar.gz |
SERVER-28260 Check coauth for killCursors and add killAnyCursors
Diffstat (limited to 'src/mongo/db/commands/killcursors_common.h')
-rw-r--r-- | src/mongo/db/commands/killcursors_common.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mongo/db/commands/killcursors_common.h b/src/mongo/db/commands/killcursors_common.h index 43a0443ff80..e34bd5098da 100644 --- a/src/mongo/db/commands/killcursors_common.h +++ b/src/mongo/db/commands/killcursors_common.h @@ -26,8 +26,6 @@ * it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kQuery - #include "mongo/db/commands.h" #include "mongo/db/cursor_id.h" @@ -78,6 +76,13 @@ public: private: /** + * Verify the cursor exists, is unpinned, and can be killed by the current user(s). + */ + virtual Status _checkAuth(Client* client, + const NamespaceString& nss, + CursorId cursorId) const = 0; + + /** * Kill the cursor with id 'cursorId' in namespace 'nss'. Use 'opCtx' if necessary. * * Returns Status::OK() if the cursor was killed, or ErrorCodes::CursorNotFound if there is no @@ -85,7 +90,7 @@ private: */ virtual Status _killCursor(OperationContext* opCtx, const NamespaceString& nss, - CursorId cursorId) = 0; + CursorId cursorId) const = 0; }; } // namespace mongo |