diff options
author | Antonin Kral <a.kral@bobek.cz> | 2011-03-17 00:07:52 +0100 |
---|---|---|
committer | Antonin Kral <a.kral@bobek.cz> | 2011-03-17 00:07:52 +0100 |
commit | 98b8b639326ab4c89eed73739d9903993c4c8959 (patch) | |
tree | 0462df078bf740093774d033b75f0ea24a31fa97 /db/security.cpp | |
parent | f5d6e97ca8d2f3e7c4cdd5c9afbf8e756ef65bc2 (diff) | |
parent | 582fc32574a3b158c81e49cb00e6ae59205e66ba (diff) | |
download | mongodb-98b8b639326ab4c89eed73739d9903993c4c8959.tar.gz |
Merge commit 'upstream/1.8.0
Diffstat (limited to 'db/security.cpp')
-rw-r--r-- | db/security.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/db/security.cpp b/db/security.cpp index c552b53..1ec4218 100644 --- a/db/security.cpp +++ b/db/security.cpp @@ -20,19 +20,17 @@ #include "security.h" #include "instance.h" #include "client.h" -#include "curop.h" +#include "curop-inl.h" #include "db.h" #include "dbhelpers.h" namespace mongo { - bool noauth = true; - - int AuthenticationInfo::warned = 0; + int AuthenticationInfo::warned = 0; - void AuthenticationInfo::print(){ + void AuthenticationInfo::print() { cout << "AuthenticationInfo: " << this << '\n'; - for ( map<string,Auth>::iterator i=m.begin(); i!=m.end(); i++ ){ + for ( map<string,Auth>::iterator i=m.begin(); i!=m.end(); i++ ) { cout << "\t" << i->first << "\t" << i->second.level << '\n'; } cout << "END" << endl; @@ -40,16 +38,16 @@ namespace mongo { bool AuthenticationInfo::_isAuthorizedSpecialChecks( const string& dbname ) { - if ( cc().isGod() ){ + if ( cc().isGod() ) { return true; } - - if ( isLocalHost ){ - atleastreadlock l(""); + + if ( isLocalHost ) { + atleastreadlock l(""); Client::GodScope gs; Client::Context c("admin.system.users"); BSONObj result; - if( ! Helpers::getSingleton("admin.system.users", result) ){ + if( ! Helpers::getSingleton("admin.system.users", result) ) { if( warned == 0 ) { warned++; log() << "note: no users configured in admin.system.users, allowing localhost access" << endl; |