summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/isself.cpp
diff options
context:
space:
mode:
authorShane Harvey <shane.harvey@mongodb.com>2016-03-25 17:13:17 -0400
committerShane Harvey <shane.harvey@mongodb.com>2016-04-13 14:19:55 -0400
commit26b55942cc467bca2cc2b935e517b443cf16c550 (patch)
tree770b6987c9ffa3796135a735deeb9299d842ba5c /src/mongo/db/repl/isself.cpp
parent0b490582031c2be63239ac0885801739946a2a78 (diff)
downloadmongo-26b55942cc467bca2cc2b935e517b443cf16c550.tar.gz
SERVER-6823 Enable Access control without downtime.
Add --tryClusterAuth flag that enables communicatation between nodes running with and without auth.
Diffstat (limited to 'src/mongo/db/repl/isself.cpp')
-rw-r--r--src/mongo/db/repl/isself.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mongo/db/repl/isself.cpp b/src/mongo/db/repl/isself.cpp
index a4fc217481d..87cba6fe03b 100644
--- a/src/mongo/db/repl/isself.cpp
+++ b/src/mongo/db/repl/isself.cpp
@@ -202,10 +202,8 @@ bool isSelf(const HostAndPort& hostAndPort) {
return false;
}
- if (getGlobalAuthorizationManager()->isAuthEnabled() && isInternalAuthSet()) {
- if (!conn.authenticateInternalUser()) {
- return false;
- }
+ if (isInternalAuthSet() && !conn.authenticateInternalUser()) {
+ return false;
}
BSONObj out;
bool ok = conn.simpleCommand("admin", &out, "_isSelf");