summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Studer <greg@10gen.com>2013-01-08 15:30:28 -0500
committerGreg Studer <greg@10gen.com>2013-01-08 15:30:28 -0500
commite330e5269e9a243e167c5933809602e5e0a36e39 (patch)
tree85d34d19d3858f85c965cca92527b0a0d586c0fe
parentd857206880ff052f71ebc1593a600d9e327dddde (diff)
downloadmongo-e330e5269e9a243e167c5933809602e5e0a36e39.tar.gz
SERVER-8112 use a scopeddbconnection for auth to unsharded auth collection
-rw-r--r--src/mongo/s/security.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/s/security.cpp b/src/mongo/s/security.cpp
index cda712815a4..f309369c20d 100644
--- a/src/mongo/s/security.cpp
+++ b/src/mongo/s/security.cpp
@@ -79,7 +79,9 @@ namespace mongo {
DBConfigPtr config = grid.getDBConfig( adminNs );
Shard s = config->getShard( adminNs );
- ShardConnection conn( s, adminNs );
+ scoped_ptr<ScopedDbConnection> connPtr(
+ ScopedDbConnection::getInternalScopedDbConnection(s.getConnString(), 30.0));
+ ScopedDbConnection& conn = *connPtr;
BSONObj result = conn->findOne("admin.system.users", Query());
if( result.isEmpty() ) {
if( ! _warned ) {