summaryrefslogtreecommitdiff
path: root/src/mongo
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo')
-rw-r--r--src/mongo/client/connpool.cpp4
-rw-r--r--src/mongo/client/syncclusterconnection.cpp14
-rw-r--r--src/mongo/client/syncclusterconnection.h3
-rw-r--r--src/mongo/db/commands/isself.cpp2
-rw-r--r--src/mongo/db/connection_factory.cpp16
-rw-r--r--src/mongo/db/repl.cpp5
-rw-r--r--src/mongo/db/repl/connections.h2
-rw-r--r--src/mongo/s/shard.cpp6
-rw-r--r--src/mongo/s/shardconnection.cpp4
9 files changed, 1 insertions, 55 deletions
diff --git a/src/mongo/client/connpool.cpp b/src/mongo/client/connpool.cpp
index bfeb9365378..71cc6303b52 100644
--- a/src/mongo/client/connpool.cpp
+++ b/src/mongo/client/connpool.cpp
@@ -101,10 +101,6 @@ namespace mongo {
_pool.pop();
bool res;
bool alive = false;
- // When a connection is in the pool it doesn't have an AuthenticationTable set.
- // Set the table temporarily for the isMaster command.
- c.conn->setAuthenticationTable(
- AuthenticationTable::getInternalSecurityAuthenticationTable() );
try {
c.conn->isMaster( res );
alive = true;
diff --git a/src/mongo/client/syncclusterconnection.cpp b/src/mongo/client/syncclusterconnection.cpp
index 9e0fe7b3797..0d4106e0693 100644
--- a/src/mongo/client/syncclusterconnection.cpp
+++ b/src/mongo/client/syncclusterconnection.cpp
@@ -274,20 +274,6 @@ namespace mongo {
// TODO: logout is required for use of this class outside of a cluster environment
- void SyncClusterConnection::setAuthenticationTable( const AuthenticationTable& auth ) {
- for( size_t i = 0; i < _conns.size(); ++i ) {
- _conns[i]->setAuthenticationTable( auth );
- }
- DBClientWithCommands::setAuthenticationTable( auth );
- }
-
- void SyncClusterConnection::clearAuthenticationTable() {
- for( size_t i = 0; i < _conns.size(); ++i ) {
- _conns[i]->clearAuthenticationTable();
- }
- DBClientWithCommands::clearAuthenticationTable();
- }
-
auto_ptr<DBClientCursor> SyncClusterConnection::query(const string &ns, Query query, int nToReturn, int nToSkip,
const BSONObj *fieldsToReturn, int queryOptions, int batchSize ) {
_lastErrors.clear();
diff --git a/src/mongo/client/syncclusterconnection.h b/src/mongo/client/syncclusterconnection.h
index 10baba9fded..42a910db35f 100644
--- a/src/mongo/client/syncclusterconnection.h
+++ b/src/mongo/client/syncclusterconnection.h
@@ -110,9 +110,6 @@ namespace mongo {
virtual bool auth(const string &dbname, const string &username, const string &password_text, string& errmsg, bool digestPassword, Auth::Level* level=NULL);
- virtual void setAuthenticationTable( const AuthenticationTable& auth );
- virtual void clearAuthenticationTable();
-
virtual bool lazySupported() const { return false; }
private:
SyncClusterConnection( SyncClusterConnection& prev, double socketTimeout = 0 );
diff --git a/src/mongo/db/commands/isself.cpp b/src/mongo/db/commands/isself.cpp
index fcca300f7e3..d02cfa8b1b8 100644
--- a/src/mongo/db/commands/isself.cpp
+++ b/src/mongo/db/commands/isself.cpp
@@ -248,8 +248,6 @@ namespace mongo {
if (!conn.auth("local", internalSecurity.user, internalSecurity.pwd, errmsg, false)) {
return false;
}
- conn.setAuthenticationTable(
- AuthenticationTable::getInternalSecurityAuthenticationTable() );
}
BSONObj out;
diff --git a/src/mongo/db/connection_factory.cpp b/src/mongo/db/connection_factory.cpp
index c3f00e594bd..47cf30874da 100644
--- a/src/mongo/db/connection_factory.cpp
+++ b/src/mongo/db/connection_factory.cpp
@@ -27,20 +27,12 @@ namespace mongo {
ScopedDbConnection* ScopedDbConnection::getScopedDbConnection() {
ScopedDbConnection* conn = new ScopedDbConnection();
- if ( !noauth ) {
- conn->_conn->setAuthenticationTable(
- ClientBasic::getCurrent()->getAuthenticationInfo()->getAuthTable() );
- }
return conn;
}
ScopedDbConnection* ScopedDbConnection::getScopedDbConnection(const string& host,
double socketTimeout) {
ScopedDbConnection* conn = new ScopedDbConnection(host, socketTimeout);
- if ( !noauth ) {
- conn->_conn->setAuthenticationTable(
- ClientBasic::getCurrent()->getAuthenticationInfo()->getAuthTable() );
- }
return conn;
}
@@ -52,20 +44,12 @@ namespace mongo {
ScopedDbConnection* ScopedDbConnection::getInternalScopedDbConnection() {
ScopedDbConnection* conn = new ScopedDbConnection();
- if ( !noauth ) {
- conn->_conn->setAuthenticationTable(
- AuthenticationTable::getInternalSecurityAuthenticationTable() );
- }
return conn;
}
ScopedDbConnection* ScopedDbConnection::getInternalScopedDbConnection(const string& host,
double socketTimeout) {
ScopedDbConnection* conn = new ScopedDbConnection(host, socketTimeout);
- if ( !noauth ) {
- conn->_conn->setAuthenticationTable(
- AuthenticationTable::getInternalSecurityAuthenticationTable() );
- }
return conn;
}
diff --git a/src/mongo/db/repl.cpp b/src/mongo/db/repl.cpp
index bf7d3f3384b..688f9abee49 100644
--- a/src/mongo/db/repl.cpp
+++ b/src/mongo/db/repl.cpp
@@ -1160,10 +1160,7 @@ namespace mongo {
log() << "replauthenticate: can't authenticate to master server, user:" << u << endl;
return false;
}
- if ( internalSecurity.pwd.length() > 0 ) {
- conn->setAuthenticationTable(
- AuthenticationTable::getInternalSecurityAuthenticationTable() );
- }
+
return true;
}
diff --git a/src/mongo/db/repl/connections.h b/src/mongo/db/repl/connections.h
index 6b5c17e7123..09eac82ceda 100644
--- a/src/mongo/db/repl/connections.h
+++ b/src/mongo/db/repl/connections.h
@@ -135,8 +135,6 @@ namespace mongo {
log() << "could not authenticate against " << _hostport << ", " << err << rsLog;
return false;
}
- connInfo->cc->setAuthenticationTable(
- AuthenticationTable::getInternalSecurityAuthenticationTable() );
}
return true;
diff --git a/src/mongo/s/shard.cpp b/src/mongo/s/shard.cpp
index 3a399a500f1..64b91637806 100644
--- a/src/mongo/s/shard.cpp
+++ b/src/mongo/s/shard.cpp
@@ -413,12 +413,6 @@ namespace mongo {
uassert( 15847, str::stream() << "can't authenticate to server "
<< conn->getServerAddress() << causedBy( err ), result );
-
- if ( conn->type() == ConnectionString::SYNC ) {
- // Connections to the config servers should always have full access.
- conn->setAuthenticationTable(
- AuthenticationTable::getInternalSecurityAuthenticationTable() );
- }
}
if ( _shardedConnections && versionManager.isVersionableCB( conn ) ) {
diff --git a/src/mongo/s/shardconnection.cpp b/src/mongo/s/shardconnection.cpp
index bb8b9f5ee64..d1f78e15388 100644
--- a/src/mongo/s/shardconnection.cpp
+++ b/src/mongo/s/shardconnection.cpp
@@ -83,10 +83,6 @@ namespace mongo {
s->created++;
c.reset( shardConnectionPool.get( addr ) );
}
- if ( !noauth ) {
- c->setAuthenticationTable( ClientBasic::getCurrent()->getAuthenticationInfo()->
- getAuthTable() );
- }
return c.release();
}