summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2011-04-04 12:47:32 -0400
committerEliot Horowitz <eliot@10gen.com>2011-05-03 11:19:14 -0400
commit9061285aaed453d6ae63f3ef96a9e4d09456cb98 (patch)
treed2e35f359881aa5b193796e1b29421c09aa55a37
parentab257b80a20324c4090407cb3a2daf20b2ecc396 (diff)
downloadmongo-9061285aaed453d6ae63f3ef96a9e4d09456cb98.tar.gz
Make mongodump --oplog work with auth SERVER-2850
-rw-r--r--tools/dump.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/dump.cpp b/tools/dump.cpp
index c99aaaa1e24..155f84b8c35 100644
--- a/tools/dump.cpp
+++ b/tools/dump.cpp
@@ -293,6 +293,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;