diff options
author | Matt Dannenberg <dannenberg.matt@gmail.com> | 2012-06-12 13:26:31 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2012-07-03 13:54:33 -0400 |
commit | b39f7ff6b9eac988569ec7a49f7be97bc58764b4 (patch) | |
tree | ed9b2ec147b968c82f5ba5ea8bb1c40935c116e4 /tools | |
parent | 16fdca349817b8be0e6a0b5e9c37a2e1d294cf43 (diff) | |
download | mongo-b39f7ff6b9eac988569ec7a49f7be97bc58764b4.tar.gz |
SERVER-5473 mongostat will not auth unless passed a username or password
Signed-off-by: Spencer T Brody <spencer@10gen.com>
Signed-off-by: Eric Milkie <milkie@10gen.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/stat.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/stat.cpp b/tools/stat.cpp index 8b1b5aab786..efe3b0ceb9a 100644 --- a/tools/stat.cpp +++ b/tools/stat.cpp @@ -489,7 +489,8 @@ namespace mongo { state->error = errmsg; long long cycleNumber = 0; - conn.auth("admin", state->username, state->password, errmsg); + if (! (state->username.empty() && state->password.empty())) + conn.auth("admin", state->username, state->password, errmsg); while ( ++cycleNumber ) { try { |