summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2011-04-04 12:47:32 -0400
committerMathias Stearn <mathias@10gen.com>2011-04-04 12:47:59 -0400
commit64151ca41ac480805add7603320ca2a8adcba98c (patch)
tree3f0516205ecd09a980adf820b3c5ebd1b9e92ad6 /tools
parenta1689f68472f55a11b5dd02ab087c7c091762170 (diff)
downloadmongo-64151ca41ac480805add7603320ca2a8adcba98c.tar.gz
Make mongodump --oplog work with auth SERVER-2850
Diffstat (limited to 'tools')
-rw-r--r--tools/dump.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/dump.cpp b/tools/dump.cpp
index 1e696edf3a0..f37886eda14 100644
--- a/tools/dump.cpp
+++ b/tools/dump.cpp
@@ -344,6 +344,8 @@ public:
}
}
+ auth("local");
+
BSONObj op = conn(true).findOne(opLogName, Query().sort("$natural", -1), 0, QueryOption_SlaveOk);
if (op.isEmpty()) {
cout << "No operations in oplog. Please ensure you are connecting to a master." << endl;