diff options
-rw-r--r-- | src/mongo/db/audit.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/audit.h | 5 | ||||
-rw-r--r-- | src/mongo/db/mongod_main.cpp | 1 | ||||
-rw-r--r-- | src/mongo/s/mongos_main.cpp | 1 |
4 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/audit.cpp b/src/mongo/db/audit.cpp index 2f62a0d26b9..c741b8c4e4c 100644 --- a/src/mongo/db/audit.cpp +++ b/src/mongo/db/audit.cpp @@ -39,6 +39,8 @@ std::function<void(ServiceContext*)> initializeSynchronizeJob; ImpersonatedClientAttrs::ImpersonatedClientAttrs(Client* client) {} +void rotateAuditLog() {} + void logClientMetadata(Client* client) { invariant(client); } diff --git a/src/mongo/db/audit.h b/src/mongo/db/audit.h index 2e4904e09df..684983bf7be 100644 --- a/src/mongo/db/audit.h +++ b/src/mongo/db/audit.h @@ -152,6 +152,11 @@ private: }; /** + * Rotates the audit log in enterprise. Only to be called on startup. + */ +void rotateAuditLog(); + +/** * Logs the result of an authentication attempt. */ void logAuthentication(Client* client, const AuthenticateEvent& event); diff --git a/src/mongo/db/mongod_main.cpp b/src/mongo/db/mongod_main.cpp index b785bd235a0..36f6842d691 100644 --- a/src/mongo/db/mongod_main.cpp +++ b/src/mongo/db/mongod_main.cpp @@ -1469,6 +1469,7 @@ int mongod_main(int argc, char* argv[]) { } } + audit::rotateAuditLog(); setUpCollectionShardingState(service); setUpCatalog(service); setUpReplication(service); diff --git a/src/mongo/s/mongos_main.cpp b/src/mongo/s/mongos_main.cpp index e945b019249..8753323ccf4 100644 --- a/src/mongo/s/mongos_main.cpp +++ b/src/mongo/s/mongos_main.cpp @@ -907,6 +907,7 @@ ExitCode mongos_main(int argc, char* argv[]) { return EXIT_ABRUPT; } + audit::rotateAuditLog(); registerShutdownTask(cleanupTask); const auto service = getGlobalServiceContext(); |