summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/authentication_commands.cpp
diff options
context:
space:
mode:
authorShreyas Kalyan <shreyas.kalyan@10gen.com>2019-02-28 13:41:40 -0500
committerShreyas Kalyan <shreyas.kalyan@10gen.com>2019-03-04 15:44:09 -0500
commit447847d93d6e0a21b018d5df45528e815c7c13d8 (patch)
tree02b7857e766fa85730a61b4b189d4cc7d48d8bfd /src/mongo/db/commands/authentication_commands.cpp
parentbede0e9b7afee4bb30025b1ffc3e22763aec9e93 (diff)
downloadmongo-r3.4.20.tar.gz
SERVER-39058 Synchronize user set modification in AuthorizationSession with Clientr3.4.20-rc0r3.4.20
(cherry picked from commit a9277e874039f32ce0d848fcdfb10de705c96fd9)
Diffstat (limited to 'src/mongo/db/commands/authentication_commands.cpp')
-rw-r--r--src/mongo/db/commands/authentication_commands.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/commands/authentication_commands.cpp b/src/mongo/db/commands/authentication_commands.cpp
index 68a483b24f9..852c8ab56ed 100644
--- a/src/mongo/db/commands/authentication_commands.cpp
+++ b/src/mongo/db/commands/authentication_commands.cpp
@@ -346,7 +346,7 @@ Status CmdAuthenticate::_authenticateX509(OperationContext* txn,
"authentication. The current configuration does not allow "
"x.509 cluster authentication, check the --clusterAuthMode flag");
}
- authorizationSession->grantInternalAuthorization();
+ authorizationSession->grantInternalAuthorization(client);
}
// Handle normal client authentication, only applies to client-server connections
else {
@@ -386,14 +386,14 @@ public:
string& errmsg,
BSONObjBuilder& result) {
AuthorizationSession* authSession = AuthorizationSession::get(Client::getCurrent());
- authSession->logoutDatabase(dbname);
+ authSession->logoutDatabase(txn, dbname);
if (Command::testCommandsEnabled && dbname == "admin") {
// Allows logging out as the internal user against the admin database, however
// this actually logs out of the local database as well. This is to
// support the auth passthrough test framework on mongos (since you can't use the
// local database on a mongos, so you can't logout as the internal user
// without this).
- authSession->logoutDatabase("local");
+ authSession->logoutDatabase(txn, "local");
}
return true;
}