summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/db/audit.cpp3
-rw-r--r--src/mongo/db/audit.h5
-rw-r--r--src/mongo/db/commands/parameters.cpp2
3 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/db/audit.cpp b/src/mongo/db/audit.cpp
index 715e9023c15..7e6d438acf5 100644
--- a/src/mongo/db/audit.cpp
+++ b/src/mongo/db/audit.cpp
@@ -178,6 +178,9 @@ void logAuthentication(ClientBasic* client,
const BSONObj& keyPattern,
bool unique) MONGO_AUDIT_STUB
+ void logSetParameter(ClientBasic* client,
+ const std::map<std::string, BSONElement>& parametersToSet) MONGO_AUDIT_STUB
+
void writeImpersonatedUsersToMetadata(OperationContext* txn,
BSONObjBuilder* metadata) MONGO_AUDIT_STUB
diff --git a/src/mongo/db/audit.h b/src/mongo/db/audit.h
index 54c07aa1d77..7af615ff5e4 100644
--- a/src/mongo/db/audit.h
+++ b/src/mongo/db/audit.h
@@ -299,6 +299,11 @@ void logRemoveShard(ClientBasic* client, StringData shardname);
*/
void logShardCollection(ClientBasic* client, StringData ns, const BSONObj& keyPattern, bool unique);
+/**
+ * Logs the result of a setParameter command.
+ */
+void logSetParameter(ClientBasic* client,
+ const std::map<std::string, BSONElement>& parametersToSet);
/*
* Appends an array of user/db pairs and an array of role/db pairs
diff --git a/src/mongo/db/commands/parameters.cpp b/src/mongo/db/commands/parameters.cpp
index 1d2b49c8b53..5ba2f9f0781 100644
--- a/src/mongo/db/commands/parameters.cpp
+++ b/src/mongo/db/commands/parameters.cpp
@@ -37,6 +37,7 @@
#include "mongo/client/replica_set_monitor.h"
#include "mongo/client/sasl_client_authenticate.h"
#include "mongo/config.h"
+#include "mongo/db/audit.h"
#include "mongo/db/auth/authorization_manager.h"
#include "mongo/db/auth/internal_user_auth.h"
#include "mongo/db/commands.h"
@@ -232,6 +233,7 @@ public:
return false;
}
+ audit::logSetParameter(ClientBasic::getCurrent(), parametersToSet);
return true;
}
} cmdSet;