diff options
author | Shane Harvey <shane.harvey@mongodb.com> | 2016-03-25 17:13:17 -0400 |
---|---|---|
committer | Shane Harvey <shane.harvey@mongodb.com> | 2016-04-13 14:19:55 -0400 |
commit | 26b55942cc467bca2cc2b935e517b443cf16c550 (patch) | |
tree | 770b6987c9ffa3796135a735deeb9299d842ba5c /src/mongo/db/repl/isself.cpp | |
parent | 0b490582031c2be63239ac0885801739946a2a78 (diff) | |
download | mongo-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.cpp | 6 |
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"); |