summaryrefslogtreecommitdiff
path: root/src/mongo/db/auth
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/auth')
-rw-r--r--src/mongo/db/auth/authz_manager_external_state_local.h1
-rw-r--r--src/mongo/db/auth/impersonation_session.cpp1
-rw-r--r--src/mongo/db/auth/role_name.h1
-rw-r--r--src/mongo/db/auth/user_cache_invalidator_job.cpp7
4 files changed, 7 insertions, 3 deletions
diff --git a/src/mongo/db/auth/authz_manager_external_state_local.h b/src/mongo/db/auth/authz_manager_external_state_local.h
index 883d9d261e7..c9646686b03 100644
--- a/src/mongo/db/auth/authz_manager_external_state_local.h
+++ b/src/mongo/db/auth/authz_manager_external_state_local.h
@@ -37,6 +37,7 @@
#include "mongo/db/auth/role_name.h"
#include "mongo/db/auth/user_name.h"
#include "mongo/stdx/functional.h"
+#include "mongo/stdx/mutex.h"
namespace mongo {
diff --git a/src/mongo/db/auth/impersonation_session.cpp b/src/mongo/db/auth/impersonation_session.cpp
index 228d5567807..791e3c56a0b 100644
--- a/src/mongo/db/auth/impersonation_session.cpp
+++ b/src/mongo/db/auth/impersonation_session.cpp
@@ -41,6 +41,7 @@
#include "mongo/db/operation_context.h"
#include "mongo/rpc/metadata/audit_metadata.h"
#include "mongo/util/assert_util.h"
+#include "mongo/util/destructor_guard.h"
namespace mongo {
diff --git a/src/mongo/db/auth/role_name.h b/src/mongo/db/auth/role_name.h
index 30ef4d50412..7606b216c02 100644
--- a/src/mongo/db/auth/role_name.h
+++ b/src/mongo/db/auth/role_name.h
@@ -29,6 +29,7 @@
#pragma once
#include <iosfwd>
+#include <memory>
#include <string>
#include <vector>
diff --git a/src/mongo/db/auth/user_cache_invalidator_job.cpp b/src/mongo/db/auth/user_cache_invalidator_job.cpp
index cda52569f1f..ef64311cbe6 100644
--- a/src/mongo/db/auth/user_cache_invalidator_job.cpp
+++ b/src/mongo/db/auth/user_cache_invalidator_job.cpp
@@ -141,11 +141,12 @@ void UserCacheInvalidator::run() {
while (true) {
stdx::unique_lock<stdx::mutex> lock(invalidationIntervalMutex);
- Date_t sleepUntil = lastInvalidationTime + Seconds(userCacheInvalidationIntervalSecs);
+ Date_t sleepUntil =
+ lastInvalidationTime + Seconds(userCacheInvalidationIntervalSecs.load());
Date_t now = Date_t::now();
while (now < sleepUntil) {
- invalidationIntervalChangedCondition.wait_for(lock, sleepUntil - now);
- sleepUntil = lastInvalidationTime + Seconds(userCacheInvalidationIntervalSecs);
+ invalidationIntervalChangedCondition.wait_until(lock, sleepUntil.toSystemTimePoint());
+ sleepUntil = lastInvalidationTime + Seconds(userCacheInvalidationIntervalSecs.load());
now = Date_t::now();
}
lastInvalidationTime = now;