From 62309f042fd7aee9cbc7be939c3d6b5db695cbfc Mon Sep 17 00:00:00 2001 From: matt dannenberg Date: Thu, 12 Sep 2013 14:36:47 -0400 Subject: SERVER-9441 do not allow distinct/aggregate without slaveOk --- src/mongo/db/commands/distinct.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mongo/db/commands/distinct.cpp') diff --git a/src/mongo/db/commands/distinct.cpp b/src/mongo/db/commands/distinct.cpp index df960e0ff98..68a6ba306d6 100644 --- a/src/mongo/db/commands/distinct.cpp +++ b/src/mongo/db/commands/distinct.cpp @@ -47,7 +47,8 @@ namespace mongo { class DistinctCommand : public Command { public: DistinctCommand() : Command("distinct") {} - virtual bool slaveOk() const { return true; } + virtual bool slaveOk() const { return false; } + virtual bool slaveOverrideOk() const { return true; } virtual LockType locktype() const { return READ; } virtual void addRequiredPrivileges(const std::string& dbname, const BSONObj& cmdObj, -- cgit v1.2.1