diff options
Diffstat (limited to 'src/mongo/db/auth')
27 files changed, 41 insertions, 42 deletions
diff --git a/src/mongo/db/auth/auth_op_observer.h b/src/mongo/db/auth/auth_op_observer.h index a31e09cdfe9..3e91a9c9884 100644 --- a/src/mongo/db/auth/auth_op_observer.h +++ b/src/mongo/db/auth/auth_op_observer.h @@ -38,7 +38,8 @@ namespace mongo { * relevant entries for authentication. */ class AuthOpObserver final : public OpObserver { - MONGO_DISALLOW_COPYING(AuthOpObserver); + AuthOpObserver(const AuthOpObserver&) = delete; + AuthOpObserver& operator=(const AuthOpObserver&) = delete; public: AuthOpObserver(); diff --git a/src/mongo/db/auth/authentication_session.h b/src/mongo/db/auth/authentication_session.h index 5eceeedff09..a7d5e779828 100644 --- a/src/mongo/db/auth/authentication_session.h +++ b/src/mongo/db/auth/authentication_session.h @@ -31,7 +31,6 @@ #include <memory> -#include "mongo/base/disallow_copying.h" #include "mongo/db/auth/sasl_mechanism_registry.h" namespace mongo { @@ -42,7 +41,8 @@ class Client; * Type representing an ongoing authentication session. */ class AuthenticationSession { - MONGO_DISALLOW_COPYING(AuthenticationSession); + AuthenticationSession(const AuthenticationSession&) = delete; + AuthenticationSession& operator=(const AuthenticationSession&) = delete; public: explicit AuthenticationSession(std::unique_ptr<ServerMechanismBase> mech) diff --git a/src/mongo/db/auth/authorization_manager.h b/src/mongo/db/auth/authorization_manager.h index 1ec9f421a4c..b1b6a6e0583 100644 --- a/src/mongo/db/auth/authorization_manager.h +++ b/src/mongo/db/auth/authorization_manager.h @@ -34,7 +34,6 @@ #include <boost/optional.hpp> -#include "mongo/base/disallow_copying.h" #include "mongo/base/secure_allocator.h" #include "mongo/base/shim.h" #include "mongo/base/status.h" diff --git a/src/mongo/db/auth/authorization_manager_impl.cpp b/src/mongo/db/auth/authorization_manager_impl.cpp index 9eb185421ef..bf5d941adf6 100644 --- a/src/mongo/db/auth/authorization_manager_impl.cpp +++ b/src/mongo/db/auth/authorization_manager_impl.cpp @@ -263,7 +263,8 @@ MONGO_REGISTER_SHIM(AuthorizationManager::create)()->std::unique_ptr<Authorizati * into the cache, because some invalidation event occurred during the fetch phase. */ class AuthorizationManagerImpl::CacheGuard { - MONGO_DISALLOW_COPYING(CacheGuard); + CacheGuard(const CacheGuard&) = delete; + CacheGuard& operator=(const CacheGuard&) = delete; public: /** diff --git a/src/mongo/db/auth/authorization_manager_impl.h b/src/mongo/db/auth/authorization_manager_impl.h index 66f088b69b6..8b1d1dd06a1 100644 --- a/src/mongo/db/auth/authorization_manager_impl.h +++ b/src/mongo/db/auth/authorization_manager_impl.h @@ -34,7 +34,6 @@ #include <memory> #include <string> -#include "mongo/base/disallow_copying.h" #include "mongo/base/secure_allocator.h" #include "mongo/base/status.h" #include "mongo/bson/mutable/element.h" diff --git a/src/mongo/db/auth/authorization_session_for_test.h b/src/mongo/db/auth/authorization_session_for_test.h index a52a30b2fd1..b5eee9d1efd 100644 --- a/src/mongo/db/auth/authorization_session_for_test.h +++ b/src/mongo/db/auth/authorization_session_for_test.h @@ -39,7 +39,8 @@ namespace mongo { class AuthorizationSessionForTest : public AuthorizationSessionImpl { - MONGO_DISALLOW_COPYING(AuthorizationSessionForTest); + AuthorizationSessionForTest(const AuthorizationSessionForTest&) = delete; + AuthorizationSessionForTest& operator=(const AuthorizationSessionForTest&) = delete; public: using AuthorizationSessionImpl::AuthorizationSessionImpl; diff --git a/src/mongo/db/auth/authorization_session_impl.h b/src/mongo/db/auth/authorization_session_impl.h index 2cdc380ec77..5820052f811 100644 --- a/src/mongo/db/auth/authorization_session_impl.h +++ b/src/mongo/db/auth/authorization_session_impl.h @@ -33,7 +33,6 @@ #include <string> #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/base/status.h" #include "mongo/db/auth/action_set.h" #include "mongo/db/auth/action_type.h" diff --git a/src/mongo/db/auth/authz_manager_external_state.h b/src/mongo/db/auth/authz_manager_external_state.h index 8fe4cff6ad8..361ff2a3f1f 100644 --- a/src/mongo/db/auth/authz_manager_external_state.h +++ b/src/mongo/db/auth/authz_manager_external_state.h @@ -33,7 +33,6 @@ #include <string> #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/base/shim.h" #include "mongo/base/status.h" #include "mongo/db/auth/authorization_manager.h" diff --git a/src/mongo/db/auth/authz_manager_external_state_d.h b/src/mongo/db/auth/authz_manager_external_state_d.h index d5eaecc9659..38d1c1df8b7 100644 --- a/src/mongo/db/auth/authz_manager_external_state_d.h +++ b/src/mongo/db/auth/authz_manager_external_state_d.h @@ -31,7 +31,6 @@ #include <string> -#include "mongo/base/disallow_copying.h" #include "mongo/base/status.h" #include "mongo/db/auth/authz_manager_external_state_local.h" #include "mongo/db/auth/role_graph.h" @@ -44,7 +43,8 @@ namespace mongo { * The implementation of AuthzManagerExternalState functionality for mongod. */ class AuthzManagerExternalStateMongod : public AuthzManagerExternalStateLocal { - MONGO_DISALLOW_COPYING(AuthzManagerExternalStateMongod); + AuthzManagerExternalStateMongod(const AuthzManagerExternalStateMongod&) = delete; + AuthzManagerExternalStateMongod& operator=(const AuthzManagerExternalStateMongod&) = delete; public: AuthzManagerExternalStateMongod(); diff --git a/src/mongo/db/auth/authz_manager_external_state_local.h b/src/mongo/db/auth/authz_manager_external_state_local.h index 1307fb560c4..492f182cbbd 100644 --- a/src/mongo/db/auth/authz_manager_external_state_local.h +++ b/src/mongo/db/auth/authz_manager_external_state_local.h @@ -31,7 +31,6 @@ #include <string> -#include "mongo/base/disallow_copying.h" #include "mongo/base/status.h" #include "mongo/db/auth/authz_manager_external_state.h" #include "mongo/db/auth/role_graph.h" @@ -51,7 +50,8 @@ class Document; * and user information are stored locally. */ class AuthzManagerExternalStateLocal : public AuthzManagerExternalState { - MONGO_DISALLOW_COPYING(AuthzManagerExternalStateLocal); + AuthzManagerExternalStateLocal(const AuthzManagerExternalStateLocal&) = delete; + AuthzManagerExternalStateLocal& operator=(const AuthzManagerExternalStateLocal&) = delete; public: virtual ~AuthzManagerExternalStateLocal() = default; diff --git a/src/mongo/db/auth/authz_manager_external_state_mock.h b/src/mongo/db/auth/authz_manager_external_state_mock.h index 5110f39988c..9d316a764f9 100644 --- a/src/mongo/db/auth/authz_manager_external_state_mock.h +++ b/src/mongo/db/auth/authz_manager_external_state_mock.h @@ -33,7 +33,6 @@ #include <string> #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/base/status.h" #include "mongo/db/auth/authz_manager_external_state_local.h" #include "mongo/db/auth/role_graph.h" @@ -49,7 +48,8 @@ class AuthorizationManager; * Mock of the AuthzManagerExternalState class used only for testing. */ class AuthzManagerExternalStateMock : public AuthzManagerExternalStateLocal { - MONGO_DISALLOW_COPYING(AuthzManagerExternalStateMock); + AuthzManagerExternalStateMock(const AuthzManagerExternalStateMock&) = delete; + AuthzManagerExternalStateMock& operator=(const AuthzManagerExternalStateMock&) = delete; public: AuthzManagerExternalStateMock(); diff --git a/src/mongo/db/auth/authz_manager_external_state_s.h b/src/mongo/db/auth/authz_manager_external_state_s.h index 113a3d8276e..f0f1e476c8a 100644 --- a/src/mongo/db/auth/authz_manager_external_state_s.h +++ b/src/mongo/db/auth/authz_manager_external_state_s.h @@ -32,7 +32,6 @@ #include <memory> #include <string> -#include "mongo/base/disallow_copying.h" #include "mongo/base/status.h" #include "mongo/db/auth/authz_manager_external_state.h" #include "mongo/db/auth/privilege_format.h" @@ -45,7 +44,8 @@ namespace mongo { * The implementation of AuthzManagerExternalState functionality for mongos. */ class AuthzManagerExternalStateMongos : public AuthzManagerExternalState { - MONGO_DISALLOW_COPYING(AuthzManagerExternalStateMongos); + AuthzManagerExternalStateMongos(const AuthzManagerExternalStateMongos&) = delete; + AuthzManagerExternalStateMongos& operator=(const AuthzManagerExternalStateMongos&) = delete; public: AuthzManagerExternalStateMongos(); diff --git a/src/mongo/db/auth/authz_session_external_state.h b/src/mongo/db/auth/authz_session_external_state.h index f7bffa12e31..7647a9c9df9 100644 --- a/src/mongo/db/auth/authz_session_external_state.h +++ b/src/mongo/db/auth/authz_session_external_state.h @@ -31,7 +31,6 @@ #include <string> -#include "mongo/base/disallow_copying.h" #include "mongo/base/status.h" #include "mongo/db/auth/authorization_manager.h" #include "mongo/db/auth/user_name.h" diff --git a/src/mongo/db/auth/authz_session_external_state_d.h b/src/mongo/db/auth/authz_session_external_state_d.h index 342ceed1285..1b29c027b97 100644 --- a/src/mongo/db/auth/authz_session_external_state_d.h +++ b/src/mongo/db/auth/authz_session_external_state_d.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/base/status.h" #include "mongo/db/auth/authz_session_external_state_server_common.h" @@ -39,7 +38,8 @@ namespace mongo { * The implementation of AuthzSessionExternalState functionality for mongod. */ class AuthzSessionExternalStateMongod : public AuthzSessionExternalStateServerCommon { - MONGO_DISALLOW_COPYING(AuthzSessionExternalStateMongod); + AuthzSessionExternalStateMongod(const AuthzSessionExternalStateMongod&) = delete; + AuthzSessionExternalStateMongod& operator=(const AuthzSessionExternalStateMongod&) = delete; public: AuthzSessionExternalStateMongod(AuthorizationManager* authzManager); diff --git a/src/mongo/db/auth/authz_session_external_state_mock.h b/src/mongo/db/auth/authz_session_external_state_mock.h index b616ae19e35..ade50f65f98 100644 --- a/src/mongo/db/auth/authz_session_external_state_mock.h +++ b/src/mongo/db/auth/authz_session_external_state_mock.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/base/status.h" #include "mongo/db/auth/authz_session_external_state.h" diff --git a/src/mongo/db/auth/authz_session_external_state_s.h b/src/mongo/db/auth/authz_session_external_state_s.h index a894d6fe6ae..46046e3bef1 100644 --- a/src/mongo/db/auth/authz_session_external_state_s.h +++ b/src/mongo/db/auth/authz_session_external_state_s.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/base/status.h" #include "mongo/db/auth/authz_session_external_state_server_common.h" @@ -39,7 +38,8 @@ namespace mongo { * The implementation of AuthzSessionExternalState functionality for mongos. */ class AuthzSessionExternalStateMongos : public AuthzSessionExternalStateServerCommon { - MONGO_DISALLOW_COPYING(AuthzSessionExternalStateMongos); + AuthzSessionExternalStateMongos(const AuthzSessionExternalStateMongos&) = delete; + AuthzSessionExternalStateMongos& operator=(const AuthzSessionExternalStateMongos&) = delete; public: AuthzSessionExternalStateMongos(AuthorizationManager* authzManager); diff --git a/src/mongo/db/auth/authz_session_external_state_server_common.h b/src/mongo/db/auth/authz_session_external_state_server_common.h index 110d74f3f26..51dcd1b2bc2 100644 --- a/src/mongo/db/auth/authz_session_external_state_server_common.h +++ b/src/mongo/db/auth/authz_session_external_state_server_common.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/base/status.h" #include "mongo/db/auth/authz_session_external_state.h" @@ -39,7 +38,9 @@ namespace mongo { * The implementation of AuthzSessionExternalState functionality common to mongod and mongos. */ class AuthzSessionExternalStateServerCommon : public AuthzSessionExternalState { - MONGO_DISALLOW_COPYING(AuthzSessionExternalStateServerCommon); + AuthzSessionExternalStateServerCommon(const AuthzSessionExternalStateServerCommon&) = delete; + AuthzSessionExternalStateServerCommon& operator=(const AuthzSessionExternalStateServerCommon&) = + delete; public: virtual ~AuthzSessionExternalStateServerCommon(); diff --git a/src/mongo/db/auth/impersonation_session.h b/src/mongo/db/auth/impersonation_session.h index 603142f2cbf..bab75018f8b 100644 --- a/src/mongo/db/auth/impersonation_session.h +++ b/src/mongo/db/auth/impersonation_session.h @@ -27,7 +27,6 @@ * it in the license file. */ -#include "mongo/base/disallow_copying.h" #include "mongo/rpc/metadata/impersonated_user_metadata.h" namespace mongo { @@ -38,7 +37,8 @@ class OperationContext; * for the duration of the life of this object. */ class ImpersonationSessionGuard { - MONGO_DISALLOW_COPYING(ImpersonationSessionGuard); + ImpersonationSessionGuard(const ImpersonationSessionGuard&) = delete; + ImpersonationSessionGuard& operator=(const ImpersonationSessionGuard&) = delete; public: ImpersonationSessionGuard(OperationContext* opCtx); diff --git a/src/mongo/db/auth/privilege_parser.h b/src/mongo/db/auth/privilege_parser.h index 5c7214ba047..853a371193e 100644 --- a/src/mongo/db/auth/privilege_parser.h +++ b/src/mongo/db/auth/privilege_parser.h @@ -44,7 +44,8 @@ class Privilege; * of privileges granted to roles in the role management commands. */ class ParsedResource { - MONGO_DISALLOW_COPYING(ParsedResource); + ParsedResource(const ParsedResource&) = delete; + ParsedResource& operator=(const ParsedResource&) = delete; public: // @@ -124,7 +125,8 @@ private: * This class is used to parse documents describing privileges in the role managment commands. */ class ParsedPrivilege { - MONGO_DISALLOW_COPYING(ParsedPrivilege); + ParsedPrivilege(const ParsedPrivilege&) = delete; + ParsedPrivilege& operator=(const ParsedPrivilege&) = delete; public: // diff --git a/src/mongo/db/auth/role_name.h b/src/mongo/db/auth/role_name.h index 1f319b4c49f..75aa6202920 100644 --- a/src/mongo/db/auth/role_name.h +++ b/src/mongo/db/auth/role_name.h @@ -35,7 +35,6 @@ #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/base/string_data.h" #include "mongo/bson/bsonelement.h" #include "mongo/bson/bsonobjbuilder.h" @@ -128,7 +127,8 @@ std::ostream& operator<<(std::ostream& os, const RoleName& name); class RoleNameIterator { public: class Impl { - MONGO_DISALLOW_COPYING(Impl); + Impl(const Impl&) = delete; + Impl& operator=(const Impl&) = delete; public: Impl(){}; @@ -182,7 +182,8 @@ namespace mongo { template <typename ContainerIterator> class RoleNameContainerIteratorImpl : public RoleNameIterator::Impl { - MONGO_DISALLOW_COPYING(RoleNameContainerIteratorImpl); + RoleNameContainerIteratorImpl(const RoleNameContainerIteratorImpl&) = delete; + RoleNameContainerIteratorImpl& operator=(const RoleNameContainerIteratorImpl&) = delete; public: RoleNameContainerIteratorImpl(const ContainerIterator& begin, const ContainerIterator& end) diff --git a/src/mongo/db/auth/sasl_scram_server_conversation.cpp b/src/mongo/db/auth/sasl_scram_server_conversation.cpp index e9f2fbddbce..9415376afe5 100644 --- a/src/mongo/db/auth/sasl_scram_server_conversation.cpp +++ b/src/mongo/db/auth/sasl_scram_server_conversation.cpp @@ -36,7 +36,6 @@ #include <boost/algorithm/string/join.hpp> #include <boost/algorithm/string/replace.hpp> -#include "mongo/base/disallow_copying.h" #include "mongo/base/init.h" #include "mongo/base/status.h" #include "mongo/base/string_data.h" diff --git a/src/mongo/db/auth/user.h b/src/mongo/db/auth/user.h index 5b3edfb767f..9ed29c72409 100644 --- a/src/mongo/db/auth/user.h +++ b/src/mongo/db/auth/user.h @@ -32,7 +32,6 @@ #include <string> #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/crypto/sha1_block.h" #include "mongo/crypto/sha256_block.h" #include "mongo/db/auth/privilege.h" @@ -61,7 +60,8 @@ namespace mongo { * user from the AuthorizationManager. */ class User { - MONGO_DISALLOW_COPYING(User); + User(const User&) = delete; + User& operator=(const User&) = delete; public: template <typename HashBlock> diff --git a/src/mongo/db/auth/user_document_parser.h b/src/mongo/db/auth/user_document_parser.h index 7493ce7d324..4fca54c3739 100644 --- a/src/mongo/db/auth/user_document_parser.h +++ b/src/mongo/db/auth/user_document_parser.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/base/status.h" #include "mongo/db/auth/action_set.h" #include "mongo/db/auth/user.h" @@ -38,7 +37,8 @@ namespace mongo { class V2UserDocumentParser { - MONGO_DISALLOW_COPYING(V2UserDocumentParser); + V2UserDocumentParser(const V2UserDocumentParser&) = delete; + V2UserDocumentParser& operator=(const V2UserDocumentParser&) = delete; public: V2UserDocumentParser() {} diff --git a/src/mongo/db/auth/user_management_commands_parser.h b/src/mongo/db/auth/user_management_commands_parser.h index ba337f132c2..d249871a63b 100644 --- a/src/mongo/db/auth/user_management_commands_parser.h +++ b/src/mongo/db/auth/user_management_commands_parser.h @@ -32,7 +32,6 @@ #include <string> #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/base/status.h" #include "mongo/base/string_data.h" #include "mongo/db/auth/authorization_manager.h" diff --git a/src/mongo/db/auth/user_name.h b/src/mongo/db/auth/user_name.h index fe9d560a397..fde52bc3297 100644 --- a/src/mongo/db/auth/user_name.h +++ b/src/mongo/db/auth/user_name.h @@ -35,7 +35,6 @@ #include "mongo/base/clonable_ptr.h" -#include "mongo/base/disallow_copying.h" #include "mongo/base/status_with.h" #include "mongo/base/string_data.h" #include "mongo/bson/bsonelement.h" diff --git a/src/mongo/db/auth/user_set.cpp b/src/mongo/db/auth/user_set.cpp index 6ca9c2e6b90..52fa1bf164a 100644 --- a/src/mongo/db/auth/user_set.cpp +++ b/src/mongo/db/auth/user_set.cpp @@ -41,7 +41,8 @@ namespace mongo { namespace { class UserSetNameIteratorImpl : public UserNameIterator::Impl { - MONGO_DISALLOW_COPYING(UserSetNameIteratorImpl); + UserSetNameIteratorImpl(const UserSetNameIteratorImpl&) = delete; + UserSetNameIteratorImpl& operator=(const UserSetNameIteratorImpl&) = delete; public: UserSetNameIteratorImpl(const UserSet::const_iterator& begin, diff --git a/src/mongo/db/auth/user_set.h b/src/mongo/db/auth/user_set.h index 91941621984..b4e88f7bbd7 100644 --- a/src/mongo/db/auth/user_set.h +++ b/src/mongo/db/auth/user_set.h @@ -32,7 +32,6 @@ #include <string> #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/base/string_data.h" #include "mongo/db/auth/authorization_manager.h" #include "mongo/db/auth/user.h" @@ -47,7 +46,8 @@ namespace mongo { * synchronizing access. */ class UserSet { - MONGO_DISALLOW_COPYING(UserSet); + UserSet(const UserSet&) = delete; + UserSet& operator=(const UserSet&) = delete; public: using iterator = stdx::list<UserHandle>::iterator; |