diff options
author | Andy Schwerin <schwerin@10gen.com> | 2012-11-26 13:58:49 -0500 |
---|---|---|
committer | Andy Schwerin <schwerin@10gen.com> | 2012-11-26 14:08:24 -0500 |
commit | 5765b96d9c11f7ec84609e5554e2ba3b3821dced (patch) | |
tree | d9d0723caa4516bea4e3063a41dd98bdd7105667 /src/mongo/db/repl.cpp | |
parent | 43aca5859689ec16c6504e2b9afd5d68155a5a3e (diff) | |
download | mongo-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.cpp | 3 |
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) ) { |