summaryrefslogtreecommitdiff
path: root/src/mongo/db
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2015-01-09 09:03:11 -0500
committerEliot Horowitz <eliot@10gen.com>2015-01-09 09:17:13 -0500
commit5f3d618cc212c5d364568e56335e93e7e6ad4937 (patch)
treecdb714503fb7e40f0b2c5c9cbad42749edc62a47 /src/mongo/db
parent2ca0b90c51864e5d71abd018242cdb3b64dda66b (diff)
downloadmongo-5f3d618cc212c5d364568e56335e93e7e6ad4937.tar.gz
logCommandAuthzCheck doesn't need to allocate a NamespaceString when not needed
Diffstat (limited to 'src/mongo/db')
-rw-r--r--src/mongo/db/audit.cpp2
-rw-r--r--src/mongo/db/audit.h2
-rw-r--r--src/mongo/db/commands.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/audit.cpp b/src/mongo/db/audit.cpp
index 5c7a78adabe..c49f8b4cbcf 100644
--- a/src/mongo/db/audit.cpp
+++ b/src/mongo/db/audit.cpp
@@ -43,7 +43,7 @@ namespace audit {
ErrorCodes::Error result) MONGO_AUDIT_STUB
void logCommandAuthzCheck(ClientBasic* client,
- const NamespaceString& ns,
+ const std::string& dbname,
const BSONObj& cmdObj,
Command* command,
ErrorCodes::Error result) MONGO_AUDIT_STUB
diff --git a/src/mongo/db/audit.h b/src/mongo/db/audit.h
index 2fa742c5011..d43ff9768f4 100644
--- a/src/mongo/db/audit.h
+++ b/src/mongo/db/audit.h
@@ -74,7 +74,7 @@ namespace audit {
*/
void logCommandAuthzCheck(
ClientBasic* client,
- const NamespaceString& ns,
+ const std::string& dbname,
const BSONObj& cmdObj,
Command* command,
ErrorCodes::Error result);
diff --git a/src/mongo/db/commands.cpp b/src/mongo/db/commands.cpp
index f78e523d59e..3b6200d8cbf 100644
--- a/src/mongo/db/commands.cpp
+++ b/src/mongo/db/commands.cpp
@@ -344,7 +344,7 @@ namespace mongo {
log(LogComponent::kAccessControl) << status << std::endl;
}
audit::logCommandAuthzCheck(client,
- NamespaceString(c->parseNs(dbname, cmdObj)),
+ dbname,
cmdObj,
c,
status.code());