diff options
author | sergey.galtsev <sergey.galtsev@mongodb.com> | 2021-11-01 20:11:09 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-11-01 21:20:31 +0000 |
commit | 8ac4553c3d5c7509ea708c31a7f0232b2b3d4f4f (patch) | |
tree | 11dbb66e14cd1ce9731a2c52296ed24d4b22f95e /src/mongo/db/auth/security_key.cpp | |
parent | 102cc8aeb299faadd9349c3ffd23f7ca9ff3c32b (diff) | |
download | mongo-8ac4553c3d5c7509ea708c31a7f0232b2b3d4f4f.tar.gz |
SERVER-45717 Allow changes to clusterIpSourceAllowlist without restart
Diffstat (limited to 'src/mongo/db/auth/security_key.cpp')
-rw-r--r-- | src/mongo/db/auth/security_key.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/auth/security_key.cpp b/src/mongo/db/auth/security_key.cpp index f69dfeba5e1..2554dd7565e 100644 --- a/src/mongo/db/auth/security_key.cpp +++ b/src/mongo/db/auth/security_key.cpp @@ -83,8 +83,8 @@ public: "error"_attr = swSaslPassword.getStatus()); return boost::none; } - const auto passwordDigest = - mongo::createPasswordDigest(internalSecurity.user->getName().getUser(), password); + const auto passwordDigest = mongo::createPasswordDigest( + (*internalSecurity.getUser())->getName().getUser(), password); User::CredentialData credentials; if (!_copyCredentials( @@ -154,7 +154,8 @@ bool setUpSecurityKey(const string& filename, ClusterAuthMode mode) { return false; } - internalSecurity.user->setCredentials(std::move(*credentials)); + internalSecurity.credentials = credentials; + (*internalSecurity.getUser())->setCredentials(credentials.value()); if (keyStrings.size() == 2) { credentials = generator.generate(keyStrings[1]); |