summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSpencer T Brody <spencer@mongodb.com>2014-03-24 15:04:40 -0400
committerSpencer T Brody <spencer@mongodb.com>2014-04-14 13:26:01 -0400
commit36498086c193c299a1fb299fbd6b5c6290d0fbac (patch)
tree3a615a1860a765e8d135fe43eff7b54e932ee77d
parent122aaea7105a99a343c4e2b2934bb1cb731047b2 (diff)
downloadmongo-36498086c193c299a1fb299fbd6b5c6290d0fbac.tar.gz
SERVER-13330 Removed unused setParameter option supportCompatibilityFormPrivilegeDocuments
-rw-r--r--src/mongo/db/auth/SConscript3
-rw-r--r--src/mongo/db/auth/auth_server_parameters.cpp45
-rw-r--r--src/mongo/db/auth/authorization_manager.cpp10
-rw-r--r--src/mongo/db/auth/authorization_manager.h13
-rw-r--r--src/mongo/db/mongod_options.cpp9
5 files changed, 1 insertions, 79 deletions
diff --git a/src/mongo/db/auth/SConscript b/src/mongo/db/auth/SConscript
index c10c05d3278..69483fc4a4a 100644
--- a/src/mongo/db/auth/SConscript
+++ b/src/mongo/db/auth/SConscript
@@ -37,8 +37,7 @@ env.Library('authcore', ['action_set.cpp',
'$BUILD_DIR/mongo/stringutils'])
env.Library('authservercommon',
- ['auth_server_parameters.cpp',
- 'authorization_manager_global.cpp',
+ ['authorization_manager_global.cpp',
'authz_session_external_state_server_common.cpp',
'security_key.cpp'],
LIBDEPS=['authcore'])
diff --git a/src/mongo/db/auth/auth_server_parameters.cpp b/src/mongo/db/auth/auth_server_parameters.cpp
deleted file mode 100644
index 307c8ece6f8..00000000000
--- a/src/mongo/db/auth/auth_server_parameters.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
-* Copyright (C) 2012 10gen Inc.
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Affero General Public License, version 3,
-* as published by the Free Software Foundation.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Affero General Public License for more details.
-*
-* You should have received a copy of the GNU Affero General Public License
-* along with this program. If not, see <http://www.gnu.org/licenses/>.
-*
-* As a special exception, the copyright holders give permission to link the
-* code of portions of this program with the OpenSSL library under certain
-* conditions as described in each individual source file and distribute
-* linked combinations including the program with the OpenSSL library. You
-* must comply with the GNU Affero General Public License in all respects for
-* all of the code used other than as permitted herein. If you modify file(s)
-* with this exception, you may extend this exception to your version of the
-* file(s), but you are not obligated to do so. If you do not wish to do so,
-* delete this exception statement from your version. If you delete this
-* exception statement from all source files in the program, then also delete
-* it in the license file.
-*/
-
-#include "mongo/base/init.h"
-#include "mongo/db/auth/authorization_manager.h"
-#include "mongo/db/server_parameters.h"
-
-namespace mongo {
-namespace {
-
- MONGO_EXPORT_STARTUP_SERVER_PARAMETER(supportCompatibilityFormPrivilegeDocuments, bool, true);
-
- MONGO_INITIALIZER(AuthSetPrivilegeDocumentCompatibilitySupport)(InitializerContext*) {
- AuthorizationManager::setSupportOldStylePrivilegeDocuments(
- supportCompatibilityFormPrivilegeDocuments);
- return Status::OK();
- }
-
-} // namespace
-} // namespace mongo
diff --git a/src/mongo/db/auth/authorization_manager.cpp b/src/mongo/db/auth/authorization_manager.cpp
index cf2e97e4e0f..7c448f32aa0 100644
--- a/src/mongo/db/auth/authorization_manager.cpp
+++ b/src/mongo/db/auth/authorization_manager.cpp
@@ -109,8 +109,6 @@ namespace mongo {
const int AuthorizationManager::schemaVersion26Final;
#endif
- bool AuthorizationManager::_doesSupportOldStylePrivileges = true;
-
/**
* Guard object for synchronizing accesses to data cached in AuthorizationManager instances.
* This guard allows one thread to access the cache at a time, and provides an exception-safe
@@ -284,14 +282,6 @@ namespace mongo {
return Status::OK();
}
- void AuthorizationManager::setSupportOldStylePrivilegeDocuments(bool enabled) {
- _doesSupportOldStylePrivileges = enabled;
- }
-
- bool AuthorizationManager::getSupportOldStylePrivilegeDocuments() {
- return _doesSupportOldStylePrivileges;
- }
-
void AuthorizationManager::setAuthEnabled(bool enabled) {
_authEnabled = enabled;
}
diff --git a/src/mongo/db/auth/authorization_manager.h b/src/mongo/db/auth/authorization_manager.h
index 3ad54dd6106..0d6c5f853df 100644
--- a/src/mongo/db/auth/authorization_manager.h
+++ b/src/mongo/db/auth/authorization_manager.h
@@ -127,17 +127,6 @@ namespace mongo {
// TODO: Make the following functions no longer static.
/**
- * Sets whether or not we allow old style (pre v2.4) privilege documents for this whole
- * server. Only relevant prior to upgrade.
- */
- static void setSupportOldStylePrivilegeDocuments(bool enabled);
-
- /**
- * Returns true if we allow old style privilege privilege documents for this whole server.
- */
- static bool getSupportOldStylePrivilegeDocuments();
-
- /**
* Takes a vector of privileges and fills the output param "resultArray" with a BSON array
* representation of the privileges.
*/
@@ -457,8 +446,6 @@ namespace mongo {
*/
Status _fetchUserV1(const UserName& userName, std::auto_ptr<User>* acquiredUser);
- static bool _doesSupportOldStylePrivileges;
-
/**
* True if access control enforcement is enabled in this AuthorizationManager.
*
diff --git a/src/mongo/db/mongod_options.cpp b/src/mongo/db/mongod_options.cpp
index c43df99596e..c305fc5875d 100644
--- a/src/mongo/db/mongod_options.cpp
+++ b/src/mongo/db/mongod_options.cpp
@@ -115,9 +115,6 @@ namespace mongo {
"TODO")
.setSources(moe::SourceYAMLConfig);
- general_options.addOptionChaining("security.supportCompatibilityFormPrivilegeDocuments", "",
- moe::String, "TODO")
- .setSources(moe::SourceYAMLConfig);
// Network Options
@@ -795,12 +792,6 @@ namespace mongo {
"files");
}
- if (params.count("security.supportCompatibilityFormPrivilegeDocuments")) {
- return Status(ErrorCodes::BadValue,
- "security.supportCompatibilityFormPrivilegeDocuments is currently not "
- "supported in config files");
- }
-
if (params.count("storage.dbPath")) {
storageGlobalParams.dbpath = params["storage.dbPath"].as<string>();
if (params.count("processManagement.fork") && storageGlobalParams.dbpath[0] != '/') {