diff options
Diffstat (limited to 'src/mongo/db/auth/sasl_scram_server_conversation.cpp')
-rw-r--r-- | src/mongo/db/auth/sasl_scram_server_conversation.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/mongo/db/auth/sasl_scram_server_conversation.cpp b/src/mongo/db/auth/sasl_scram_server_conversation.cpp index 28cbe4537fd..d3ded3c88f8 100644 --- a/src/mongo/db/auth/sasl_scram_server_conversation.cpp +++ b/src/mongo/db/auth/sasl_scram_server_conversation.cpp @@ -342,13 +342,8 @@ StatusWith<std::tuple<bool, std::string>> SaslSCRAMServerMechanism<Policy>::_sec template class SaslSCRAMServerMechanism<SCRAMSHA1Policy>; template class SaslSCRAMServerMechanism<SCRAMSHA256Policy>; -MONGO_INITIALIZER_WITH_PREREQUISITES(SASLSCRAMServerMechanism, - ("CreateSASLServerMechanismRegistry")) -(::mongo::InitializerContext* context) { - auto& registry = SASLServerMechanismRegistry::get(getGlobalServiceContext()); - registry.registerFactory<SCRAMSHA1ServerFactory>(); - registry.registerFactory<SCRAMSHA256ServerFactory>(); - return Status::OK(); -} - +namespace { +GlobalSASLMechanismRegisterer<SCRAMSHA1ServerFactory> scramsha1Registerer; +GlobalSASLMechanismRegisterer<SCRAMSHA256ServerFactory> scramsha256Registerer; +} // namespace } // namespace mongo |