summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJason Carey <jcarey@argv.me>2017-08-15 19:16:24 -0400
committerJason Carey <jcarey@argv.me>2017-08-16 12:30:38 -0400
commit8b5b8220fa00538df41cf4f1bedbf0e0aefd71cb (patch)
treecc95214374b13432cd58844b435842a2d74d7d9d /src
parent4aed580d86be5d61bdc0e4e316242ac661c5a780 (diff)
downloadmongo-8b5b8220fa00538df41cf4f1bedbf0e0aefd71cb.tar.gz
SERVER-30673 !requiresAuth for gle command
The get last error command can cause it to attempt to process session info, which may possibly dirty up the client object with a new error (from doing auth work). Marking it !requiresAuth will avoid that codepath.
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/commands/get_last_error.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/commands/get_last_error.cpp b/src/mongo/db/commands/get_last_error.cpp
index 536e1d18814..bd71f6c5825 100644
--- a/src/mongo/db/commands/get_last_error.cpp
+++ b/src/mongo/db/commands/get_last_error.cpp
@@ -66,6 +66,11 @@ public:
virtual void addRequiredPrivileges(const std::string& dbname,
const BSONObj& cmdObj,
std::vector<Privilege>* out) {} // No auth required
+
+ bool requiresAuth() const override {
+ return false;
+ }
+
virtual void help(stringstream& help) const {
help << "reset error state (used with getpreverror)";
}