diff --git a/db/security.cpp b/db/security.cpp index 87e3b6b24ae..747b04a4ad3 100644 --- a/db/security.cpp +++ b/db/security.cpp @@ -26,7 +26,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 63cb84d5baf..d21976e5061 100644 --- a/db/security.h +++ b/db/security.h @@ -59,6 +59,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) )