summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl.cpp
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@10gen.com>2012-11-26 13:58:49 -0500
committerAndy Schwerin <schwerin@10gen.com>2012-11-26 14:08:24 -0500
commit5765b96d9c11f7ec84609e5554e2ba3b3821dced (patch)
treed9d0723caa4516bea4e3063a41dd98bdd7105667 /src/mongo/db/repl.cpp
parent43aca5859689ec16c6504e2b9afd5d68155a5a3e (diff)
downloadmongo-5765b96d9c11f7ec84609e5554e2ba3b3821dced.tar.gz
SERVER-7428 Only obtain a ReadContext on the "local" database when performing replAuthenticate.
No need for global write privilege, just database read to read the local.system.users collection.
Diffstat (limited to 'src/mongo/db/repl.cpp')
-rw-r--r--src/mongo/db/repl.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mongo/db/repl.cpp b/src/mongo/db/repl.cpp
index 4665c94da46..2be5abcf4e9 100644
--- a/src/mongo/db/repl.cpp
+++ b/src/mongo/db/repl.cpp
@@ -1085,8 +1085,7 @@ namespace mongo {
else {
BSONObj user;
{
- Lock::GlobalWrite lk;
- Client::Context ctxt("local.");
+ Client::ReadContext ctxt("local.");
if( !Helpers::findOne("local.system.users", userReplQuery, user) ||
// try the first user in local
!Helpers::getSingleton("local.system.users", user) ) {