summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/authentication_commands.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands/authentication_commands.cpp')
-rw-r--r--src/mongo/db/commands/authentication_commands.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/commands/authentication_commands.cpp b/src/mongo/db/commands/authentication_commands.cpp
index 0f5b5b7a546..00c455021b1 100644
--- a/src/mongo/db/commands/authentication_commands.cpp
+++ b/src/mongo/db/commands/authentication_commands.cpp
@@ -171,14 +171,16 @@ public:
auto dbname = request().getDbName();
auto* as = AuthorizationSession::get(opCtx->getClient());
- as->logoutDatabase(opCtx, dbname);
+ as->logoutDatabase(opCtx->getClient(), dbname, "Logging out on user request");
if (getTestCommandsEnabled() && (dbname == kAdminDB)) {
// 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).
- as->logoutDatabase(opCtx, kLocalDB);
+ as->logoutDatabase(opCtx->getClient(),
+ kLocalDB,
+ "Logging out from local database for test purposes");
}
}
};