summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-10-25 00:47:43 -0400
committerEliot Horowitz <eliot@10gen.com>2009-12-07 11:13:09 -0500
commitebf50d623ed3583181b68a8f825d9647ee0b4148 (patch)
treeb78015ba1a38fcd34a891d6c508ef0491006eb22
parent736490eeeff60d6cd89bec9da063450db9a730bc (diff)
downloadmongo-ebf50d623ed3583181b68a8f825d9647ee0b4148.tar.gz
security cleanup / segault fix in currentOp SERVER-384
-rw-r--r--db/security.cpp2
-rw-r--r--db/security.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/db/security.cpp b/db/security.cpp
index 86353a1624b..eef1e1f5341 100644
--- a/db/security.cpp
+++ b/db/security.cpp
@@ -25,7 +25,7 @@ namespace mongo {
bool noauth = true;
- int AuthenticationInfo::warned;
+ int AuthenticationInfo::warned = 0;
} // namespace mongo
diff --git a/db/security.h b/db/security.h
index 86e6b4ad7fa..dae27de5abf 100644
--- a/db/security.h
+++ b/db/security.h
@@ -58,6 +58,7 @@ namespace mongo {
if( m["admin"].level == 2 ) return true;
if( m["local"].level == 2 ) return true;
if( isLocalHost ) {
+ dblock l; // TODO: this is bad, since we want to be able to check this even if outside global lock. probably goes away with concurrency
DBContext c("admin.system.users");
BSONObj result;
if( Helpers::getSingleton("admin.system.users", result) )