summaryrefslogtreecommitdiff
path: root/src/mongo/db
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db')
-rw-r--r--src/mongo/db/auth/authorization_session.cpp4
-rw-r--r--src/mongo/db/auth/authorization_session.h3
-rw-r--r--src/mongo/db/auth/authz_session_external_state_s.cpp15
-rw-r--r--src/mongo/db/auth/privilege_parser.cpp14
-rw-r--r--src/mongo/db/auth/privilege_parser.h3
-rw-r--r--src/mongo/db/auth/user_set.h3
6 files changed, 0 insertions, 42 deletions
diff --git a/src/mongo/db/auth/authorization_session.cpp b/src/mongo/db/auth/authorization_session.cpp
index a9f0887253e..001b628dffc 100644
--- a/src/mongo/db/auth/authorization_session.cpp
+++ b/src/mongo/db/auth/authorization_session.cpp
@@ -96,10 +96,6 @@ namespace {
return _authenticatedUsers.lookup(name);
}
- size_t AuthorizationSession::getNumAuthenticatedUsers() {
- return _authenticatedUsers.size();
- }
-
void AuthorizationSession::logoutDatabase(const std::string& dbname) {
clearImpersonatedUserNames();
User* removedUser = _authenticatedUsers.removeByDBName(dbname);
diff --git a/src/mongo/db/auth/authorization_session.h b/src/mongo/db/auth/authorization_session.h
index 3a64792b611..6c32fa697ae 100644
--- a/src/mongo/db/auth/authorization_session.h
+++ b/src/mongo/db/auth/authorization_session.h
@@ -85,9 +85,6 @@ namespace mongo {
// and ownership of the user stays with the AuthorizationManager
User* lookupUser(const UserName& name);
- // Returns the number of authenticated users in this session.
- size_t getNumAuthenticatedUsers();
-
// Gets an iterator over the names of all authenticated users stored in this manager.
UserNameIterator getAuthenticatedUserNames();
diff --git a/src/mongo/db/auth/authz_session_external_state_s.cpp b/src/mongo/db/auth/authz_session_external_state_s.cpp
index 4015679fefe..14801eae945 100644
--- a/src/mongo/db/auth/authz_session_external_state_s.cpp
+++ b/src/mongo/db/auth/authz_session_external_state_s.cpp
@@ -47,19 +47,4 @@ namespace mongo {
_checkShouldAllowLocalhost();
}
- namespace {
- ScopedDbConnection* getConnectionForUsersCollection(const std::string& ns) {
- //
- // Note: The connection mechanism here is *not* ideal, and should not be used elsewhere.
- // If the primary for the collection moves, this approach may throw rather than handle
- // version exceptions.
- //
-
- DBConfigPtr config = grid.getDBConfig(ns);
- Shard s = config->getShard(ns);
-
- return new ScopedDbConnection(s.getConnString(), 30.0);
- }
- }
-
} // namespace mongo
diff --git a/src/mongo/db/auth/privilege_parser.cpp b/src/mongo/db/auth/privilege_parser.cpp
index 18acabd2611..88dfbf961b0 100644
--- a/src/mongo/db/auth/privilege_parser.cpp
+++ b/src/mongo/db/auth/privilege_parser.cpp
@@ -314,20 +314,6 @@ namespace mongo {
}
- void ParsedPrivilege::cloneTo(ParsedPrivilege* other) const {
- other->clear();
-
- for(std::vector<string>::const_iterator it = _actions.begin();
- it != _actions.end();
- ++it) {
- other->addToActions(*it);
- }
- other->_isActionsSet = _isActionsSet;
-
- _resource.cloneTo(&other->_resource);
- other->_isResourceSet = _isResourceSet;
- }
-
std::string ParsedPrivilege::toString() const {
return toBSON().toString();
}
diff --git a/src/mongo/db/auth/privilege_parser.h b/src/mongo/db/auth/privilege_parser.h
index e82e8c5e2eb..fc39566e311 100644
--- a/src/mongo/db/auth/privilege_parser.h
+++ b/src/mongo/db/auth/privilege_parser.h
@@ -154,9 +154,6 @@ namespace mongo {
ParsedPrivilege* result,
std::string* errmsg);
- /** Copies all the fields present in 'this' to 'other'. */
- void cloneTo(ParsedPrivilege* other) const;
-
//
// bson serializable interface implementation
//
diff --git a/src/mongo/db/auth/user_set.h b/src/mongo/db/auth/user_set.h
index 591a9bdb9fa..37053157559 100644
--- a/src/mongo/db/auth/user_set.h
+++ b/src/mongo/db/auth/user_set.h
@@ -85,9 +85,6 @@ namespace mongo {
// exist. There should be at most one such user.
User* lookupByDBName(const StringData& dbname) const;
- // Returns how many users are in the set.
- size_t size() const { return _users.size(); };
-
// Gets an iterator over the names of the users stored in the set. The iterator is
// valid until the next non-const method is called on the UserSet.
UserNameIterator getNames() const;