summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/db/audit.cpp3
-rw-r--r--src/mongo/db/audit.h4
-rw-r--r--src/mongo/db/commands.cpp5
3 files changed, 7 insertions, 5 deletions
diff --git a/src/mongo/db/audit.cpp b/src/mongo/db/audit.cpp
index a06d0058a8f..5c7a78adabe 100644
--- a/src/mongo/db/audit.cpp
+++ b/src/mongo/db/audit.cpp
@@ -44,7 +44,8 @@ namespace audit {
void logCommandAuthzCheck(ClientBasic* client,
const NamespaceString& ns,
- const mutablebson::Document& cmdObj,
+ const BSONObj& cmdObj,
+ Command* command,
ErrorCodes::Error result) MONGO_AUDIT_STUB
void logDeleteAuthzCheck(
diff --git a/src/mongo/db/audit.h b/src/mongo/db/audit.h
index 0e6d07cf92a..2fa742c5011 100644
--- a/src/mongo/db/audit.h
+++ b/src/mongo/db/audit.h
@@ -42,6 +42,7 @@ namespace mongo {
class AuthorizationSession;
class BSONObj;
class ClientBasic;
+ class Command;
class NamespaceString;
class ReplSetConfig;
class StringData;
@@ -74,7 +75,8 @@ namespace audit {
void logCommandAuthzCheck(
ClientBasic* client,
const NamespaceString& ns,
- const mutablebson::Document& cmdObj,
+ const BSONObj& cmdObj,
+ Command* command,
ErrorCodes::Error result);
/**
diff --git a/src/mongo/db/commands.cpp b/src/mongo/db/commands.cpp
index 5d611a5d62a..37038ce0dd9 100644
--- a/src/mongo/db/commands.cpp
+++ b/src/mongo/db/commands.cpp
@@ -320,11 +320,10 @@ namespace mongo {
if (!status.isOK()) {
log(LogComponent::kAccessControl) << status << std::endl;
}
- mmb::Document cmdToLog(cmdObj, mmb::Document::kInPlaceDisabled);
- c->redactForLogging(&cmdToLog);
audit::logCommandAuthzCheck(client,
NamespaceString(c->parseNs(dbname, cmdObj)),
- cmdToLog,
+ cmdObj,
+ c,
status.code());
return status;
}