0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 00:56:44 +01:00

security cleanup / segault fix in currentOp SERVER-384

This commit is contained in:
Eliot Horowitz 2009-10-25 00:47:43 -04:00
parent 8495bf5a33
commit ea9ae0425f
2 changed files with 2 additions and 1 deletions

View File

@ -26,7 +26,7 @@ namespace mongo {
bool noauth = true;
int AuthenticationInfo::warned;
int AuthenticationInfo::warned = 0;
} // namespace mongo

View File

@ -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) )