diff options
author | Spencer T Brody <spencer@10gen.com> | 2012-12-11 12:42:05 -0500 |
---|---|---|
committer | Spencer T Brody <spencer@10gen.com> | 2012-12-11 17:33:19 -0500 |
commit | 7aff4a70be26ba72eb4b4ba855eac25d4a8e72d9 (patch) | |
tree | 4c859c4f93801c5999a1976b23469c0db7b8edfd /src/mongo/db/commands/fail_point_cmd.cpp | |
parent | 79782656749bd25cb4df50bfbb3df46e22236c24 (diff) | |
download | mongo-7aff4a70be26ba72eb4b4ba855eac25d4a8e72d9.tar.gz |
SERVER-7122 Add required privileges to more commands
Diffstat (limited to 'src/mongo/db/commands/fail_point_cmd.cpp')
-rw-r--r-- | src/mongo/db/commands/fail_point_cmd.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mongo/db/commands/fail_point_cmd.cpp b/src/mongo/db/commands/fail_point_cmd.cpp index 88616b39197..53d8f57db4b 100644 --- a/src/mongo/db/commands/fail_point_cmd.cpp +++ b/src/mongo/db/commands/fail_point_cmd.cpp @@ -16,6 +16,11 @@ #include "mongo/db/commands/fail_point_cmd.h" +#include <vector> + +#include "mongo/db/auth/action_set.h" +#include "mongo/db/auth/action_type.h" +#include "mongo/db/auth/privilege.h" #include "mongo/db/commands.h" #include "mongo/util/fail_point_service.h" @@ -58,6 +63,15 @@ namespace mongo { return true; } + // No auth needed because it only works when enabled via command line. + virtual bool requiresAuth() { + return false; + } + + virtual void addRequiredPrivileges(const std::string& dbname, + const BSONObj& cmdObj, + std::vector<Privilege>* out) {} + virtual void help(stringstream& h) const { h << "modifies the settings of a fail point"; } |