summaryrefslogtreecommitdiff
path: root/src/mongo/db/audit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/audit.cpp')
-rw-r--r--src/mongo/db/audit.cpp63
1 files changed, 60 insertions, 3 deletions
diff --git a/src/mongo/db/audit.cpp b/src/mongo/db/audit.cpp
index 15d7814d84f..6c78ded58c6 100644
--- a/src/mongo/db/audit.cpp
+++ b/src/mongo/db/audit.cpp
@@ -16,7 +16,11 @@
#include "mongo/db/audit.h"
-#if !MONGO_ENTERPRISE_VERSION
+#if MONGO_ENTERPRISE_VERSION
+#define MONGO_AUDIT_STUB ;
+#else
+#define MONGO_AUDIT_STUB {}
+#endif
namespace mongo {
namespace audit {
@@ -24,8 +28,61 @@ namespace audit {
void logCommandAuthzCheck(ClientBasic* client,
const NamespaceString& ns,
const BSONObj& cmdObj,
- ErrorCodes::Error result) {}
+ ErrorCodes::Error result) MONGO_AUDIT_STUB
+
+ void logDeleteAuthzCheck(
+ ClientBasic* client,
+ const NamespaceString& ns,
+ const BSONObj& pattern,
+ ErrorCodes::Error result) MONGO_AUDIT_STUB
+
+ void logFsyncUnlockAuthzCheck(
+ ClientBasic* client,
+ ErrorCodes::Error result) MONGO_AUDIT_STUB
+
+ void logGetMoreAuthzCheck(
+ ClientBasic* client,
+ const NamespaceString& ns,
+ long long cursorId,
+ ErrorCodes::Error result) MONGO_AUDIT_STUB
+
+ void logInProgAuthzCheck(
+ ClientBasic* client,
+ const BSONObj& filter,
+ ErrorCodes::Error result) MONGO_AUDIT_STUB
+
+ void logInsertAuthzCheck(
+ ClientBasic* client,
+ const NamespaceString& ns,
+ const BSONObj& insertedObj,
+ ErrorCodes::Error result) MONGO_AUDIT_STUB
+
+ void logKillCursorsAuthzCheck(
+ ClientBasic* client,
+ const NamespaceString& ns,
+ long long cursorId,
+ ErrorCodes::Error result) MONGO_AUDIT_STUB
+
+ void logKillOpAuthzCheck(
+ ClientBasic* client,
+ const BSONObj& filter,
+ ErrorCodes::Error result) MONGO_AUDIT_STUB
+
+ void logQueryAuthzCheck(
+ ClientBasic* client,
+ const NamespaceString& ns,
+ const BSONObj& query,
+ ErrorCodes::Error result) MONGO_AUDIT_STUB
+
+ void logUpdateAuthzCheck(
+ ClientBasic* client,
+ const NamespaceString& ns,
+ const BSONObj& query,
+ const BSONObj& updateObj,
+ bool isUpsert,
+ bool isMulti,
+ ErrorCodes::Error result) MONGO_AUDIT_STUB
+
} // namespace audit
} // namespace mongo
-#endif // !MONGO_ENTERPRISE