Permalink
Browse files

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>
  • Loading branch information...
1 parent 16fdca3 commit b39f7ff6b9eac988569ec7a49f7be97bc58764b4 @dannenberg dannenberg committed with milkie Jun 12, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 tools/stat.cpp
View
@@ -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 {

0 comments on commit b39f7ff

Please sign in to comment.